diff --git a/.csbi.yaml b/.csbi.yaml index 43e12d5625020a395f68fe849c6631485f4e9582..47d19752c496a3025b92b0c5701eee3661049fb5 100644 --- a/.csbi.yaml +++ b/.csbi.yaml @@ -1,3 +1,3 @@ repository-base-path: "./models" orchestrator-shutown-timeout: "1min" -docker-orchestrator-network: "csbi-dev-net" \ No newline at end of file +docker-orchestrator-network: "testbed" \ No newline at end of file diff --git a/.gitignore b/.gitignore index b69e3a5ddce99d1d6a37390de9fe643b1984575d..f500556a9c62b6fa0605ee7440b9f02fed69c4a9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,7 @@ /00000000-0000-0000-0000-000000000000 testdata/00000000-0000-0000-0000-000000000000/go.sum testdata/00000000-0000-0000-0000-000000000000/plugin.so -coverage.out \ No newline at end of file +coverage.out +.DS_Store +*.log +*.txt \ No newline at end of file diff --git a/Dockerfile.exec b/Dockerfile.exec new file mode 100644 index 0000000000000000000000000000000000000000..1e53d20279cd86168cb23c5f661dcba68b9ae9c4 --- /dev/null +++ b/Dockerfile.exec @@ -0,0 +1,20 @@ +# syntax = docker/dockerfile:1.2 + +FROM golang:1.16-alpine AS installer +WORKDIR /build +RUN apk add --no-cache git make build-base +RUN apk add --update --no-cache alpine-sdk +COPY go.mod . +COPY go.sum . +RUN go mod download + +FROM installer as builder +COPY . . +RUN --mount=type=cache,target=/root/.cache/go-build \ +GOOS=linux go build -o executor ./cmd/executor/executor.go + +FROM alpine +COPY --from=builder /build/executor . +COPY --from=builder /build/cmd/executor/experiment.yaml . +ENTRYPOINT [ "./executor" ] +CMD [""] \ No newline at end of file diff --git a/arista.capabilities b/arista.capabilities new file mode 100644 index 0000000000000000000000000000000000000000..614cbfc03a5f2dfdabf7eafa995e17d0f9c194f1 --- /dev/null +++ b/arista.capabilities @@ -0,0 +1,105 @@ +arista-exp-eos-vxlan-config +ietf-yang-types +openconfig-aaa +openconfig-igmp-types +openconfig-qos +openconfig-bfd +openconfig-hercules-interfaces +arista-cli +openconfig-policy-types +openconfig-inet-types +openconfig-hercules-platform +openconfig-procmon +openconfig-platform-transceiver +openconfig-if-ip +openconfig-ospfv2 +openconfig-platform-linecard +openconfig-alarm-types +arista-exp-eos-l2protocolforwarding +openconfig-routing-policy +openconfig-platform-types +openconfig-transport-types +openconfig-relay-agent +openconfig-isis-lsdb-types +openconfig-platform-psu +openconfig-isis-types +openconfig-segment-routing +openconfig-openflow +openconfig-interfaces +openconfig-alarms +openconfig-packet-match-types +ietf-netconf +openconfig-system-logging +openconfig-bgp-policy +openconfig-aft-types +openconfig-network-instance +arista-eos-types +openconfig-ospf-types +openconfig-if-ethernet +openconfig-lldp-types +openconfig-bgp +openconfig-rib-bgp +openconfig-mpls-rsvp +openconfig-aaa-types +openconfig-extensions +openconfig-mpls-sr +arista-exp-eos-varp-intf +openconfig-messages +openconfig-mpls-ldp +arista-exp-eos-multicast +arista-exp-eos-varp-net-inst +arista-exp-eos-igmpsnooping +openconfig-license +arista-exp-eos +openconfig-packet-match +arista-exp-eos-qos-acl-config +arista-gnoi-cert +arista-exp-eos-evpn +openconfig-ospf-policy +openconfig-isis +arista-exp-eos-qos +openconfig-aft +openconfig-system +openconfig-mpls-types +ietf-inet-types +arista-exp-eos-vxlan +openconfig-hercules-qos +openconfig-segment-routing-types +openconfig-if-aggregate +openconfig-qos-types +openconfig-vlan-types +openconfig-yang-types +openconfig-network-instance-types +openconfig-lldp +openconfig-vlan +openconfig-pf-srte +openconfig-rib-bgp-types +ietf-interfaces +openconfig-srte-policy +arista-exp-eos-qos-config +openconfig-system-management +openconfig-bgp-types +openconfig-pim +openconfig-lacp +openconfig-local-routing +openconfig-system-terminal +openconfig-if-poe +openconfig-platform-cpu +openconfig-platform-fan +openconfig-platform-port +openconfig-if-types +ietf-netconf-monitoring +arista-exp-eos-mlag +openconfig-pim-types +openconfig-if-tunnel +openconfig-platform +arista-rpc-netconf +vlan-translation +iana-if-type +openconfig-openflow-types +openconfig-mpls +openconfig-network-instance-l3 +openconfig-igmp +openconfig-acl +openconfig-policy-forwarding +openconfig-types \ No newline at end of file diff --git a/cmd/executor/executor.go b/cmd/executor/executor.go new file mode 100644 index 0000000000000000000000000000000000000000..7e9c3a1673b75a2ca21f64a5ab1a513078736fc7 --- /dev/null +++ b/cmd/executor/executor.go @@ -0,0 +1,446 @@ +package main + +import ( + "bufio" + "encoding/json" + "fmt" + "net" + "net/http" + "os" + "strings" + "time" + + "code.fbi.h-da.de/danet/api/go/gosdn/southbound" + "code.fbi.h-da.de/danet/api/go/gosdn/transport" + "code.fbi.h-da.de/danet/gosdn/api" + "code.fbi.h-da.de/danet/gosdn/interfaces/networkdomain" + "github.com/google/uuid" + dto "github.com/prometheus/client_model/go" + "github.com/prometheus/common/expfmt" + "github.com/prometheus/prom2json" + + log "github.com/sirupsen/logrus" + + "github.com/spf13/viper" +) + +const plugin = southbound.Type_PLUGIN +const containerised = southbound.Type_CONTAINERISED + +type experiment struct { + execMode southbound.Type + iterations int +} + +type config struct { + gnmiTarget string `yaml:"gnmi-target"` + ceosTarget string `yaml:"ceos-target"` + controller string `yaml:"controller"` +} + +type result struct{} + +var sbiID uuid.UUID +var pndID uuid.UUID + +var pnd networkdomain.NetworkDomain + +var targets = []string{ + "clab-thesis-gosdn:8080", + "clab-thesis-orchestrator:9338", +} + +var experiments = []experiment{ + { + execMode: plugin, + iterations: 1, + }, + { + execMode: containerised, + iterations: 1, + }, + { + execMode: plugin, + iterations: 10, + }, + { + execMode: containerised, + iterations: 10, + }, + { + execMode: plugin, + iterations: 20, + }, + { + execMode: containerised, + iterations: 20, + }, + { + execMode: plugin, + iterations: 40, + }, + { + execMode: containerised, + iterations: 40, + }, + { + execMode: plugin, + iterations: 60, + }, + { + execMode: containerised, + iterations: 60, + }, + { + execMode: plugin, + iterations: 80, + }, + { + execMode: containerised, + iterations: 80, + }, +} + +func newCollector(targets []string, path string) *metricsCollector { + f, err := os.Create(path) + if err != nil { + log.Fatal(err) + } + return &metricsCollector{ + targets: targets, + f: f, + ticker: time.NewTicker(1 * time.Second), + mfChan: make(chan *dto.MetricFamily, 1024), + stopChan: make(chan bool), + } +} + +type metricsCollector struct { + targets []string + f *os.File + stopChan chan bool + ticker *time.Ticker + mfChan chan *dto.MetricFamily + results []*prom2json.Family +} + +func (mc *metricsCollector) start() { + go func() { + for { + select { + case <-mc.ticker.C: + for _, target := range mc.targets { + if err := mc.collect(target); err != nil { + log.Error(err) + } + } + case <-mc.stopChan: + close(mc.mfChan) + return + } + } + }() + go func() { + for mf := range mc.mfChan { + mc.results = append(mc.results, prom2json.NewFamily(mf)) + } + }() +} + +func (mc *metricsCollector) stop() { + mc.stopChan <- true + writers := make(map[string]*fileWriter) + for _, result := range mc.results { + writer, ok := writers[result.Name] + if !ok { + path := fmt.Sprintf("/out/prom-%v-%v.csv", time.Now().UTC().Format(time.RFC3339), result.Name) + writer = newFileWriter(path) + writers[result.Name] = writer + } + switch result.Type { + case "GAUGE", "COUNTER": + if err := writeMetric(writer, result); err != nil { + log.Error(err) + } + case "HISTOGRAM": + if err := writeHistogram(writer, result); err != nil { + log.Error(err) + } + default: + } + } + for _, v := range writers { + v.close() + } + jsonText, err := json.Marshal(mc.results) + if err != nil { + log.Error() + } + + n, err := mc.f.Write(jsonText) + if err != nil { + log.Error(err) + } + log.WithField("n", n).Info("wrote prom json") +} + +func (mc *metricsCollector) collect(target string) error { + resp, err := http.Get("http://" + target + "/metrics") + if err != nil { + return err + } + defer resp.Body.Close() + var parser expfmt.TextParser + mfs, err := parser.TextToMetricFamilies(resp.Body) + if err != nil { + return err + } + for k, v := range mfs { + if strings.Contains(k, "go_memstats") || + strings.Contains(k, "code_generations_total") || + strings.Contains(k, "duration_seconds") || + strings.Contains(k, "errors") || + strings.Contains(k, "grpc_requests_total") { + mc.mfChan <- v + } + } + return nil +} + +func writeMetric(writer *fileWriter, result *prom2json.Family) error { + b := strings.Builder{} + b.WriteString(result.Name) + b.WriteRune(';') + b.WriteString(result.Type) + for _, m := range result.Metrics { + b.WriteRune(';') + metric, ok := m.(prom2json.Metric) + if !ok { + return fmt.Errorf("invalid type assertion") + } + b.WriteString(metric.TimestampMs) + b.WriteRune(';') + for k, v := range metric.Labels { + b.WriteString(k) + b.WriteRune(';') + b.WriteString(v) + b.WriteRune(';') + } + b.WriteString(metric.Value) + } + b.WriteRune('\n') + writer.write(b.String()) + return nil +} + +func writeHistogram(writer *fileWriter, result *prom2json.Family) error { + b := strings.Builder{} + b.WriteString(result.Name) + b.WriteRune(';') + b.WriteString(result.Type) + for _, m := range result.Metrics { + b.WriteRune(';') + hist, ok := m.(prom2json.Histogram) + if !ok { + return fmt.Errorf("invalid type assertion") + } + b.WriteString(hist.TimestampMs) + b.WriteRune(';') + for k, v := range hist.Labels { + b.WriteString(k) + b.WriteRune(';') + b.WriteString(v) + b.WriteRune(';') + } + for k, v := range hist.Buckets { + b.WriteString(k) + b.WriteRune(';') + b.WriteString(v) + b.WriteRune(';') + } + b.WriteString(hist.Count) + b.WriteRune(';') + b.WriteString(hist.Count) + } + b.WriteRune('\n') + writer.write(b.String()) + return nil +} + +func newFileWriter(path string) *fileWriter { + f, err := os.Create(path) + if err != nil { + log.Fatal(err) + } + return &fileWriter{ + f: f, + w: bufio.NewWriter(f), + } +} + +type fileWriter struct { + f *os.File + w *bufio.Writer +} + +func (fw *fileWriter) write(out string) { + _, err := fw.w.WriteString(out) + if err != nil { + log.Error(err) + } +} + +func (fw *fileWriter) close() { + fw.w.Flush() + fw.f.Close() +} + +func main() { + c, err := readConfig() + if err != nil { + log.Fatal(err) + } + + log.Info("sleeping 10s") + time.Sleep(10 * time.Second) + if err := api.Init(c.controller); err != nil { + log.Fatal(err) + } + + pndID = uuid.MustParse(viper.GetString("CLI_PND")) + sbiID = uuid.MustParse(viper.GetString("CLI_SBI")) + + pnd, err = api.NewAdapter(pndID.String(), c.controller) + if err != nil { + log.Fatal(err) + } + + addr, err := net.ResolveTCPAddr("tcp", c.ceosTarget) + if err != nil { + log.Error(err) + } + var connected bool + var conn net.Conn + for !connected { + conn, err = net.DialTCP("tcp", nil, addr) + if err != nil { + log.Warn("waiting for cEOS. Retry in 10s...") + time.Sleep(10 * time.Second) + continue + } + connected = true + } + if err := conn.Close(); err != nil { + log.Error() + } + + for i, exp := range experiments { + log.WithFields(log.Fields{ + "iterations": exp.iterations, + "exec": exp.execMode, + }).Infof("starting experiment %v of %v\n", (i + 1), len(experiments)) + err := executeExperiment(exp, c) + if err != nil { + log.Error(err) + } + log.Info("wait 10s for clean up") + time.Sleep(10 * time.Second) + } +} + +func readConfig() (*config, error) { + viper.SetConfigFile("./experiment.yaml") + if err := viper.ReadInConfig(); err != nil { + return nil, err + } + fmt.Println("Using config file:", viper.ConfigFileUsed()) + return &config{ + gnmiTarget: viper.GetString("gnmi-target"), + ceosTarget: viper.GetString("ceos-target"), + controller: viper.GetString("controller"), + }, nil +} + +func add(opts *transport.TransportOption, writer *fileWriter) { + var errs int + start := time.Now() + if err := pnd.AddDevice("", opts, sbiID); err != nil { + log.Error(err) + errs++ + } + + duration := time.Since(start) + writer.write(fmt.Sprintf("%v;add;%v;%v;%v;%v\n", time.Now().UnixNano(), opts.Address, opts.Type.String(), duration, errs)) +} + +func get(ouid string, opts *transport.TransportOption, writer *fileWriter) { + var errs int + start := time.Now() + _, err := pnd.Request(uuid.MustParse(ouid), "/system/config/hostname") + if err != nil { + log.Error(err) + errs++ + } + + duration := time.Since(start) + writer.write(fmt.Sprintf("%v;get;%v;%v;%v\n", time.Now().UnixNano(), opts.Type.String(), duration, errs)) +} + +func delete(ouid string, opts *transport.TransportOption, writer *fileWriter) { + var errs int + start := time.Now() + if err := pnd.RemoveDevice(uuid.MustParse(ouid)); err != nil { + log.Error(err) + errs++ + } + + duration := time.Since(start) + writer.write(fmt.Sprintf("%v;delete;%v;%v;%v\n", time.Now().UnixNano(), opts.Type.String(), duration, errs)) +} + +func executeExperiment(params experiment, c *config) error { + expName := fmt.Sprintf("/out/results-%v-%v.csv", params.execMode, params.iterations) + writer := newFileWriter(expName) + coll := newCollector(targets, fmt.Sprintf("/out/metrics-%v-%v.json", params.execMode, params.iterations)) + coll.start() + defer coll.stop() + start := time.Now() + + opts := &transport.TransportOption{ + Address: c.ceosTarget, + Username: "admin", + Password: "admin", + Tls: false, + TransportOption: &transport.TransportOption_GnmiTransportOption{ + GnmiTransportOption: &transport.GnmiTransportOption{}, + }, + Type: params.execMode, + } + + for i := 0; i < params.iterations; i++ { + add(opts, writer) + } + + resp, err := api.GetIds(c.controller) + if err != nil { + return err + } + + ondList := resp[0].Ond + for _, ond := range ondList { + get(ond.Id, opts, writer) + } + + for _, ond := range ondList { + delete(ond.Id, opts, writer) + } + duration := time.Since(start) + writer.write(fmt.Sprintf("%v;duration;sequential;%v;%v\n", time.Now().UnixNano(), params.iterations, duration)) + writer.close() + log.WithFields(log.Fields{ + "duration": duration, + "iterations": params.iterations, + "exec": params.execMode, + }).Info("experiment ended") + return nil +} diff --git a/cmd/executor/experiment.yaml b/cmd/executor/experiment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..57382e73eb9fd53191651da7f58f8a24f15a3088 --- /dev/null +++ b/cmd/executor/experiment.yaml @@ -0,0 +1,5 @@ +ceos-target: clab-thesis-ceos:6030 +cli_pnd: f8c649be-60ee-4a53-acf9-cebc8eebf3c2 +cli_sbi: f370efe4-fb3c-411b-81b6-7f536027eccb +controller: clab-thesis-gosdn:55055 +gnmi-target: clab-thesis-gnmi-target:7030 diff --git a/cmd/root.go b/cmd/root.go index 6393766ec1db2567406ad018a4873a7ee772b399..7c2ac1070e66ec3f1c03f5b6934e4b26c8be148c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -105,7 +105,6 @@ func initConfig() { fmt.Println("Using config file:", viper.ConfigFileUsed()) } - log.SetReportCaller(true) switch logLevel { case "trace": log.SetLevel(log.TraceLevel) @@ -114,7 +113,6 @@ func initConfig() { default: log.SetLevel(log.InfoLevel) log.SetFormatter(&log.JSONFormatter{}) - log.SetReportCaller(false) } if accessToken != "" { diff --git a/docker-compose.yml b/docker-compose.yml index c8698002dffe238b02b2303e495b40b3948f94a5..6553d3f4d1984524bddcfde040c050686c53c9ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,25 +4,34 @@ services: image: registry.code.fbi.h-da.de/danet/gosdn:thesis-mk ports: - "55055:55055" + - "8080:8080" - "40000:40000" security_opt: ["apparmor=unconfined"] cap_add: [SYS_PTRACE] environment: - GOSDN_LOG=trace command: ["--csbi-orchestrator", "orchestrator:55056"] + networks: + - csbi-dev-net gnmi-target: build: context: ./gnmi-target dockerfile: Dockerfile ports: - "7030:7030" + networks: + - csbi-dev-net orchestrator: - image: registry.code.fbi.h-da.de/danet/csbi:latest + build: . ports: - "55056:55056" + - "9338:9338" volumes: - "/var/run/docker.sock:/var/run/docker.sock" - command: ["--log-level", "trace"] + - ./.csbi.yml:/etc/.csbi.yml + command: ["--log-level", "trace", "--config", "/etc/.csbi.yml"] + networks: + - csbi-dev-net prometheus: image: prom/prometheus:v2.29.1 ports: @@ -31,14 +40,18 @@ services: - ./prometheus:/etc/prometheus - prometheus-data:/prometheus command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml + networks: + - csbi-dev-net grafana: - image: grafana/grafana:7.5.7 + image: grafana/grafana:8.1.2 ports: - 3000:3000 restart: unless-stopped volumes: - ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources - grafana-data:/var/lib/grafana + networks: + - csbi-dev-net volumes: diff --git a/generate.go b/generate.go index aa3984e623e49acaea29e47391579bdb9f125fb3..a91d2d303951c7aab9a30d805d4fa5f7dd469049 100644 --- a/generate.go +++ b/generate.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "strings" + "sync" "github.com/openconfig/goyang/pkg/yang" "github.com/prometheus/client_golang/prometheus" @@ -17,9 +18,11 @@ import ( ) func init() { - log.SetReportCaller(true) + log.SetReportCaller(false) } +var lock sync.Mutex + // Generate takes gnmi.ModelData, a Repository, and an southbound.Type // It searches for the model contained in the models slice in the provided // Repository. Assuming all necessary models are found Go code is generated @@ -63,6 +66,8 @@ func Generate(ctx context.Context, models []*gpb.ModelData, repository Repositor IncludeModelData: true, }, } + + lock.Lock() generator := ygen.NewYANGCodeGenerator(cfg) searchpath, err := repository.YANGPathsWithSuffix() @@ -72,9 +77,13 @@ func Generate(ctx context.Context, models []*gpb.ModelData, repository Repositor code, errs := generator.GenerateGoCode(yangFiles, searchpath) for _, e := range errs { if strings.Contains(e.Error(), "duplicate entry interfaces at the root") { - splitted := strings.SplitAfter(e.Error(), "new: ") - model := strings.Split(splitted[0], "/")[1] - generator.Config.ParseOptions.ExcludeModules = append(generator.Config.ParseOptions.ExcludeModules, model) + if strings.Contains(e.Error(), "ietf-interfaces") { + generator.Config.ParseOptions.ExcludeModules = append(generator.Config.ParseOptions.ExcludeModules, "ietf-interfaces") + } else { + splitted := strings.SplitAfter(e.Error(), "new: ") + model := strings.Split(splitted[0], "/")[1] + generator.Config.ParseOptions.ExcludeModules = append(generator.Config.ParseOptions.ExcludeModules, model) + } } log.Warnf("error during first round %v", promHandleError(labels, e, codeGenerationErrorsTotal)) } @@ -86,10 +95,14 @@ func Generate(ctx context.Context, models []*gpb.ModelData, repository Repositor code, errs = generator.GenerateGoCode(yangFiles, searchpath) } + lock.Unlock() + if len(errs) != 0 { n := len(errs) log.Errorf("%v errors during code generation", n) - codeGenerationErrorsTotal.With(labels).Add(float64(n)) + for _, err := range errs { + promHandleError(labels, err, codeGenerationErrorsTotal) + } } if code == nil { diff --git a/go.mod b/go.mod index ba95c5080aef75669a569efc82575d44f6194c40..7bf816054886443b7e0dd66f184a41b7196e4e15 100644 --- a/go.mod +++ b/go.mod @@ -15,10 +15,13 @@ require ( github.com/moby/sys/mount v0.2.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/openconfig/gnmi v0.0.0-20210707145734-c69a5df04b53 - github.com/openconfig/goyang v0.2.7 - github.com/openconfig/ygot v0.11.2 + github.com/openconfig/goyang v0.2.9 + github.com/openconfig/ygot v0.12.0 github.com/opencontainers/runc v1.0.0 // indirect github.com/prometheus/client_golang v1.9.0 + github.com/prometheus/client_model v0.2.0 + github.com/prometheus/common v0.18.0 + github.com/prometheus/prom2json v1.3.0 github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.2.1 github.com/spf13/viper v1.8.1 diff --git a/go.sum b/go.sum index 04309f7e1e3acfb884427099693c15122a65a2b6..729a8d1bf5c4e3316970738ade28623d9287c580 100644 --- a/go.sum +++ b/go.sum @@ -680,8 +680,9 @@ github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0 github.com/openconfig/goyang v0.2.2/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= github.com/openconfig/goyang v0.2.3/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= github.com/openconfig/goyang v0.2.5/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= -github.com/openconfig/goyang v0.2.7 h1:bWvqXzNekiyHR2eoNE1DWrS3zSQS3aNKl6V+BLQSRSU= github.com/openconfig/goyang v0.2.7/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= +github.com/openconfig/goyang v0.2.9 h1:Z95LskKYk6nBYOxHtmJCu3YEKlr3pJLWG1tYAaNh3yU= +github.com/openconfig/goyang v0.2.9/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= github.com/openconfig/gribi v0.1.1-0.20210423184541-ce37eb4ba92f/go.mod h1:OoH46A2kV42cIXGyviYmAlGmn6cHjGduyC2+I9d/iVs= github.com/openconfig/grpctunnel v0.0.0-20210610163803-fde4a9dc048d/go.mod h1:x9tAZ4EwqCQ0jI8D6S8Yhw9Z0ee7/BxWQX0k0Uib5Q8= github.com/openconfig/public v0.0.0-20210617063307-ed650bd969af/go.mod h1:yUxbtuG3OQ8eTwMtkvFhpd1eMZUXxLKxBqVth5Qn09U= @@ -689,8 +690,9 @@ github.com/openconfig/reference v0.0.0-20201210185750-72ca4cfd4abd/go.mod h1:ym2 github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs= github.com/openconfig/ygot v0.9.0/go.mod h1:oCQNdXnv7dWc8scTDgoFkauv1wwplJn5HspHcjlxSAQ= github.com/openconfig/ygot v0.10.4/go.mod h1:oCQNdXnv7dWc8scTDgoFkauv1wwplJn5HspHcjlxSAQ= -github.com/openconfig/ygot v0.11.2 h1:J5HTV1BtNZoc8LHDUpgA33rhccEIds81S32G2qgIDJY= github.com/openconfig/ygot v0.11.2/go.mod h1:5q5fz1SDPGUwMyzbm8Ns2Krul+32euNSU89ZmrGrSK8= +github.com/openconfig/ygot v0.12.0 h1:7WJ+BR2D8rM3eMbPVKWS/4Amiu+oRb3PC0gT4E23BQA= +github.com/openconfig/ygot v0.12.0/go.mod h1:kJN0yCXIH07dOXvNBEFm3XxXdnDD5NI6K99tnD5x49c= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -793,6 +795,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/prom2json v1.3.0 h1:BlqrtbT9lLH3ZsOVhXPsHzFrApCTKRifB7gjJuypu6Y= +github.com/prometheus/prom2json v1.3.0/go.mod h1:rMN7m0ApCowcoDlypBHlkNbp5eJQf/+1isKykIP5ZnM= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= diff --git a/models/experimental/eos/models/mlag/arista-exp-eos-mlag.yang b/models/experimental/eos/models/mlag/arista-exp-eos-mlag.yang index a2b3fd92a9afbaf6f8df868ef7da16a2420a5cb2..cbb5d7a9f6284e9fe9357a3841b62560bf71caf1 100644 --- a/models/experimental/eos/models/mlag/arista-exp-eos-mlag.yang +++ b/models/experimental/eos/models/mlag/arista-exp-eos-mlag.yang @@ -48,6 +48,50 @@ module arista-exp-eos-mlag { } } + + typedef heartbeat-intvl-type { + type union { + type enumeration { + enum DISABLED { + description + "Disable sending heartbeats and checking heartbeat timeouts"; + } + } + type uint32 { + range "1000..30000"; + } + } + } + + typedef dual-primary-action-enum { + type enumeration { + enum errdisable-all-interfaces { + description + "Disable all Ethernet interfaces except peer-link"; + } + enum action-none { + description + "No action"; + } + } + description + "Dual primary action types"; + } + + typedef reload-delay-type { + type union { + type enumeration { + enum INFINITY { + description + "Keep non peer-link ports disabled after reboot"; + } + } + type eos-types:double { + range "0..86400"; + } + } + } + grouping mlag-config { description "Adds configuration for MLAGs"; @@ -76,23 +120,10 @@ module arista-exp-eos-mlag { } leaf heartbeat-interval { type heartbeat-intvl-type; - default "4000"; description "Time in milliseconds between MLAG heartbeat messages"; } - typedef heartbeat-intvl-type { - type union { - type enumeration { - enum DISABLED { - description - "Disable sending heartbeats and checking heartbeat timeouts"; - } - } - type uint32 { - range "1000..30000"; - } - } - } + container heartbeat-peer-address { description @@ -120,20 +151,7 @@ module arista-exp-eos-mlag { description "Interface connecting to MLAG peer"; } - typedef dual-primary-action-enum { - type enumeration { - enum errdisable-all-interfaces { - description - "Disable all Ethernet interfaces except peer-link"; - } - enum action-none { - description - "No action"; - } - } - description - "Dual primary action types"; - } + grouping mlag-peer-address-vrf { description @@ -170,18 +188,5 @@ module arista-exp-eos-mlag { description "Delay (seconds) after reboot until ports that are not part of an MLAG are enabled"; } - typedef reload-delay-type { - type union { - type enumeration { - enum INFINITY { - description - "Keep non peer-link ports disabled after reboot"; - } - } - type eos-types:double { - range "0..86400"; - } - } - } } } diff --git a/models/experimental/eos/models/vlan/vlan-translation.yang b/models/experimental/eos/models/vlan/vlan-translation.yang index a2ebdf5cada896af0f89e78954d0b663c9a21727..86cbafee6b1e21be6dd6b088243e2cbd0579fb14 100644 --- a/models/experimental/eos/models/vlan/vlan-translation.yang +++ b/models/experimental/eos/models/vlan/vlan-translation.yang @@ -32,6 +32,12 @@ module vlan-translation { associated with interfaces Copyright (c) 2016 Arista Networks, Inc. All rights reserved."; + revision 2020-08-10 { + description + "Use config oc-if:type path to be in accessible tree"; + reference + "1.0.2"; + } revision 2019-07-31 { description "Correct oc-if:type path in when statement"; @@ -154,7 +160,7 @@ module vlan-translation { } augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/oc-vlan:switched-vlan" { - when "../../oc-if:state/oc-if:type = 'ift:ethernetCsmacd'" { + when "../../oc-if:config/oc-if:type = 'ift:ethernetCsmacd'" { description "Active when the interface is Ethernet"; } @@ -165,7 +171,7 @@ module vlan-translation { } augment "/oc-if:interfaces/oc-if:interface/oc-lag:aggregation/oc-vlan:switched-vlan" { - when "../../oc-if:state/oc-if:type = 'ift:ieee8023adLag'" { + when "../../oc-if:config/oc-if:type = 'ift:ieee8023adLag'" { description "Active when the interface is a LAG"; } @@ -175,7 +181,7 @@ module vlan-translation { } augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/oc-vlan:switched-vlan/oc-vlan:config" { - when "../../../oc-if:state/oc-if:type = 'ift:ethernetCsmacd'" { + when "../../../oc-if:config/oc-if:type = 'ift:ethernetCsmacd'" { description "Active when the interface is Ethernet"; } @@ -185,8 +191,8 @@ module vlan-translation { } augment "/oc-if:interfaces/oc-if:interface/oc-lag:aggregation/oc-vlan:switched-vlan/oc-vlan:config" { - when "../../../oc-if:state/oc-if:type = 'ift:ieee8023adLag'" { - description + when "../../../oc-if:config/oc-if:type = 'ift:ieee8023adLag'" { + description "Active when the interface is a LAG"; } description diff --git a/models/ietf/RFC/iana-crypt-hash.yang b/models/ietf/RFC/iana-crypt-hash.yang new file mode 100644 index 0000000000000000000000000000000000000000..44c4674f89526a109e1bbe6c1072a2a7c8245d7e --- /dev/null +++ b/models/ietf/RFC/iana-crypt-hash.yang @@ -0,0 +1,120 @@ +module iana-crypt-hash { + namespace "urn:ietf:params:xml:ns:yang:iana-crypt-hash"; + prefix ianach; + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States + + Tel: +1 310 301 5800 + E-Mail: iana@iana.org>"; + description + "This YANG module defines a type for storing passwords + using a hash function and features to indicate which hash + functions are supported by an implementation. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 7317; + see the RFC itself for full legal notices."; + + revision 2014-08-06 { + description + "Initial revision."; + reference + "RFC 7317: A YANG Data Model for System Management"; + } + + typedef crypt-hash { + type string { + pattern + '$0$.*' + + '|$1$[a-zA-Z0-9./]{1,8}$[a-zA-Z0-9./]{22}' + + '|$5$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}' + + '|$6$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}'; + } + description + "The crypt-hash type is used to store passwords using + a hash function. The algorithms for applying the hash + function and encoding the result are implemented in + various UNIX systems as the function crypt(3). + + A value of this type matches one of the forms: + + $0$<clear text password> + $<id>$<salt>$<password hash> + $<id>$<parameter>$<salt>$<password hash> + + The '$0$' prefix signals that the value is clear text. When + such a value is received by the server, a hash value is + calculated, and the string '$<id>$<salt>$' or + $<id>$<parameter>$<salt>$ is prepended to the result. This + value is stored in the configuration data store. + If a value starting with '$<id>$', where <id> is not '0', is + received, the server knows that the value already represents a + hashed value and stores it 'as is' in the data store. + + When a server needs to verify a password given by a user, it + finds the stored password hash string for that user, extracts + the salt, and calculates the hash with the salt and given + password as input. If the calculated hash value is the same + as the stored value, the password given by the client is + accepted. + + This type defines the following hash functions: + + id | hash function | feature + ---+---------------+------------------- + 1 | MD5 | crypt-hash-md5 + 5 | SHA-256 | crypt-hash-sha-256 + 6 | SHA-512 | crypt-hash-sha-512 + + The server indicates support for the different hash functions + by advertising the corresponding feature."; + reference + "IEEE Std 1003.1-2008 - crypt() function + RFC 1321: The MD5 Message-Digest Algorithm + FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } + + feature crypt-hash-md5 { + description + "Indicates that the device supports the MD5 + hash function in 'crypt-hash' values."; + reference "RFC 1321: The MD5 Message-Digest Algorithm"; + } + + feature crypt-hash-sha-256 { + description + "Indicates that the device supports the SHA-256 + hash function in 'crypt-hash' values."; + reference "FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } + + feature crypt-hash-sha-512 { + description + "Indicates that the device supports the SHA-512 + hash function in 'crypt-hash' values."; + reference "FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } + +} diff --git a/models/ietf/RFC/iana-crypt-hash@2014-08-06.yang b/models/ietf/RFC/iana-crypt-hash@2014-08-06.yang new file mode 100644 index 0000000000000000000000000000000000000000..44c4674f89526a109e1bbe6c1072a2a7c8245d7e --- /dev/null +++ b/models/ietf/RFC/iana-crypt-hash@2014-08-06.yang @@ -0,0 +1,120 @@ +module iana-crypt-hash { + namespace "urn:ietf:params:xml:ns:yang:iana-crypt-hash"; + prefix ianach; + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States + + Tel: +1 310 301 5800 + E-Mail: iana@iana.org>"; + description + "This YANG module defines a type for storing passwords + using a hash function and features to indicate which hash + functions are supported by an implementation. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 7317; + see the RFC itself for full legal notices."; + + revision 2014-08-06 { + description + "Initial revision."; + reference + "RFC 7317: A YANG Data Model for System Management"; + } + + typedef crypt-hash { + type string { + pattern + '$0$.*' + + '|$1$[a-zA-Z0-9./]{1,8}$[a-zA-Z0-9./]{22}' + + '|$5$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}' + + '|$6$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}'; + } + description + "The crypt-hash type is used to store passwords using + a hash function. The algorithms for applying the hash + function and encoding the result are implemented in + various UNIX systems as the function crypt(3). + + A value of this type matches one of the forms: + + $0$<clear text password> + $<id>$<salt>$<password hash> + $<id>$<parameter>$<salt>$<password hash> + + The '$0$' prefix signals that the value is clear text. When + such a value is received by the server, a hash value is + calculated, and the string '$<id>$<salt>$' or + $<id>$<parameter>$<salt>$ is prepended to the result. This + value is stored in the configuration data store. + If a value starting with '$<id>$', where <id> is not '0', is + received, the server knows that the value already represents a + hashed value and stores it 'as is' in the data store. + + When a server needs to verify a password given by a user, it + finds the stored password hash string for that user, extracts + the salt, and calculates the hash with the salt and given + password as input. If the calculated hash value is the same + as the stored value, the password given by the client is + accepted. + + This type defines the following hash functions: + + id | hash function | feature + ---+---------------+------------------- + 1 | MD5 | crypt-hash-md5 + 5 | SHA-256 | crypt-hash-sha-256 + 6 | SHA-512 | crypt-hash-sha-512 + + The server indicates support for the different hash functions + by advertising the corresponding feature."; + reference + "IEEE Std 1003.1-2008 - crypt() function + RFC 1321: The MD5 Message-Digest Algorithm + FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } + + feature crypt-hash-md5 { + description + "Indicates that the device supports the MD5 + hash function in 'crypt-hash' values."; + reference "RFC 1321: The MD5 Message-Digest Algorithm"; + } + + feature crypt-hash-sha-256 { + description + "Indicates that the device supports the SHA-256 + hash function in 'crypt-hash' values."; + reference "FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } + + feature crypt-hash-sha-512 { + description + "Indicates that the device supports the SHA-512 + hash function in 'crypt-hash' values."; + reference "FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } + +} diff --git a/models/ietf/RFC/iana-dots-signal-channel.yang b/models/ietf/RFC/iana-dots-signal-channel.yang new file mode 100644 index 0000000000000000000000000000000000000000..d3d3b0a69295287b1a590a819ca7564ef83ce52b --- /dev/null +++ b/models/ietf/RFC/iana-dots-signal-channel.yang @@ -0,0 +1,184 @@ +module iana-dots-signal-channel { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-dots-signal-channel"; + prefix iana-dots-signal; + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + <mailto:iana@iana.org>"; + description + "This module contains a collection of YANG data types defined + by IANA and used for DOTS signal channel protocol. + + Copyright (c) 2021 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9132; see + the RFC itself for full legal notices."; + + revision 2021-09-02 { + description + "Updated the prefix used for the module."; + reference + "RFC 9132: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + revision 2020-05-28 { + description + "Initial revision."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + typedef status { + type enumeration { + enum attack-mitigation-in-progress { + value 1; + description + "Attack mitigation setup is in progress (e.g., changing + the network path to reroute the inbound traffic + to DOTS mitigator)."; + } + enum attack-successfully-mitigated { + value 2; + description + "Attack is being successfully mitigated (e.g., traffic + is redirected to a DDoS mitigator and attack + traffic is dropped)."; + } + enum attack-stopped { + value 3; + description + "Attack has stopped and the DOTS client can + withdraw the mitigation request."; + } + enum attack-exceeded-capability { + value 4; + description + "Attack has exceeded the mitigation provider + capability."; + } + enum dots-client-withdrawn-mitigation { + value 5; + description + "DOTS client has withdrawn the mitigation + request and the mitigation is active but + terminating."; + } + enum attack-mitigation-terminated { + value 6; + description + "Attack mitigation is now terminated."; + } + enum attack-mitigation-withdrawn { + value 7; + description + "Attack mitigation is withdrawn."; + } + enum attack-mitigation-signal-loss { + value 8; + description + "Attack mitigation will be triggered + for the mitigation request only when + the DOTS signal channel session is lost."; + } + } + description + "Enumeration for status reported by the DOTS server."; + } + + typedef conflict-status { + type enumeration { + enum request-inactive-other-active { + value 1; + description + "DOTS server has detected conflicting mitigation + requests from different DOTS clients. + This mitigation request is currently inactive + until the conflicts are resolved. Another + mitigation request is active."; + } + enum request-active { + value 2; + description + "DOTS server has detected conflicting mitigation + requests from different DOTS clients. + This mitigation request is currently active."; + } + enum all-requests-inactive { + value 3; + description + "DOTS server has detected conflicting mitigation + requests from different DOTS clients. All + conflicting mitigation requests are inactive."; + } + } + description + "Enumeration for conflict status."; + } + + typedef conflict-cause { + type enumeration { + enum overlapping-targets { + value 1; + description + "Overlapping targets. conflict-scope provides + more details about the exact conflict."; + } + enum conflict-with-acceptlist { + value 2; + description + "Conflicts with an existing accept-list. + + This code is returned when the DDoS mitigation + detects that some of the source addresses/prefixes + listed in the accept-list ACLs are actually + attacking the target."; + } + enum cuid-collision { + value 3; + description + "Conflicts with the cuid used by another + DOTS client."; + } + } + description + "Enumeration for conflict causes."; + } + + typedef attack-status { + type enumeration { + enum under-attack { + value 1; + description + "The DOTS client determines that it is still under + attack."; + } + enum attack-successfully-mitigated { + value 2; + description + "The DOTS client determines that the attack is + successfully mitigated."; + } + } + description + "Enumeration for attack status codes."; + } +} diff --git a/models/ietf/RFC/iana-dots-signal-channel@2020-05-28.yang b/models/ietf/RFC/iana-dots-signal-channel@2020-05-28.yang new file mode 100644 index 0000000000000000000000000000000000000000..c05510a08d9cad51b669476f4e1d8f92047c4714 --- /dev/null +++ b/models/ietf/RFC/iana-dots-signal-channel@2020-05-28.yang @@ -0,0 +1,176 @@ +module iana-dots-signal-channel { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-dots-signal-channel"; + prefix iana-signal; + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + <mailto:iana@iana.org>"; + description + "This module contains a collection of YANG data types defined + by IANA and used for DOTS signal channel protocol. + + Copyright (c) 2020 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8782; see + the RFC itself for full legal notices."; + + revision 2020-05-28 { + description + "Initial revision."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + typedef status { + type enumeration { + enum attack-mitigation-in-progress { + value 1; + description + "Attack mitigation setup is in progress (e.g., changing + the network path to reroute the inbound traffic + to DOTS mitigator)."; + } + enum attack-successfully-mitigated { + value 2; + description + "Attack is being successfully mitigated (e.g., traffic + is redirected to a DDoS mitigator and attack + traffic is dropped or blackholed)."; + } + enum attack-stopped { + value 3; + description + "Attack has stopped and the DOTS client can + withdraw the mitigation request."; + } + enum attack-exceeded-capability { + value 4; + description + "Attack has exceeded the mitigation provider + capability."; + } + enum dots-client-withdrawn-mitigation { + value 5; + description + "DOTS client has withdrawn the mitigation + request and the mitigation is active but + terminating."; + } + enum attack-mitigation-terminated { + value 6; + description + "Attack mitigation is now terminated."; + } + enum attack-mitigation-withdrawn { + value 7; + description + "Attack mitigation is withdrawn."; + } + enum attack-mitigation-signal-loss { + value 8; + description + "Attack mitigation will be triggered + for the mitigation request only when + the DOTS signal channel session is lost."; + } + } + description + "Enumeration for status reported by the DOTS server."; + } + + typedef conflict-status { + type enumeration { + enum request-inactive-other-active { + value 1; + description + "DOTS Server has detected conflicting mitigation + requests from different DOTS clients. + This mitigation request is currently inactive + until the conflicts are resolved. Another + mitigation request is active."; + } + enum request-active { + value 2; + description + "DOTS Server has detected conflicting mitigation + requests from different DOTS clients. + This mitigation request is currently active."; + } + enum all-requests-inactive { + value 3; + description + "DOTS Server has detected conflicting mitigation + requests from different DOTS clients. All + conflicting mitigation requests are inactive."; + } + } + description + "Enumeration for conflict status."; + } + + typedef conflict-cause { + type enumeration { + enum overlapping-targets { + value 1; + description + "Overlapping targets. conflict-scope provides + more details about the exact conflict."; + } + enum conflict-with-acceptlist { + value 2; + description + "Conflicts with an existing accept-list. + + This code is returned when the DDoS mitigation + detects that some of the source addresses/prefixes + listed in the accept-list ACLs are actually + attacking the target."; + } + enum cuid-collision { + value 3; + description + "Conflicts with the cuid used by another + DOTS client."; + } + } + description + "Enumeration for conflict causes."; + } + + typedef attack-status { + type enumeration { + enum under-attack { + value 1; + description + "The DOTS client determines that it is still under + attack."; + } + enum attack-successfully-mitigated { + value 2; + description + "The DOTS client determines that the attack is + successfully mitigated."; + } + } + description + "Enumeration for attack status codes."; + } +} diff --git a/models/ietf/RFC/iana-dots-signal-channel@2021-09-02.yang b/models/ietf/RFC/iana-dots-signal-channel@2021-09-02.yang new file mode 100644 index 0000000000000000000000000000000000000000..d3d3b0a69295287b1a590a819ca7564ef83ce52b --- /dev/null +++ b/models/ietf/RFC/iana-dots-signal-channel@2021-09-02.yang @@ -0,0 +1,184 @@ +module iana-dots-signal-channel { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-dots-signal-channel"; + prefix iana-dots-signal; + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + <mailto:iana@iana.org>"; + description + "This module contains a collection of YANG data types defined + by IANA and used for DOTS signal channel protocol. + + Copyright (c) 2021 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9132; see + the RFC itself for full legal notices."; + + revision 2021-09-02 { + description + "Updated the prefix used for the module."; + reference + "RFC 9132: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + revision 2020-05-28 { + description + "Initial revision."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + typedef status { + type enumeration { + enum attack-mitigation-in-progress { + value 1; + description + "Attack mitigation setup is in progress (e.g., changing + the network path to reroute the inbound traffic + to DOTS mitigator)."; + } + enum attack-successfully-mitigated { + value 2; + description + "Attack is being successfully mitigated (e.g., traffic + is redirected to a DDoS mitigator and attack + traffic is dropped)."; + } + enum attack-stopped { + value 3; + description + "Attack has stopped and the DOTS client can + withdraw the mitigation request."; + } + enum attack-exceeded-capability { + value 4; + description + "Attack has exceeded the mitigation provider + capability."; + } + enum dots-client-withdrawn-mitigation { + value 5; + description + "DOTS client has withdrawn the mitigation + request and the mitigation is active but + terminating."; + } + enum attack-mitigation-terminated { + value 6; + description + "Attack mitigation is now terminated."; + } + enum attack-mitigation-withdrawn { + value 7; + description + "Attack mitigation is withdrawn."; + } + enum attack-mitigation-signal-loss { + value 8; + description + "Attack mitigation will be triggered + for the mitigation request only when + the DOTS signal channel session is lost."; + } + } + description + "Enumeration for status reported by the DOTS server."; + } + + typedef conflict-status { + type enumeration { + enum request-inactive-other-active { + value 1; + description + "DOTS server has detected conflicting mitigation + requests from different DOTS clients. + This mitigation request is currently inactive + until the conflicts are resolved. Another + mitigation request is active."; + } + enum request-active { + value 2; + description + "DOTS server has detected conflicting mitigation + requests from different DOTS clients. + This mitigation request is currently active."; + } + enum all-requests-inactive { + value 3; + description + "DOTS server has detected conflicting mitigation + requests from different DOTS clients. All + conflicting mitigation requests are inactive."; + } + } + description + "Enumeration for conflict status."; + } + + typedef conflict-cause { + type enumeration { + enum overlapping-targets { + value 1; + description + "Overlapping targets. conflict-scope provides + more details about the exact conflict."; + } + enum conflict-with-acceptlist { + value 2; + description + "Conflicts with an existing accept-list. + + This code is returned when the DDoS mitigation + detects that some of the source addresses/prefixes + listed in the accept-list ACLs are actually + attacking the target."; + } + enum cuid-collision { + value 3; + description + "Conflicts with the cuid used by another + DOTS client."; + } + } + description + "Enumeration for conflict causes."; + } + + typedef attack-status { + type enumeration { + enum under-attack { + value 1; + description + "The DOTS client determines that it is still under + attack."; + } + enum attack-successfully-mitigated { + value 2; + description + "The DOTS client determines that the attack is + successfully mitigated."; + } + } + description + "Enumeration for attack status codes."; + } +} diff --git a/models/ietf/RFC/iana-hardware.yang b/models/ietf/RFC/iana-hardware.yang new file mode 100644 index 0000000000000000000000000000000000000000..5cd52648ff9b676dc04a98b5b85bd180f88f8a6e --- /dev/null +++ b/models/ietf/RFC/iana-hardware.yang @@ -0,0 +1,189 @@ +module iana-hardware { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-hardware"; + prefix ianahw; + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + + Tel: +1 310 301 5800 + E-Mail: iana@iana.org>"; + + description + "IANA-defined identities for hardware class. + + The latest revision of this YANG module can be obtained from + the IANA website. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2018 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 Simplified 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). + + The initial version of this YANG module is part of RFC 8348; + see the RFC itself for full legal notices."; + reference + "https://www.iana.org/assignments/yang-parameters"; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Identities + */ + + identity hardware-class { + description + "This identity is the base for all hardware class + identifiers."; + } + + identity unknown { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is unknown + to the server."; + } + + identity chassis { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is an + overall container for networking equipment. Any class of + physical component, except a stack, may be contained within a + chassis; a chassis may only be contained within a stack."; + } + + identity backplane { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of device for aggregating and forwarding networking traffic, + such as a shared backplane in a modular ethernet switch. Note + that an implementation may model a backplane as a single + physical component, which is actually implemented as multiple + discrete physical components (within a chassis or stack)."; + } + + identity container { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is capable + of containing one or more removable physical entities, + possibly of different types. For example, each (empty or + full) slot in a chassis will be modeled as a container. Note + that all removable physical components should be modeled + within a container component, such as field-replaceable + modules, fans, or power supplies. Note that all known + containers should be modeled by the agent, including empty + containers."; + } + + identity power-supply { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is a + power-supplying component."; + } + + identity fan { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is a fan or + other heat-reduction component."; + } + + identity sensor { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of sensor, such as a temperature sensor within a router + chassis."; + } + + identity module { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of self-contained sub-system. If a module component is + removable, then it should be modeled within a container + + component; otherwise, it should be modeled directly within + another physical component (e.g., a chassis or another + module)."; + } + + identity port { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of networking port capable of receiving and/or transmitting + networking traffic."; + } + + identity stack { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of super-container (possibly virtual) intended to group + together multiple chassis entities. A stack may be realized + by a virtual cable, a real interconnect cable attached to + multiple chassis, or multiple interconnect cables. A stack + should not be modeled within any other physical components, + but a stack may be contained within another stack. Only + chassis components should be contained within a stack."; + } + + identity cpu { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of central processing unit."; + } + + identity energy-object { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of energy object, i.e., it is a piece of equipment that is + part of or attached to a communications network that is + monitored, it is controlled, or it aids in the management of + another device for Energy Management."; + } + + identity battery { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of battery."; + } + + identity storage-drive { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of component with data storage capability as its main + functionality, e.g., hard disk drive (HDD), solid-state device + (SSD), solid-state hybrid drive (SSHD), object storage device + (OSD), or other."; + } +} diff --git a/models/ietf/RFC/iana-hardware@2018-03-13.yang b/models/ietf/RFC/iana-hardware@2018-03-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..5cd52648ff9b676dc04a98b5b85bd180f88f8a6e --- /dev/null +++ b/models/ietf/RFC/iana-hardware@2018-03-13.yang @@ -0,0 +1,189 @@ +module iana-hardware { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-hardware"; + prefix ianahw; + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + + Tel: +1 310 301 5800 + E-Mail: iana@iana.org>"; + + description + "IANA-defined identities for hardware class. + + The latest revision of this YANG module can be obtained from + the IANA website. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2018 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 Simplified 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). + + The initial version of this YANG module is part of RFC 8348; + see the RFC itself for full legal notices."; + reference + "https://www.iana.org/assignments/yang-parameters"; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Identities + */ + + identity hardware-class { + description + "This identity is the base for all hardware class + identifiers."; + } + + identity unknown { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is unknown + to the server."; + } + + identity chassis { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is an + overall container for networking equipment. Any class of + physical component, except a stack, may be contained within a + chassis; a chassis may only be contained within a stack."; + } + + identity backplane { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of device for aggregating and forwarding networking traffic, + such as a shared backplane in a modular ethernet switch. Note + that an implementation may model a backplane as a single + physical component, which is actually implemented as multiple + discrete physical components (within a chassis or stack)."; + } + + identity container { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is capable + of containing one or more removable physical entities, + possibly of different types. For example, each (empty or + full) slot in a chassis will be modeled as a container. Note + that all removable physical components should be modeled + within a container component, such as field-replaceable + modules, fans, or power supplies. Note that all known + containers should be modeled by the agent, including empty + containers."; + } + + identity power-supply { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is a + power-supplying component."; + } + + identity fan { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is a fan or + other heat-reduction component."; + } + + identity sensor { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of sensor, such as a temperature sensor within a router + chassis."; + } + + identity module { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of self-contained sub-system. If a module component is + removable, then it should be modeled within a container + + component; otherwise, it should be modeled directly within + another physical component (e.g., a chassis or another + module)."; + } + + identity port { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of networking port capable of receiving and/or transmitting + networking traffic."; + } + + identity stack { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of super-container (possibly virtual) intended to group + together multiple chassis entities. A stack may be realized + by a virtual cable, a real interconnect cable attached to + multiple chassis, or multiple interconnect cables. A stack + should not be modeled within any other physical components, + but a stack may be contained within another stack. Only + chassis components should be contained within a stack."; + } + + identity cpu { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of central processing unit."; + } + + identity energy-object { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of energy object, i.e., it is a piece of equipment that is + part of or attached to a communications network that is + monitored, it is controlled, or it aids in the management of + another device for Energy Management."; + } + + identity battery { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of battery."; + } + + identity storage-drive { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of component with data storage capability as its main + functionality, e.g., hard disk drive (HDD), solid-state device + (SSD), solid-state hybrid drive (SSHD), object storage device + (OSD), or other."; + } +} diff --git a/models/third_party/ietf/iana-if-type.yang b/models/ietf/RFC/iana-if-type.yang similarity index 100% rename from models/third_party/ietf/iana-if-type.yang rename to models/ietf/RFC/iana-if-type.yang diff --git a/models/ietf/RFC/iana-if-type@2014-05-08.yang b/models/ietf/RFC/iana-if-type@2014-05-08.yang new file mode 100644 index 0000000000000000000000000000000000000000..81b217563d0538514f45d5cd04c13d7b319d4aba --- /dev/null +++ b/models/ietf/RFC/iana-if-type@2014-05-08.yang @@ -0,0 +1,1523 @@ +module iana-if-type { + namespace "urn:ietf:params:xml:ns:yang:iana-if-type"; + prefix ianaift; + + import ietf-interfaces { + prefix if; + } + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 4676 Admiralty Way, Suite 330 + Marina del Rey, CA 90292 + + Tel: +1 310 823 9358 + <mailto:iana@iana.org>"; + description + "This YANG module defines YANG identities for IANA-registered + interface types. + + This YANG module is maintained by IANA and reflects the + 'ifType definitions' registry. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 7224; + see the RFC itself for full legal notices."; + reference + "IANA 'ifType definitions' registry. + <http://www.iana.org/assignments/smi-numbers>"; + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + identity iana-interface-type { + base if:interface-type; + description + "This identity is used as a base for all interface types + defined in the 'ifType definitions' registry."; + } + + identity other { + base iana-interface-type; + } + identity regular1822 { + base iana-interface-type; + } + identity hdh1822 { + base iana-interface-type; + } + identity ddnX25 { + base iana-interface-type; + } + identity rfc877x25 { + base iana-interface-type; + reference + "RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer"; + } + identity ethernetCsmacd { + base iana-interface-type; + description + "For all Ethernet-like interfaces, regardless of speed, + as per RFC 3635."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88023Csmacd { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88024TokenBus { + base iana-interface-type; + } + identity iso88025TokenRing { + base iana-interface-type; + } + identity iso88026Man { + base iana-interface-type; + } + identity starLan { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity proteon10Mbit { + base iana-interface-type; + } + identity proteon80Mbit { + base iana-interface-type; + } + identity hyperchannel { + base iana-interface-type; + } + identity fddi { + base iana-interface-type; + reference + "RFC 1512 - FDDI Management Information Base"; + } + identity lapb { + base iana-interface-type; + reference + "RFC 1381 - SNMP MIB Extension for X.25 LAPB"; + } + identity sdlc { + base iana-interface-type; + } + identity ds1 { + base iana-interface-type; + description + "DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity e1 { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + + identity basicISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity primaryISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity propPointToPointSerial { + base iana-interface-type; + description + "Proprietary serial."; + } + identity ppp { + base iana-interface-type; + } + identity softwareLoopback { + base iana-interface-type; + } + identity eon { + base iana-interface-type; + description + "CLNP over IP."; + } + identity ethernet3Mbit { + base iana-interface-type; + } + identity nsip { + base iana-interface-type; + description + "XNS over IP."; + } + identity slip { + base iana-interface-type; + description + "Generic SLIP."; + } + identity ultra { + base iana-interface-type; + description + "Ultra Technologies."; + } + identity ds3 { + base iana-interface-type; + description + "DS3-MIB."; + reference + "RFC 3896 - Definitions of Managed Objects for the + DS3/E3 Interface Type"; + } + identity sip { + base iana-interface-type; + description + "SMDS, coffee."; + reference + "RFC 1694 - Definitions of Managed Objects for SMDS + Interfaces using SMIv2"; + } + identity frameRelay { + base iana-interface-type; + description + "DTE only."; + reference + "RFC 2115 - Management Information Base for Frame Relay + DTEs Using SMIv2"; + } + identity rs232 { + base iana-interface-type; + reference + "RFC 1659 - Definitions of Managed Objects for RS-232-like + Hardware Devices using SMIv2"; + } + identity para { + base iana-interface-type; + description + "Parallel-port."; + reference + "RFC 1660 - Definitions of Managed Objects for + Parallel-printer-like Hardware Devices using + SMIv2"; + } + identity arcnet { + base iana-interface-type; + description + "ARCnet."; + } + identity arcnetPlus { + base iana-interface-type; + description + "ARCnet Plus."; + } + + identity atm { + base iana-interface-type; + description + "ATM cells."; + } + identity miox25 { + base iana-interface-type; + reference + "RFC 1461 - SNMP MIB extension for Multiprotocol + Interconnect over X.25"; + } + identity sonet { + base iana-interface-type; + description + "SONET or SDH."; + } + identity x25ple { + base iana-interface-type; + reference + "RFC 2127 - ISDN Management Information Base using SMIv2"; + } + identity iso88022llc { + base iana-interface-type; + } + identity localTalk { + base iana-interface-type; + } + identity smdsDxi { + base iana-interface-type; + } + identity frameRelayService { + base iana-interface-type; + description + "FRNETSERV-MIB."; + reference + "RFC 2954 - Definitions of Managed Objects for Frame + Relay Service"; + } + identity v35 { + base iana-interface-type; + } + identity hssi { + base iana-interface-type; + } + identity hippi { + base iana-interface-type; + } + + identity modem { + base iana-interface-type; + description + "Generic modem."; + } + identity aal5 { + base iana-interface-type; + description + "AAL5 over ATM."; + } + identity sonetPath { + base iana-interface-type; + } + identity sonetVT { + base iana-interface-type; + } + identity smdsIcip { + base iana-interface-type; + description + "SMDS InterCarrier Interface."; + } + identity propVirtual { + base iana-interface-type; + description + "Proprietary virtual/internal."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity propMultiplexor { + base iana-interface-type; + description + "Proprietary multiplexing."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity ieee80212 { + base iana-interface-type; + description + "100BaseVG."; + } + identity fibreChannel { + base iana-interface-type; + description + "Fibre Channel."; + } + + identity hippiInterface { + base iana-interface-type; + description + "HIPPI interfaces."; + } + identity frameRelayInterconnect { + base iana-interface-type; + status obsolete; + description + "Obsolete; use either + frameRelay(32) or frameRelayService(44)."; + } + identity aflane8023 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.3."; + } + identity aflane8025 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.5."; + } + identity cctEmul { + base iana-interface-type; + description + "ATM Emulated circuit."; + } + identity fastEther { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity isdn { + base iana-interface-type; + description + "ISDN and X.25."; + reference + "RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN + in the Packet Mode"; + } + + identity v11 { + base iana-interface-type; + description + "CCITT V.11/X.21."; + } + identity v36 { + base iana-interface-type; + description + "CCITT V.36."; + } + identity g703at64k { + base iana-interface-type; + description + "CCITT G703 at 64Kbps."; + } + identity g703at2mb { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + } + identity qllc { + base iana-interface-type; + description + "SNA QLLC."; + } + identity fastEtherFX { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity channel { + base iana-interface-type; + description + "Channel."; + } + identity ieee80211 { + base iana-interface-type; + description + "Radio spread spectrum."; + } + identity ibm370parChan { + base iana-interface-type; + description + "IBM System 360/370 OEMI Channel."; + } + identity escon { + base iana-interface-type; + description + "IBM Enterprise Systems Connection."; + } + identity dlsw { + base iana-interface-type; + description + "Data Link Switching."; + } + identity isdns { + base iana-interface-type; + description + "ISDN S/T interface."; + } + identity isdnu { + base iana-interface-type; + description + "ISDN U interface."; + } + identity lapd { + base iana-interface-type; + description + "Link Access Protocol D."; + } + identity ipSwitch { + base iana-interface-type; + description + "IP Switching Objects."; + } + identity rsrb { + base iana-interface-type; + description + "Remote Source Route Bridging."; + } + identity atmLogical { + base iana-interface-type; + description + "ATM Logical Port."; + reference + "RFC 3606 - Definitions of Supplemental Managed Objects + for ATM Interface"; + } + identity ds0 { + base iana-interface-type; + description + "Digital Signal Level 0."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity ds0Bundle { + base iana-interface-type; + description + "Group of ds0s on the same ds1."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity bsc { + base iana-interface-type; + description + "Bisynchronous Protocol."; + } + identity async { + base iana-interface-type; + description + "Asynchronous Protocol."; + } + identity cnr { + base iana-interface-type; + description + "Combat Net Radio."; + } + identity iso88025Dtr { + base iana-interface-type; + description + "ISO 802.5r DTR."; + } + identity eplrs { + base iana-interface-type; + description + "Ext Pos Loc Report Sys."; + } + identity arap { + base iana-interface-type; + description + "Appletalk Remote Access Protocol."; + } + identity propCnls { + base iana-interface-type; + description + "Proprietary Connectionless Protocol."; + } + identity hostPad { + base iana-interface-type; + description + "CCITT-ITU X.29 PAD Protocol."; + } + identity termPad { + base iana-interface-type; + description + "CCITT-ITU X.3 PAD Facility."; + } + identity frameRelayMPI { + base iana-interface-type; + description + "Multiproto Interconnect over FR."; + } + identity x213 { + base iana-interface-type; + description + "CCITT-ITU X213."; + } + identity adsl { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop."; + } + identity radsl { + base iana-interface-type; + description + "Rate-Adapt. Digital Subscriber Loop."; + } + identity sdsl { + base iana-interface-type; + description + "Symmetric Digital Subscriber Loop."; + } + identity vdsl { + base iana-interface-type; + description + "Very H-Speed Digital Subscrib. Loop."; + } + identity iso88025CRFPInt { + base iana-interface-type; + description + "ISO 802.5 CRFP."; + } + identity myrinet { + base iana-interface-type; + description + "Myricom Myrinet."; + } + identity voiceEM { + base iana-interface-type; + description + "Voice recEive and transMit."; + } + identity voiceFXO { + base iana-interface-type; + description + "Voice Foreign Exchange Office."; + } + identity voiceFXS { + base iana-interface-type; + description + "Voice Foreign Exchange Station."; + } + identity voiceEncap { + base iana-interface-type; + description + "Voice encapsulation."; + } + identity voiceOverIp { + base iana-interface-type; + description + "Voice over IP encapsulation."; + } + identity atmDxi { + base iana-interface-type; + description + "ATM DXI."; + } + identity atmFuni { + base iana-interface-type; + description + "ATM FUNI."; + } + identity atmIma { + base iana-interface-type; + description + "ATM IMA."; + } + identity pppMultilinkBundle { + base iana-interface-type; + description + "PPP Multilink Bundle."; + } + identity ipOverCdlc { + base iana-interface-type; + description + "IBM ipOverCdlc."; + } + identity ipOverClaw { + base iana-interface-type; + description + "IBM Common Link Access to Workstn."; + } + identity stackToStack { + base iana-interface-type; + description + "IBM stackToStack."; + } + identity virtualIpAddress { + base iana-interface-type; + description + "IBM VIPA."; + } + identity mpc { + base iana-interface-type; + description + "IBM multi-protocol channel support."; + } + identity ipOverAtm { + base iana-interface-type; + description + "IBM ipOverAtm."; + reference + "RFC 2320 - Definitions of Managed Objects for Classical IP + and ARP Over ATM Using SMIv2 (IPOA-MIB)"; + } + identity iso88025Fiber { + base iana-interface-type; + description + "ISO 802.5j Fiber Token Ring."; + } + identity tdlc { + base iana-interface-type; + description + "IBM twinaxial data link control."; + } + identity gigabitEthernet { + base iana-interface-type; + status deprecated; + + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity hdlc { + base iana-interface-type; + description + "HDLC."; + } + identity lapf { + base iana-interface-type; + description + "LAP F."; + } + identity v37 { + base iana-interface-type; + description + "V.37."; + } + identity x25mlp { + base iana-interface-type; + description + "Multi-Link Protocol."; + } + identity x25huntGroup { + base iana-interface-type; + description + "X25 Hunt Group."; + } + identity transpHdlc { + base iana-interface-type; + description + "Transp HDLC."; + } + identity interleave { + base iana-interface-type; + description + "Interleave channel."; + } + identity fast { + base iana-interface-type; + description + "Fast channel."; + } + + identity ip { + base iana-interface-type; + description + "IP (for APPN HPR in IP networks)."; + } + identity docsCableMaclayer { + base iana-interface-type; + description + "CATV Mac Layer."; + } + identity docsCableDownstream { + base iana-interface-type; + description + "CATV Downstream interface."; + } + identity docsCableUpstream { + base iana-interface-type; + description + "CATV Upstream interface."; + } + identity a12MppSwitch { + base iana-interface-type; + description + "Avalon Parallel Processor."; + } + identity tunnel { + base iana-interface-type; + description + "Encapsulation interface."; + } + identity coffee { + base iana-interface-type; + description + "Coffee pot."; + reference + "RFC 2325 - Coffee MIB"; + } + identity ces { + base iana-interface-type; + description + "Circuit Emulation Service."; + } + identity atmSubInterface { + base iana-interface-type; + description + "ATM Sub Interface."; + } + + identity l2vlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using 802.1Q."; + } + identity l3ipvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IP."; + } + identity l3ipxvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IPX."; + } + identity digitalPowerline { + base iana-interface-type; + description + "IP over Power Lines."; + } + identity mediaMailOverIp { + base iana-interface-type; + description + "Multimedia Mail over IP."; + } + identity dtm { + base iana-interface-type; + description + "Dynamic synchronous Transfer Mode."; + } + identity dcn { + base iana-interface-type; + description + "Data Communications Network."; + } + identity ipForward { + base iana-interface-type; + description + "IP Forwarding Interface."; + } + identity msdsl { + base iana-interface-type; + description + "Multi-rate Symmetric DSL."; + } + identity ieee1394 { + base iana-interface-type; + + description + "IEEE1394 High Performance Serial Bus."; + } + identity if-gsn { + base iana-interface-type; + description + "HIPPI-6400."; + } + identity dvbRccMacLayer { + base iana-interface-type; + description + "DVB-RCC MAC Layer."; + } + identity dvbRccDownstream { + base iana-interface-type; + description + "DVB-RCC Downstream Channel."; + } + identity dvbRccUpstream { + base iana-interface-type; + description + "DVB-RCC Upstream Channel."; + } + identity atmVirtual { + base iana-interface-type; + description + "ATM Virtual Interface."; + } + identity mplsTunnel { + base iana-interface-type; + description + "MPLS Tunnel Virtual Interface."; + } + identity srp { + base iana-interface-type; + description + "Spatial Reuse Protocol."; + } + identity voiceOverAtm { + base iana-interface-type; + description + "Voice over ATM."; + } + identity voiceOverFrameRelay { + base iana-interface-type; + description + "Voice Over Frame Relay."; + } + identity idsl { + base iana-interface-type; + description + "Digital Subscriber Loop over ISDN."; + } + identity compositeLink { + base iana-interface-type; + description + "Avici Composite Link Interface."; + } + identity ss7SigLink { + base iana-interface-type; + description + "SS7 Signaling Link."; + } + identity propWirelessP2P { + base iana-interface-type; + description + "Prop. P2P wireless interface."; + } + identity frForward { + base iana-interface-type; + description + "Frame Forward Interface."; + } + identity rfc1483 { + base iana-interface-type; + description + "Multiprotocol over ATM AAL5."; + reference + "RFC 1483 - Multiprotocol Encapsulation over ATM + Adaptation Layer 5"; + } + identity usb { + base iana-interface-type; + description + "USB Interface."; + } + identity ieee8023adLag { + base iana-interface-type; + description + "IEEE 802.3ad Link Aggregate."; + } + identity bgppolicyaccounting { + base iana-interface-type; + description + "BGP Policy Accounting."; + } + identity frf16MfrBundle { + base iana-interface-type; + description + "FRF.16 Multilink Frame Relay."; + } + identity h323Gatekeeper { + base iana-interface-type; + description + "H323 Gatekeeper."; + } + identity h323Proxy { + base iana-interface-type; + description + "H323 Voice and Video Proxy."; + } + identity mpls { + base iana-interface-type; + description + "MPLS."; + } + identity mfSigLink { + base iana-interface-type; + description + "Multi-frequency signaling link."; + } + identity hdsl2 { + base iana-interface-type; + description + "High Bit-Rate DSL - 2nd generation."; + } + identity shdsl { + base iana-interface-type; + description + "Multirate HDSL2."; + } + identity ds1FDL { + base iana-interface-type; + description + "Facility Data Link (4Kbps) on a DS1."; + } + identity pos { + base iana-interface-type; + description + "Packet over SONET/SDH Interface."; + } + + identity dvbAsiIn { + base iana-interface-type; + description + "DVB-ASI Input."; + } + identity dvbAsiOut { + base iana-interface-type; + description + "DVB-ASI Output."; + } + identity plc { + base iana-interface-type; + description + "Power Line Communications."; + } + identity nfas { + base iana-interface-type; + description + "Non-Facility Associated Signaling."; + } + identity tr008 { + base iana-interface-type; + description + "TR008."; + } + identity gr303RDT { + base iana-interface-type; + description + "Remote Digital Terminal."; + } + identity gr303IDT { + base iana-interface-type; + description + "Integrated Digital Terminal."; + } + identity isup { + base iana-interface-type; + description + "ISUP."; + } + identity propDocsWirelessMaclayer { + base iana-interface-type; + description + "Cisco proprietary Maclayer."; + } + + identity propDocsWirelessDownstream { + base iana-interface-type; + description + "Cisco proprietary Downstream."; + } + identity propDocsWirelessUpstream { + base iana-interface-type; + description + "Cisco proprietary Upstream."; + } + identity hiperlan2 { + base iana-interface-type; + description + "HIPERLAN Type 2 Radio Interface."; + } + identity propBWAp2Mp { + base iana-interface-type; + description + "PropBroadbandWirelessAccesspt2Multipt (use of this value + for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f + is deprecated, and ieee80216WMAN(237) should be used + instead)."; + } + identity sonetOverheadChannel { + base iana-interface-type; + description + "SONET Overhead Channel."; + } + identity digitalWrapperOverheadChannel { + base iana-interface-type; + description + "Digital Wrapper."; + } + identity aal2 { + base iana-interface-type; + description + "ATM adaptation layer 2."; + } + identity radioMAC { + base iana-interface-type; + description + "MAC layer over radio links."; + } + identity atmRadio { + base iana-interface-type; + description + "ATM over radio links."; + } + identity imt { + base iana-interface-type; + description + "Inter-Machine Trunks."; + } + identity mvl { + base iana-interface-type; + description + "Multiple Virtual Lines DSL."; + } + identity reachDSL { + base iana-interface-type; + description + "Long Reach DSL."; + } + identity frDlciEndPt { + base iana-interface-type; + description + "Frame Relay DLCI End Point."; + } + identity atmVciEndPt { + base iana-interface-type; + description + "ATM VCI End Point."; + } + identity opticalChannel { + base iana-interface-type; + description + "Optical Channel."; + } + identity opticalTransport { + base iana-interface-type; + description + "Optical Transport."; + } + identity propAtm { + base iana-interface-type; + description + "Proprietary ATM."; + } + identity voiceOverCable { + base iana-interface-type; + description + "Voice Over Cable Interface."; + } + + identity infiniband { + base iana-interface-type; + description + "Infiniband."; + } + identity teLink { + base iana-interface-type; + description + "TE Link."; + } + identity q2931 { + base iana-interface-type; + description + "Q.2931."; + } + identity virtualTg { + base iana-interface-type; + description + "Virtual Trunk Group."; + } + identity sipTg { + base iana-interface-type; + description + "SIP Trunk Group."; + } + identity sipSig { + base iana-interface-type; + description + "SIP Signaling."; + } + identity docsCableUpstreamChannel { + base iana-interface-type; + description + "CATV Upstream Channel."; + } + identity econet { + base iana-interface-type; + description + "Acorn Econet."; + } + identity pon155 { + base iana-interface-type; + description + "FSAN 155Mb Symetrical PON interface."; + } + + identity pon622 { + base iana-interface-type; + description + "FSAN 622Mb Symetrical PON interface."; + } + identity bridge { + base iana-interface-type; + description + "Transparent bridge interface."; + } + identity linegroup { + base iana-interface-type; + description + "Interface common to multiple lines."; + } + identity voiceEMFGD { + base iana-interface-type; + description + "Voice E&M Feature Group D."; + } + identity voiceFGDEANA { + base iana-interface-type; + description + "Voice FGD Exchange Access North American."; + } + identity voiceDID { + base iana-interface-type; + description + "Voice Direct Inward Dialing."; + } + identity mpegTransport { + base iana-interface-type; + description + "MPEG transport interface."; + } + identity sixToFour { + base iana-interface-type; + status deprecated; + description + "6to4 interface (DEPRECATED)."; + reference + "RFC 4087 - IP Tunnel MIB"; + } + identity gtp { + base iana-interface-type; + description + "GTP (GPRS Tunneling Protocol)."; + } + identity pdnEtherLoop1 { + base iana-interface-type; + description + "Paradyne EtherLoop 1."; + } + identity pdnEtherLoop2 { + base iana-interface-type; + description + "Paradyne EtherLoop 2."; + } + identity opticalChannelGroup { + base iana-interface-type; + description + "Optical Channel Group."; + } + identity homepna { + base iana-interface-type; + description + "HomePNA ITU-T G.989."; + } + identity gfp { + base iana-interface-type; + description + "Generic Framing Procedure (GFP)."; + } + identity ciscoISLvlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using Cisco ISL."; + } + identity actelisMetaLOOP { + base iana-interface-type; + description + "Acteleis proprietary MetaLOOP High Speed Link."; + } + identity fcipLink { + base iana-interface-type; + description + "FCIP Link."; + } + identity rpr { + base iana-interface-type; + description + "Resilient Packet Ring Interface Type."; + } + + identity qam { + base iana-interface-type; + description + "RF Qam Interface."; + } + identity lmp { + base iana-interface-type; + description + "Link Management Protocol."; + reference + "RFC 4327 - Link Management Protocol (LMP) Management + Information Base (MIB)"; + } + identity cblVectaStar { + base iana-interface-type; + description + "Cambridge Broadband Networks Limited VectaStar."; + } + identity docsCableMCmtsDownstream { + base iana-interface-type; + description + "CATV Modular CMTS Downstream Interface."; + } + identity adsl2 { + base iana-interface-type; + status deprecated; + description + "Asymmetric Digital Subscriber Loop Version 2 + (DEPRECATED/OBSOLETED - please use adsl2plus(238) + instead)."; + reference + "RFC 4706 - Definitions of Managed Objects for Asymmetric + Digital Subscriber Line 2 (ADSL2)"; + } + identity macSecControlledIF { + base iana-interface-type; + description + "MACSecControlled."; + } + identity macSecUncontrolledIF { + base iana-interface-type; + description + "MACSecUncontrolled."; + } + identity aviciOpticalEther { + base iana-interface-type; + description + "Avici Optical Ethernet Aggregate."; + } + identity atmbond { + base iana-interface-type; + description + "atmbond."; + } + identity voiceFGDOS { + base iana-interface-type; + description + "Voice FGD Operator Services."; + } + identity mocaVersion1 { + base iana-interface-type; + description + "MultiMedia over Coax Alliance (MoCA) Interface + as documented in information provided privately to IANA."; + } + identity ieee80216WMAN { + base iana-interface-type; + description + "IEEE 802.16 WMAN interface."; + } + identity adsl2plus { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop Version 2 - + Version 2 Plus and all variants."; + } + identity dvbRcsMacLayer { + base iana-interface-type; + description + "DVB-RCS MAC Layer."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbTdm { + base iana-interface-type; + description + "DVB Satellite TDM."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbRcsTdma { + base iana-interface-type; + description + "DVB-RCS TDMA."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity x86Laps { + base iana-interface-type; + description + "LAPS based on ITU-T X.86/Y.1323."; + } + identity wwanPP { + base iana-interface-type; + description + "3GPP WWAN."; + } + identity wwanPP2 { + base iana-interface-type; + description + "3GPP2 WWAN."; + } + identity voiceEBS { + base iana-interface-type; + description + "Voice P-phone EBS physical interface."; + } + identity ifPwType { + base iana-interface-type; + description + "Pseudowire interface type."; + reference + "RFC 5601 - Pseudowire (PW) Management Information Base (MIB)"; + } + identity ilan { + base iana-interface-type; + description + "Internal LAN on a bridge per IEEE 802.1ap."; + } + identity pip { + base iana-interface-type; + description + "Provider Instance Port on a bridge per IEEE 802.1ah PBB."; + } + identity aluELP { + base iana-interface-type; + description + "Alcatel-Lucent Ethernet Link Protection."; + } + identity gpon { + base iana-interface-type; + description + "Gigabit-capable passive optical networks (G-PON) as per + ITU-T G.948."; + } + identity vdsl2 { + base iana-interface-type; + description + "Very high speed digital subscriber line Version 2 + (as per ITU-T Recommendation G.993.2)."; + reference + "RFC 5650 - Definitions of Managed Objects for Very High + Speed Digital Subscriber Line 2 (VDSL2)"; + } + identity capwapDot11Profile { + base iana-interface-type; + description + "WLAN Profile Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapDot11Bss { + base iana-interface-type; + description + "WLAN BSS Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapWtpVirtualRadio { + base iana-interface-type; + description + "WTP Virtual Radio Interface."; + reference + "RFC 5833 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Base MIB"; + } + identity bits { + base iana-interface-type; + description + "bitsport."; + } + identity docsCableUpstreamRfPort { + base iana-interface-type; + description + "DOCSIS CATV Upstream RF Port."; + } + + identity cableDownstreamRfPort { + base iana-interface-type; + description + "CATV downstream RF Port."; + } + identity vmwareVirtualNic { + base iana-interface-type; + description + "VMware Virtual Network Interface."; + } + identity ieee802154 { + base iana-interface-type; + description + "IEEE 802.15.4 WPAN interface."; + reference + "IEEE 802.15.4-2006"; + } + identity otnOdu { + base iana-interface-type; + description + "OTN Optical Data Unit."; + } + identity otnOtu { + base iana-interface-type; + description + "OTN Optical channel Transport Unit."; + } + identity ifVfiType { + base iana-interface-type; + description + "VPLS Forwarding Instance Interface Type."; + } + identity g9981 { + base iana-interface-type; + description + "G.998.1 bonded interface."; + } + identity g9982 { + base iana-interface-type; + description + "G.998.2 bonded interface."; + } + identity g9983 { + base iana-interface-type; + description + "G.998.3 bonded interface."; + } + + identity aluEpon { + base iana-interface-type; + description + "Ethernet Passive Optical Networks (E-PON)."; + } + identity aluEponOnu { + base iana-interface-type; + description + "EPON Optical Network Unit."; + } + identity aluEponPhysicalUni { + base iana-interface-type; + description + "EPON physical User to Network interface."; + } + identity aluEponLogicalLink { + base iana-interface-type; + description + "The emulation of a point-to-point link over the EPON + layer."; + } + identity aluGponOnu { + base iana-interface-type; + description + "GPON Optical Network Unit."; + reference + "ITU-T G.984.2"; + } + identity aluGponPhysicalUni { + base iana-interface-type; + description + "GPON physical User to Network interface."; + reference + "ITU-T G.984.2"; + } + identity vmwareNicTeam { + base iana-interface-type; + description + "VMware NIC Team."; + } +} diff --git a/models/ietf/RFC/iana-if-type@2017-01-19.yang b/models/ietf/RFC/iana-if-type@2017-01-19.yang new file mode 100644 index 0000000000000000000000000000000000000000..7bfee36478edc7c65677cfe48b2630bffff791cb --- /dev/null +++ b/models/ietf/RFC/iana-if-type@2017-01-19.yang @@ -0,0 +1,1619 @@ +module iana-if-type { + namespace "urn:ietf:params:xml:ns:yang:iana-if-type"; + prefix ianaift; + + import ietf-interfaces { + prefix if; + } + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States + + Tel: +1 310 301 5800 + <mailto:iana&iana.org>"; + description + "This YANG module defines YANG identities for IANA-registered + interface types. + + This YANG module is maintained by IANA and reflects the + 'ifType definitions' registry. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana&iana.org). + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 7224; + see the RFC itself for full legal notices."; + reference + "IANA 'ifType definitions' registry. + <http://www.iana.org/assignments/smi-numbers>"; + + revision 2017-01-19 { + description + "Registered ifType 289."; + } + + revision 2016-11-23 { + description + "Registered ifTypes 283-288."; + } + + revision 2016-06-09 { + description + "Registered ifType 282."; + } + revision 2016-05-03 { + description + "Registered ifType 281."; + } + revision 2015-06-12 { + description + "Corrected formatting issue."; + } + revision 2014-09-24 { + description + "Registered ifType 280."; + } + revision 2014-09-19 { + description + "Registered ifType 279."; + } + revision 2014-07-03 { + description + "Registered ifTypes 277-278."; + } + revision 2014-05-19 { + description + "Updated the contact address."; + } + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + identity iana-interface-type { + base if:interface-type; + description + "This identity is used as a base for all interface types + defined in the 'ifType definitions' registry."; + } + + identity other { + base iana-interface-type; + } + identity regular1822 { + base iana-interface-type; + } + identity hdh1822 { + base iana-interface-type; + } + identity ddnX25 { + base iana-interface-type; + } + identity rfc877x25 { + base iana-interface-type; + reference + "RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer"; + } + identity ethernetCsmacd { + base iana-interface-type; + description + "For all Ethernet-like interfaces, regardless of speed, + as per RFC 3635."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88023Csmacd { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88024TokenBus { + base iana-interface-type; + } + identity iso88025TokenRing { + base iana-interface-type; + } + identity iso88026Man { + base iana-interface-type; + } + identity starLan { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity proteon10Mbit { + base iana-interface-type; + } + identity proteon80Mbit { + base iana-interface-type; + } + identity hyperchannel { + base iana-interface-type; + } + identity fddi { + base iana-interface-type; + reference + "RFC 1512 - FDDI Management Information Base"; + } + identity lapb { + base iana-interface-type; + reference + "RFC 1381 - SNMP MIB Extension for X.25 LAPB"; + } + identity sdlc { + base iana-interface-type; + } + identity ds1 { + base iana-interface-type; + description + "DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity e1 { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity basicISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity primaryISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity propPointToPointSerial { + base iana-interface-type; + description + "Proprietary serial."; + } + identity ppp { + base iana-interface-type; + } + identity softwareLoopback { + base iana-interface-type; + } + identity eon { + base iana-interface-type; + description + "CLNP over IP."; + } + identity ethernet3Mbit { + base iana-interface-type; + } + identity nsip { + base iana-interface-type; + description + "XNS over IP."; + } + identity slip { + base iana-interface-type; + description + "Generic SLIP."; + } + identity ultra { + base iana-interface-type; + description + "Ultra Technologies."; + } + identity ds3 { + base iana-interface-type; + description + "DS3-MIB."; + reference + "RFC 3896 - Definitions of Managed Objects for the + DS3/E3 Interface Type"; + } + identity sip { + base iana-interface-type; + description + "SMDS, coffee."; + reference + "RFC 1694 - Definitions of Managed Objects for SMDS + Interfaces using SMIv2"; + } + identity frameRelay { + base iana-interface-type; + description + "DTE only."; + reference + "RFC 2115 - Management Information Base for Frame Relay + DTEs Using SMIv2"; + } + identity rs232 { + base iana-interface-type; + reference + "RFC 1659 - Definitions of Managed Objects for RS-232-like + Hardware Devices using SMIv2"; + } + identity para { + base iana-interface-type; + description + "Parallel-port."; + reference + "RFC 1660 - Definitions of Managed Objects for + Parallel-printer-like Hardware Devices using + SMIv2"; + } + identity arcnet { + base iana-interface-type; + description + "ARCnet."; + } + identity arcnetPlus { + base iana-interface-type; + description + "ARCnet Plus."; + } + identity atm { + base iana-interface-type; + description + "ATM cells."; + } + identity miox25 { + base iana-interface-type; + reference + "RFC 1461 - SNMP MIB extension for Multiprotocol + Interconnect over X.25"; + } + identity sonet { + base iana-interface-type; + description + "SONET or SDH."; + } + identity x25ple { + base iana-interface-type; + reference + "RFC 2127 - ISDN Management Information Base using SMIv2"; + } + identity iso88022llc { + base iana-interface-type; + } + identity localTalk { + base iana-interface-type; + } + identity smdsDxi { + base iana-interface-type; + } + identity frameRelayService { + base iana-interface-type; + description + "FRNETSERV-MIB."; + reference + "RFC 2954 - Definitions of Managed Objects for Frame + Relay Service"; + } + identity v35 { + base iana-interface-type; + } + identity hssi { + base iana-interface-type; + } + identity hippi { + base iana-interface-type; + } + identity modem { + base iana-interface-type; + description + "Generic modem."; + } + identity aal5 { + base iana-interface-type; + description + "AAL5 over ATM."; + } + identity sonetPath { + base iana-interface-type; + } + identity sonetVT { + base iana-interface-type; + } + identity smdsIcip { + base iana-interface-type; + description + "SMDS InterCarrier Interface."; + } + identity propVirtual { + base iana-interface-type; + description + "Proprietary virtual/internal."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity propMultiplexor { + base iana-interface-type; + description + "Proprietary multiplexing."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity ieee80212 { + base iana-interface-type; + description + "100BaseVG."; + } + identity fibreChannel { + base iana-interface-type; + description + "Fibre Channel."; + } + identity hippiInterface { + base iana-interface-type; + description + "HIPPI interfaces."; + } + identity frameRelayInterconnect { + base iana-interface-type; + status obsolete; + description + "Obsolete; use either + frameRelay(32) or frameRelayService(44)."; + } + identity aflane8023 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.3."; + } + identity aflane8025 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.5."; + } + identity cctEmul { + base iana-interface-type; + description + "ATM Emulated circuit."; + } + identity fastEther { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity isdn { + base iana-interface-type; + description + "ISDN and X.25."; + reference + "RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN + in the Packet Mode"; + } + identity v11 { + base iana-interface-type; + description + "CCITT V.11/X.21."; + } + identity v36 { + base iana-interface-type; + description + "CCITT V.36."; + } + identity g703at64k { + base iana-interface-type; + description + "CCITT G703 at 64Kbps."; + } + identity g703at2mb { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + } + identity qllc { + base iana-interface-type; + description + "SNA QLLC."; + } + identity fastEtherFX { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity channel { + base iana-interface-type; + description + "Channel."; + } + identity ieee80211 { + base iana-interface-type; + description + "Radio spread spectrum."; + } + identity ibm370parChan { + base iana-interface-type; + description + "IBM System 360/370 OEMI Channel."; + } + identity escon { + base iana-interface-type; + description + "IBM Enterprise Systems Connection."; + } + identity dlsw { + base iana-interface-type; + description + "Data Link Switching."; + } + identity isdns { + base iana-interface-type; + description + "ISDN S/T interface."; + } + identity isdnu { + base iana-interface-type; + description + "ISDN U interface."; + } + identity lapd { + base iana-interface-type; + description + "Link Access Protocol D."; + } + identity ipSwitch { + base iana-interface-type; + description + "IP Switching Objects."; + } + identity rsrb { + base iana-interface-type; + description + "Remote Source Route Bridging."; + } + identity atmLogical { + base iana-interface-type; + description + "ATM Logical Port."; + reference + "RFC 3606 - Definitions of Supplemental Managed Objects + for ATM Interface"; + } + identity ds0 { + base iana-interface-type; + description + "Digital Signal Level 0."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity ds0Bundle { + base iana-interface-type; + description + "Group of ds0s on the same ds1."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity bsc { + base iana-interface-type; + description + "Bisynchronous Protocol."; + } + identity async { + base iana-interface-type; + description + "Asynchronous Protocol."; + } + identity cnr { + base iana-interface-type; + description + "Combat Net Radio."; + } + identity iso88025Dtr { + base iana-interface-type; + description + "ISO 802.5r DTR."; + } + identity eplrs { + base iana-interface-type; + description + "Ext Pos Loc Report Sys."; + } + identity arap { + base iana-interface-type; + description + "Appletalk Remote Access Protocol."; + } + identity propCnls { + base iana-interface-type; + description + "Proprietary Connectionless Protocol."; + } + identity hostPad { + base iana-interface-type; + description + "CCITT-ITU X.29 PAD Protocol."; + } + identity termPad { + base iana-interface-type; + description + "CCITT-ITU X.3 PAD Facility."; + } + identity frameRelayMPI { + base iana-interface-type; + description + "Multiproto Interconnect over FR."; + } + identity x213 { + base iana-interface-type; + description + "CCITT-ITU X213."; + } + identity adsl { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop."; + } + identity radsl { + base iana-interface-type; + description + "Rate-Adapt. Digital Subscriber Loop."; + } + identity sdsl { + base iana-interface-type; + description + "Symmetric Digital Subscriber Loop."; + } + identity vdsl { + base iana-interface-type; + description + "Very H-Speed Digital Subscrib. Loop."; + } + identity iso88025CRFPInt { + base iana-interface-type; + description + "ISO 802.5 CRFP."; + } + identity myrinet { + base iana-interface-type; + description + "Myricom Myrinet."; + } + identity voiceEM { + base iana-interface-type; + description + "Voice recEive and transMit."; + } + identity voiceFXO { + base iana-interface-type; + description + "Voice Foreign Exchange Office."; + } + identity voiceFXS { + base iana-interface-type; + description + "Voice Foreign Exchange Station."; + } + identity voiceEncap { + base iana-interface-type; + description + "Voice encapsulation."; + } + identity voiceOverIp { + base iana-interface-type; + description + "Voice over IP encapsulation."; + } + identity atmDxi { + base iana-interface-type; + description + "ATM DXI."; + } + identity atmFuni { + base iana-interface-type; + description + "ATM FUNI."; + } + identity atmIma { + base iana-interface-type; + description + "ATM IMA."; + } + identity pppMultilinkBundle { + base iana-interface-type; + description + "PPP Multilink Bundle."; + } + identity ipOverCdlc { + base iana-interface-type; + description + "IBM ipOverCdlc."; + } + identity ipOverClaw { + base iana-interface-type; + description + "IBM Common Link Access to Workstn."; + } + identity stackToStack { + base iana-interface-type; + description + "IBM stackToStack."; + } + identity virtualIpAddress { + base iana-interface-type; + description + "IBM VIPA."; + } + identity mpc { + base iana-interface-type; + description + "IBM multi-protocol channel support."; + } + identity ipOverAtm { + base iana-interface-type; + description + "IBM ipOverAtm."; + reference + "RFC 2320 - Definitions of Managed Objects for Classical IP + and ARP Over ATM Using SMIv2 (IPOA-MIB)"; + } + identity iso88025Fiber { + base iana-interface-type; + description + "ISO 802.5j Fiber Token Ring."; + } + identity tdlc { + base iana-interface-type; + description + "IBM twinaxial data link control."; + } + identity gigabitEthernet { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity hdlc { + base iana-interface-type; + description + "HDLC."; + } + identity lapf { + base iana-interface-type; + description + "LAP F."; + } + identity v37 { + base iana-interface-type; + description + "V.37."; + } + identity x25mlp { + base iana-interface-type; + description + "Multi-Link Protocol."; + } + identity x25huntGroup { + base iana-interface-type; + description + "X25 Hunt Group."; + } + identity transpHdlc { + base iana-interface-type; + description + "Transp HDLC."; + } + identity interleave { + base iana-interface-type; + description + "Interleave channel."; + } + identity fast { + base iana-interface-type; + description + "Fast channel."; + } + identity ip { + base iana-interface-type; + description + "IP (for APPN HPR in IP networks)."; + } + identity docsCableMaclayer { + base iana-interface-type; + description + "CATV Mac Layer."; + } + identity docsCableDownstream { + base iana-interface-type; + description + "CATV Downstream interface."; + } + identity docsCableUpstream { + base iana-interface-type; + description + "CATV Upstream interface."; + } + identity a12MppSwitch { + base iana-interface-type; + description + "Avalon Parallel Processor."; + } + identity tunnel { + base iana-interface-type; + description + "Encapsulation interface."; + } + identity coffee { + base iana-interface-type; + description + "Coffee pot."; + reference + "RFC 2325 - Coffee MIB"; + } + identity ces { + base iana-interface-type; + description + "Circuit Emulation Service."; + } + identity atmSubInterface { + base iana-interface-type; + description + "ATM Sub Interface."; + } + identity l2vlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using 802.1Q."; + } + identity l3ipvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IP."; + } + identity l3ipxvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IPX."; + } + identity digitalPowerline { + base iana-interface-type; + description + "IP over Power Lines."; + } + identity mediaMailOverIp { + base iana-interface-type; + description + "Multimedia Mail over IP."; + } + identity dtm { + base iana-interface-type; + description + "Dynamic synchronous Transfer Mode."; + } + identity dcn { + base iana-interface-type; + description + "Data Communications Network."; + } + identity ipForward { + base iana-interface-type; + description + "IP Forwarding Interface."; + } + identity msdsl { + base iana-interface-type; + description + "Multi-rate Symmetric DSL."; + } + identity ieee1394 { + base iana-interface-type; + + description + "IEEE1394 High Performance Serial Bus."; + } + identity if-gsn { + base iana-interface-type; + description + "HIPPI-6400."; + } + identity dvbRccMacLayer { + base iana-interface-type; + description + "DVB-RCC MAC Layer."; + } + identity dvbRccDownstream { + base iana-interface-type; + description + "DVB-RCC Downstream Channel."; + } + identity dvbRccUpstream { + base iana-interface-type; + description + "DVB-RCC Upstream Channel."; + } + identity atmVirtual { + base iana-interface-type; + description + "ATM Virtual Interface."; + } + identity mplsTunnel { + base iana-interface-type; + description + "MPLS Tunnel Virtual Interface."; + } + identity srp { + base iana-interface-type; + description + "Spatial Reuse Protocol."; + } + identity voiceOverAtm { + base iana-interface-type; + description + "Voice over ATM."; + } + identity voiceOverFrameRelay { + base iana-interface-type; + description + "Voice Over Frame Relay."; + } + identity idsl { + base iana-interface-type; + description + "Digital Subscriber Loop over ISDN."; + } + identity compositeLink { + base iana-interface-type; + description + "Avici Composite Link Interface."; + } + identity ss7SigLink { + base iana-interface-type; + description + "SS7 Signaling Link."; + } + identity propWirelessP2P { + base iana-interface-type; + description + "Prop. P2P wireless interface."; + } + identity frForward { + base iana-interface-type; + description + "Frame Forward Interface."; + } + identity rfc1483 { + base iana-interface-type; + description + "Multiprotocol over ATM AAL5."; + reference + "RFC 1483 - Multiprotocol Encapsulation over ATM + Adaptation Layer 5"; + } + identity usb { + base iana-interface-type; + description + "USB Interface."; + } + identity ieee8023adLag { + base iana-interface-type; + description + "IEEE 802.3ad Link Aggregate."; + } + identity bgppolicyaccounting { + base iana-interface-type; + description + "BGP Policy Accounting."; + } + identity frf16MfrBundle { + base iana-interface-type; + description + "FRF.16 Multilink Frame Relay."; + } + identity h323Gatekeeper { + base iana-interface-type; + description + "H323 Gatekeeper."; + } + identity h323Proxy { + base iana-interface-type; + description + "H323 Voice and Video Proxy."; + } + identity mpls { + base iana-interface-type; + description + "MPLS."; + } + identity mfSigLink { + base iana-interface-type; + description + "Multi-frequency signaling link."; + } + identity hdsl2 { + base iana-interface-type; + description + "High Bit-Rate DSL - 2nd generation."; + } + identity shdsl { + base iana-interface-type; + description + "Multirate HDSL2."; + } + identity ds1FDL { + base iana-interface-type; + description + "Facility Data Link (4Kbps) on a DS1."; + } + identity pos { + base iana-interface-type; + description + "Packet over SONET/SDH Interface."; + } + identity dvbAsiIn { + base iana-interface-type; + description + "DVB-ASI Input."; + } + identity dvbAsiOut { + base iana-interface-type; + description + "DVB-ASI Output."; + } + identity plc { + base iana-interface-type; + description + "Power Line Communications."; + } + identity nfas { + base iana-interface-type; + description + "Non-Facility Associated Signaling."; + } + identity tr008 { + base iana-interface-type; + description + "TR008."; + } + identity gr303RDT { + base iana-interface-type; + description + "Remote Digital Terminal."; + } + identity gr303IDT { + base iana-interface-type; + description + "Integrated Digital Terminal."; + } + identity isup { + base iana-interface-type; + description + "ISUP."; + } + identity propDocsWirelessMaclayer { + base iana-interface-type; + description + "Cisco proprietary Maclayer."; + } + identity propDocsWirelessDownstream { + base iana-interface-type; + description + "Cisco proprietary Downstream."; + } + identity propDocsWirelessUpstream { + base iana-interface-type; + description + "Cisco proprietary Upstream."; + } + identity hiperlan2 { + base iana-interface-type; + description + "HIPERLAN Type 2 Radio Interface."; + } + identity propBWAp2Mp { + base iana-interface-type; + description + "PropBroadbandWirelessAccesspt2Multipt (use of this value + for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f + is deprecated, and ieee80216WMAN(237) should be used + instead)."; + } + identity sonetOverheadChannel { + base iana-interface-type; + description + "SONET Overhead Channel."; + } + identity digitalWrapperOverheadChannel { + base iana-interface-type; + description + "Digital Wrapper."; + } + identity aal2 { + base iana-interface-type; + description + "ATM adaptation layer 2."; + } + identity radioMAC { + base iana-interface-type; + description + "MAC layer over radio links."; + } + identity atmRadio { + base iana-interface-type; + description + "ATM over radio links."; + } + identity imt { + base iana-interface-type; + description + "Inter-Machine Trunks."; + } + identity mvl { + base iana-interface-type; + description + "Multiple Virtual Lines DSL."; + } + identity reachDSL { + base iana-interface-type; + description + "Long Reach DSL."; + } + identity frDlciEndPt { + base iana-interface-type; + description + "Frame Relay DLCI End Point."; + } + identity atmVciEndPt { + base iana-interface-type; + description + "ATM VCI End Point."; + } + identity opticalChannel { + base iana-interface-type; + description + "Optical Channel."; + } + identity opticalTransport { + base iana-interface-type; + description + "Optical Transport."; + } + identity propAtm { + base iana-interface-type; + description + "Proprietary ATM."; + } + identity voiceOverCable { + base iana-interface-type; + description + "Voice Over Cable Interface."; + } + identity infiniband { + base iana-interface-type; + description + "Infiniband."; + } + identity teLink { + base iana-interface-type; + description + "TE Link."; + } + identity q2931 { + base iana-interface-type; + description + "Q.2931."; + } + identity virtualTg { + base iana-interface-type; + description + "Virtual Trunk Group."; + } + identity sipTg { + base iana-interface-type; + description + "SIP Trunk Group."; + } + identity sipSig { + base iana-interface-type; + description + "SIP Signaling."; + } + identity docsCableUpstreamChannel { + base iana-interface-type; + description + "CATV Upstream Channel."; + } + identity econet { + base iana-interface-type; + description + "Acorn Econet."; + } + identity pon155 { + base iana-interface-type; + description + "FSAN 155Mb Symetrical PON interface."; + } + identity pon622 { + base iana-interface-type; + description + "FSAN 622Mb Symetrical PON interface."; + } + identity bridge { + base iana-interface-type; + description + "Transparent bridge interface."; + } + identity linegroup { + base iana-interface-type; + description + "Interface common to multiple lines."; + } + identity voiceEMFGD { + base iana-interface-type; + description + "Voice E&M Feature Group D."; + } + identity voiceFGDEANA { + base iana-interface-type; + description + "Voice FGD Exchange Access North American."; + } + identity voiceDID { + base iana-interface-type; + description + "Voice Direct Inward Dialing."; + } + identity mpegTransport { + base iana-interface-type; + description + "MPEG transport interface."; + } + identity sixToFour { + base iana-interface-type; + status deprecated; + description + "6to4 interface (DEPRECATED)."; + reference + "RFC 4087 - IP Tunnel MIB"; + } + identity gtp { + base iana-interface-type; + description + "GTP (GPRS Tunneling Protocol)."; + } + identity pdnEtherLoop1 { + base iana-interface-type; + description + "Paradyne EtherLoop 1."; + } + identity pdnEtherLoop2 { + base iana-interface-type; + description + "Paradyne EtherLoop 2."; + } + identity opticalChannelGroup { + base iana-interface-type; + description + "Optical Channel Group."; + } + identity homepna { + base iana-interface-type; + description + "HomePNA ITU-T G.989."; + } + identity gfp { + base iana-interface-type; + description + "Generic Framing Procedure (GFP)."; + } + identity ciscoISLvlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using Cisco ISL."; + } + identity actelisMetaLOOP { + base iana-interface-type; + description + "Acteleis proprietary MetaLOOP High Speed Link."; + } + identity fcipLink { + base iana-interface-type; + description + "FCIP Link."; + } + identity rpr { + base iana-interface-type; + description + "Resilient Packet Ring Interface Type."; + } + identity qam { + base iana-interface-type; + description + "RF Qam Interface."; + } + identity lmp { + base iana-interface-type; + description + "Link Management Protocol."; + reference + "RFC 4327 - Link Management Protocol (LMP) Management + Information Base (MIB)"; + } + identity cblVectaStar { + base iana-interface-type; + description + "Cambridge Broadband Networks Limited VectaStar."; + } + identity docsCableMCmtsDownstream { + base iana-interface-type; + description + "CATV Modular CMTS Downstream Interface."; + } + identity adsl2 { + base iana-interface-type; + status deprecated; + description + "Asymmetric Digital Subscriber Loop Version 2 + (DEPRECATED/OBSOLETED - please use adsl2plus(238) + instead)."; + reference + "RFC 4706 - Definitions of Managed Objects for Asymmetric + Digital Subscriber Line 2 (ADSL2)"; + } + identity macSecControlledIF { + base iana-interface-type; + description + "MACSecControlled."; + } + identity macSecUncontrolledIF { + base iana-interface-type; + description + "MACSecUncontrolled."; + } + identity aviciOpticalEther { + base iana-interface-type; + description + "Avici Optical Ethernet Aggregate."; + } + identity atmbond { + base iana-interface-type; + description + "atmbond."; + } + identity voiceFGDOS { + base iana-interface-type; + description + "Voice FGD Operator Services."; + } + identity mocaVersion1 { + base iana-interface-type; + description + "MultiMedia over Coax Alliance (MoCA) Interface + as documented in information provided privately to IANA."; + } + identity ieee80216WMAN { + base iana-interface-type; + description + "IEEE 802.16 WMAN interface."; + } + identity adsl2plus { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop Version 2 - + Version 2 Plus and all variants."; + } + identity dvbRcsMacLayer { + base iana-interface-type; + description + "DVB-RCS MAC Layer."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbTdm { + base iana-interface-type; + description + "DVB Satellite TDM."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbRcsTdma { + base iana-interface-type; + description + "DVB-RCS TDMA."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity x86Laps { + base iana-interface-type; + description + "LAPS based on ITU-T X.86/Y.1323."; + } + identity wwanPP { + base iana-interface-type; + description + "3GPP WWAN."; + } + identity wwanPP2 { + base iana-interface-type; + description + "3GPP2 WWAN."; + } + identity voiceEBS { + base iana-interface-type; + description + "Voice P-phone EBS physical interface."; + } + identity ifPwType { + base iana-interface-type; + description + "Pseudowire interface type."; + reference + "RFC 5601 - Pseudowire (PW) Management Information Base (MIB)"; + } + identity ilan { + base iana-interface-type; + description + "Internal LAN on a bridge per IEEE 802.1ap."; + } + identity pip { + base iana-interface-type; + description + "Provider Instance Port on a bridge per IEEE 802.1ah PBB."; + } + identity aluELP { + base iana-interface-type; + description + "Alcatel-Lucent Ethernet Link Protection."; + } + identity gpon { + base iana-interface-type; + description + "Gigabit-capable passive optical networks (G-PON) as per + ITU-T G.948."; + } + identity vdsl2 { + base iana-interface-type; + description + "Very high speed digital subscriber line Version 2 + (as per ITU-T Recommendation G.993.2)."; + reference + "RFC 5650 - Definitions of Managed Objects for Very High + Speed Digital Subscriber Line 2 (VDSL2)"; + } + identity capwapDot11Profile { + base iana-interface-type; + description + "WLAN Profile Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapDot11Bss { + base iana-interface-type; + description + "WLAN BSS Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapWtpVirtualRadio { + base iana-interface-type; + description + "WTP Virtual Radio Interface."; + reference + "RFC 5833 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Base MIB"; + } + identity bits { + base iana-interface-type; + description + "bitsport."; + } + identity docsCableUpstreamRfPort { + base iana-interface-type; + description + "DOCSIS CATV Upstream RF Port."; + } + identity cableDownstreamRfPort { + base iana-interface-type; + description + "CATV downstream RF Port."; + } + identity vmwareVirtualNic { + base iana-interface-type; + description + "VMware Virtual Network Interface."; + } + identity ieee802154 { + base iana-interface-type; + description + "IEEE 802.15.4 WPAN interface."; + reference + "IEEE 802.15.4-2006"; + } + identity otnOdu { + base iana-interface-type; + description + "OTN Optical Data Unit."; + } + identity otnOtu { + base iana-interface-type; + description + "OTN Optical channel Transport Unit."; + } + identity ifVfiType { + base iana-interface-type; + description + "VPLS Forwarding Instance Interface Type."; + } + identity g9981 { + base iana-interface-type; + description + "G.998.1 bonded interface."; + } + identity g9982 { + base iana-interface-type; + description + "G.998.2 bonded interface."; + } + identity g9983 { + base iana-interface-type; + description + "G.998.3 bonded interface."; + } + + identity aluEpon { + base iana-interface-type; + description + "Ethernet Passive Optical Networks (E-PON)."; + } + identity aluEponOnu { + base iana-interface-type; + description + "EPON Optical Network Unit."; + } + identity aluEponPhysicalUni { + base iana-interface-type; + description + "EPON physical User to Network interface."; + } + identity aluEponLogicalLink { + base iana-interface-type; + description + "The emulation of a point-to-point link over the EPON + layer."; + } + identity aluGponOnu { + base iana-interface-type; + description + "GPON Optical Network Unit."; + reference + "ITU-T G.984.2"; + } + identity aluGponPhysicalUni { + base iana-interface-type; + description + "GPON physical User to Network interface."; + reference + "ITU-T G.984.2"; + } + identity vmwareNicTeam { + base iana-interface-type; + description + "VMware NIC Team."; + } + identity docsOfdmDownstream { + base iana-interface-type; + description + "CATV Downstream OFDM interface."; + } + identity docsOfdmaUpstream { + base iana-interface-type; + description + "CATV Upstream OFDMA interface."; + } + identity gfast { + base iana-interface-type; + description + "G.fast port."; + reference + "ITU-T G.9701"; + } + identity sdci { + base iana-interface-type; + description + "SDCI (IO-Link)."; + reference + "IEC 61131-9 Edition 1.0 2013-09"; + } + identity xboxWireless { + base iana-interface-type; + description + "Xbox wireless."; + } + identity fastdsl { + base iana-interface-type; + description + "FastDSL."; + reference + "BBF TR-355"; + } + identity docsCableScte55d1FwdOob { + base iana-interface-type; + description + "Cable SCTE 55-1 OOB Forward Channel."; + } + identity docsCableScte55d1RetOob { + base iana-interface-type; + description + "Cable SCTE 55-1 OOB Return Channel."; + } + identity docsCableScte55d2DsOob { + base iana-interface-type; + description + "Cable SCTE 55-2 OOB Downstream Channel."; + } + identity docsCableScte55d2UsOob { + base iana-interface-type; + description + "Cable SCTE 55-2 OOB Upstream Channel."; + } + identity docsCableNdf { + base iana-interface-type; + description + "Cable Narrowband Digital Forward."; + } + identity docsCableNdr { + base iana-interface-type; + description + "Cable Narrowband Digital Return."; + } + identity ptm { + base iana-interface-type; + description + "Packet Transfer Mode."; + } +} diff --git a/models/ietf/RFC/iana-routing-types.yang b/models/ietf/RFC/iana-routing-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..52d5021d311fe14156a290f9849e6491cc719557 --- /dev/null +++ b/models/ietf/RFC/iana-routing-types.yang @@ -0,0 +1,498 @@ +module iana-routing-types { + namespace "urn:ietf:params:xml:ns:yang:iana-routing-types"; + prefix iana-rt-types; + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + <mailto:iana&iana.org>"; + + description + "This module contains a collection of YANG data types + considered defined by IANA and used for routing + protocols. + + Copyright (c) 2017 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 Simplified 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 8294; see + the RFC itself for full legal notices."; + + revision 2018-10-29 { + description "Added SAFI value 74."; + } + + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 4."; + } + + + + + /*** Collection of IANA types related to routing ***/ + /*** IANA Address Family enumeration ***/ + + typedef address-family { + type enumeration { + enum ipv4 { + value 1; + description + "IPv4 Address Family."; + } + + enum ipv6 { + value 2; + description + "IPv6 Address Family."; + } + + enum nsap { + value 3; + description + "OSI Network Service Access Point (NSAP) Address Family."; + } + + enum hdlc { + value 4; + description + "High-Level Data Link Control (HDLC) Address Family."; + } + + enum bbn1822 { + value 5; + description + "Bolt, Beranek, and Newman Report 1822 (BBN 1822) + Address Family."; + } + + enum ieee802 { + value 6; + description + "IEEE 802 Committee Address Family + (aka Media Access Control (MAC) address)."; + } + + enum e163 { + value 7; + description + "ITU-T E.163 Address Family."; + } + enum e164 { + value 8; + description + "ITU-T E.164 (Switched Multimegabit Data Service (SMDS), + Frame Relay, ATM) Address Family."; + } + + enum f69 { + value 9; + description + "ITU-T F.69 (Telex) Address Family."; + } + + enum x121 { + value 10; + description + "ITU-T X.121 (X.25, Frame Relay) Address Family."; + } + + enum ipx { + value 11; + description + "Novell Internetwork Packet Exchange (IPX) + Address Family."; + } + + enum appletalk { + value 12; + description + "Apple AppleTalk Address Family."; + } + + enum decnet-iv { + value 13; + description + "Digital Equipment DECnet Phase IV Address Family."; + } + + enum vines { + value 14; + description + "Banyan Vines Address Family."; + } + + + + + + enum e164-nsap { + value 15; + description + "ITU-T E.164 with NSAP sub-address Address Family."; + } + + enum dns { + value 16; + description + "Domain Name System (DNS) Address Family."; + } + + enum distinguished-name { + value 17; + description + "Distinguished Name Address Family."; + } + + enum as-num { + value 18; + description + "Autonomous System (AS) Number Address Family."; + } + + enum xtp-v4 { + value 19; + description + "Xpress Transport Protocol (XTP) over IPv4 + Address Family."; + } + + enum xtp-v6 { + value 20; + description + "XTP over IPv6 Address Family."; + } + + enum xtp-native { + value 21; + description + "XTP native mode Address Family."; + } + + enum fc-port { + value 22; + description + "Fibre Channel (FC) World-Wide Port Name Address Family."; + } + enum fc-node { + value 23; + description + "FC World-Wide Node Name Address Family."; + } + + enum gwid { + value 24; + description + "ATM Gateway Identifier (GWID) Number Address Family."; + } + + enum l2vpn { + value 25; + description + "Layer 2 VPN (L2VPN) Address Family."; + } + + enum mpls-tp-section-eid { + value 26; + description + "MPLS Transport Profile (MPLS-TP) Section Endpoint + Identifier Address Family."; + } + + enum mpls-tp-lsp-eid { + value 27; + description + "MPLS-TP Label Switched Path (LSP) Endpoint Identifier + Address Family."; + } + + enum mpls-tp-pwe-eid { + value 28; + description + "MPLS-TP Pseudowire Endpoint Identifier Address Family."; + } + + enum mt-v4 { + value 29; + description + "Multi-Topology IPv4 Address Family."; + } + + + + + + enum mt-v6 { + value 30; + description + "Multi-Topology IPv6 Address Family."; + } + + enum eigrp-common-sf { + value 16384; + description + "Enhanced Interior Gateway Routing Protocol (EIGRP) + Common Service Family Address Family."; + } + + enum eigrp-v4-sf { + value 16385; + description + "EIGRP IPv4 Service Family Address Family."; + } + + enum eigrp-v6-sf { + value 16386; + description + "EIGRP IPv6 Service Family Address Family."; + } + + enum lcaf { + value 16387; + description + "Locator/ID Separation Protocol (LISP) + Canonical Address Format (LCAF) Address Family."; + } + + enum bgp-ls { + value 16388; + description + "Border Gateway Protocol - Link State (BGP-LS) + Address Family."; + } + + enum mac-48 { + value 16389; + description + "IEEE 48-bit MAC Address Family."; + } + + + + + enum mac-64 { + value 16390; + description + "IEEE 64-bit MAC Address Family."; + } + + enum trill-oui { + value 16391; + description + "Transparent Interconnection of Lots of Links (TRILL) + IEEE Organizationally Unique Identifier (OUI) + Address Family."; + } + + enum trill-mac-24 { + value 16392; + description + "TRILL final 3 octets of 48-bit MAC Address Family."; + } + + enum trill-mac-40 { + value 16393; + description + "TRILL final 5 octets of 64-bit MAC Address Family."; + } + + enum ipv6-64 { + value 16394; + description + "First 8 octets (64 bits) of IPv6 address + Address Family."; + } + + enum trill-rbridge-port-id { + value 16395; + description + "TRILL Routing Bridge (RBridge) Port ID Address Family."; + } + + enum trill-nickname { + value 16396; + description + "TRILL Nickname Address Family."; + } + } + + + + description + "Enumeration containing all the IANA-defined + Address Families."; + + } + + /*** Subsequent Address Family Identifiers (SAFIs) ***/ + /*** for multiprotocol BGP enumeration ***/ + + typedef bgp-safi { + type enumeration { + enum unicast-safi { + value 1; + description + "Unicast SAFI."; + } + + enum multicast-safi { + value 2; + description + "Multicast SAFI."; + } + + enum labeled-unicast-safi { + value 4; + description + "Labeled Unicast SAFI."; + } + + enum multicast-vpn-safi { + value 5; + description + "Multicast VPN SAFI."; + } + + enum pseudowire-safi { + value 6; + description + "Multi-segment Pseudowire VPN SAFI."; + } + + enum tunnel-encap-safi { + value 7; + description + "Tunnel Encap SAFI."; + } + + + enum mcast-vpls-safi { + value 8; + description + "Multicast Virtual Private LAN Service (VPLS) SAFI."; + } + + enum tunnel-safi { + value 64; + description + "Tunnel SAFI."; + } + + enum vpls-safi { + value 65; + description + "VPLS SAFI."; + } + + enum mdt-safi { + value 66; + description + "Multicast Distribution Tree (MDT) SAFI."; + } + + enum v4-over-v6-safi { + value 67; + description + "IPv4 over IPv6 SAFI."; + } + + enum v6-over-v4-safi { + value 68; + description + "IPv6 over IPv4 SAFI."; + } + + enum l1-vpn-auto-discovery-safi { + value 69; + description + "Layer 1 VPN Auto-Discovery SAFI."; + } + + enum evpn-safi { + value 70; + description + "Ethernet VPN (EVPN) SAFI."; + } + + enum bgp-ls-safi { + value 71; + description + "BGP-LS SAFI."; + } + + enum bgp-ls-vpn-safi { + value 72; + description + "BGP-LS VPN SAFI."; + } + + enum sr-te-safi { + value 73; + description + "Segment Routing - Traffic Engineering (SR-TE) SAFI."; + } + + enum sd-wan-capabilities-safi { + value 74; + description + "SD-WAN Capabilities SAFI."; + } + + enum labeled-vpn-safi { + value 128; + description + "MPLS Labeled VPN SAFI."; + } + + enum multicast-mpls-vpn-safi { + value 129; + description + "Multicast for BGP/MPLS IP VPN SAFI."; + } + + enum route-target-safi { + value 132; + description + "Route Target SAFI."; + } + + enum ipv4-flow-spec-safi { + value 133; + description + "IPv4 Flow Specification SAFI."; + } + + enum vpnv4-flow-spec-safi { + value 134; + description + "IPv4 VPN Flow Specification SAFI."; + } + + enum vpn-auto-discovery-safi { + value 140; + description + "VPN Auto-Discovery SAFI."; + } + } + description + "Enumeration for BGP SAFI."; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4."; + } +} diff --git a/models/ietf/RFC/iana-routing-types@2017-12-04.yang b/models/ietf/RFC/iana-routing-types@2017-12-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..a538179c9474380bdd3da518036d2e2279c89d4b --- /dev/null +++ b/models/ietf/RFC/iana-routing-types@2017-12-04.yang @@ -0,0 +1,471 @@ +module iana-routing-types { + namespace "urn:ietf:params:xml:ns:yang:iana-routing-types"; + prefix iana-rt-types; + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + <mailto:iana@iana.org>"; + + description + "This module contains a collection of YANG data types + considered defined by IANA and used for routing + protocols. + + Copyright (c) 2017 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 Simplified 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 8294; see + the RFC itself for full legal notices."; + + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 4."; + } + + /*** Collection of IANA types related to routing ***/ + /*** IANA Address Family enumeration ***/ + + typedef address-family { + type enumeration { + enum ipv4 { + value 1; + description + "IPv4 Address Family."; + } + + enum ipv6 { + value 2; + description + "IPv6 Address Family."; + } + + enum nsap { + value 3; + description + "OSI Network Service Access Point (NSAP) Address Family."; + } + + enum hdlc { + value 4; + description + "High-Level Data Link Control (HDLC) Address Family."; + } + + enum bbn1822 { + value 5; + description + "Bolt, Beranek, and Newman Report 1822 (BBN 1822) + Address Family."; + } + + enum ieee802 { + value 6; + description + "IEEE 802 Committee Address Family + (aka Media Access Control (MAC) address)."; + } + + enum e163 { + value 7; + description + "ITU-T E.163 Address Family."; + } + enum e164 { + value 8; + description + "ITU-T E.164 (Switched Multimegabit Data Service (SMDS), + Frame Relay, ATM) Address Family."; + } + + enum f69 { + value 9; + description + "ITU-T F.69 (Telex) Address Family."; + } + + enum x121 { + value 10; + description + "ITU-T X.121 (X.25, Frame Relay) Address Family."; + } + + enum ipx { + value 11; + description + "Novell Internetwork Packet Exchange (IPX) + Address Family."; + } + + enum appletalk { + value 12; + description + "Apple AppleTalk Address Family."; + } + + enum decnet-iv { + value 13; + description + "Digital Equipment DECnet Phase IV Address Family."; + } + + enum vines { + value 14; + description + "Banyan Vines Address Family."; + } + + enum e164-nsap { + value 15; + description + "ITU-T E.164 with NSAP sub-address Address Family."; + } + + enum dns { + value 16; + description + "Domain Name System (DNS) Address Family."; + } + + enum distinguished-name { + value 17; + description + "Distinguished Name Address Family."; + } + + enum as-num { + value 18; + description + "Autonomous System (AS) Number Address Family."; + } + + enum xtp-v4 { + value 19; + description + "Xpress Transport Protocol (XTP) over IPv4 + Address Family."; + } + + enum xtp-v6 { + value 20; + description + "XTP over IPv6 Address Family."; + } + + enum xtp-native { + value 21; + description + "XTP native mode Address Family."; + } + + enum fc-port { + value 22; + description + "Fibre Channel (FC) World-Wide Port Name Address Family."; + } + enum fc-node { + value 23; + description + "FC World-Wide Node Name Address Family."; + } + + enum gwid { + value 24; + description + "ATM Gateway Identifier (GWID) Number Address Family."; + } + + enum l2vpn { + value 25; + description + "Layer 2 VPN (L2VPN) Address Family."; + } + + enum mpls-tp-section-eid { + value 26; + description + "MPLS Transport Profile (MPLS-TP) Section Endpoint + Identifier Address Family."; + } + + enum mpls-tp-lsp-eid { + value 27; + description + "MPLS-TP Label Switched Path (LSP) Endpoint Identifier + Address Family."; + } + + enum mpls-tp-pwe-eid { + value 28; + description + "MPLS-TP Pseudowire Endpoint Identifier Address Family."; + } + + enum mt-v4 { + value 29; + description + "Multi-Topology IPv4 Address Family."; + } + + enum mt-v6 { + value 30; + description + "Multi-Topology IPv6 Address Family."; + } + + enum eigrp-common-sf { + value 16384; + description + "Enhanced Interior Gateway Routing Protocol (EIGRP) + Common Service Family Address Family."; + } + + enum eigrp-v4-sf { + value 16385; + description + "EIGRP IPv4 Service Family Address Family."; + } + + enum eigrp-v6-sf { + value 16386; + description + "EIGRP IPv6 Service Family Address Family."; + } + + enum lcaf { + value 16387; + description + "Locator/ID Separation Protocol (LISP) + Canonical Address Format (LCAF) Address Family."; + } + + enum bgp-ls { + value 16388; + description + "Border Gateway Protocol - Link State (BGP-LS) + Address Family."; + } + + enum mac-48 { + value 16389; + description + "IEEE 48-bit MAC Address Family."; + } + + enum mac-64 { + value 16390; + description + "IEEE 64-bit MAC Address Family."; + } + + enum trill-oui { + value 16391; + description + "Transparent Interconnection of Lots of Links (TRILL) + IEEE Organizationally Unique Identifier (OUI) + Address Family."; + } + + enum trill-mac-24 { + value 16392; + description + "TRILL final 3 octets of 48-bit MAC Address Family."; + } + + enum trill-mac-40 { + value 16393; + description + "TRILL final 5 octets of 64-bit MAC Address Family."; + } + + enum ipv6-64 { + value 16394; + description + "First 8 octets (64 bits) of IPv6 address + Address Family."; + } + + enum trill-rbridge-port-id { + value 16395; + description + "TRILL Routing Bridge (RBridge) Port ID Address Family."; + } + + enum trill-nickname { + value 16396; + description + "TRILL Nickname Address Family."; + } + } + + description + "Enumeration containing all the IANA-defined + Address Families."; + + } + + /*** Subsequent Address Family Identifiers (SAFIs) ***/ + /*** for multiprotocol BGP enumeration ***/ + + typedef bgp-safi { + type enumeration { + enum unicast-safi { + value 1; + description + "Unicast SAFI."; + } + + enum multicast-safi { + value 2; + description + "Multicast SAFI."; + } + + enum labeled-unicast-safi { + value 4; + description + "Labeled Unicast SAFI."; + } + + enum multicast-vpn-safi { + value 5; + description + "Multicast VPN SAFI."; + } + + enum pseudowire-safi { + value 6; + description + "Multi-segment Pseudowire VPN SAFI."; + } + + enum tunnel-encap-safi { + value 7; + description + "Tunnel Encap SAFI."; + } + + enum mcast-vpls-safi { + value 8; + description + "Multicast Virtual Private LAN Service (VPLS) SAFI."; + } + + enum tunnel-safi { + value 64; + description + "Tunnel SAFI."; + } + + enum vpls-safi { + value 65; + description + "VPLS SAFI."; + } + + enum mdt-safi { + value 66; + description + "Multicast Distribution Tree (MDT) SAFI."; + } + + enum v4-over-v6-safi { + value 67; + description + "IPv4 over IPv6 SAFI."; + } + + enum v6-over-v4-safi { + value 68; + description + "IPv6 over IPv4 SAFI."; + } + + enum l1-vpn-auto-discovery-safi { + value 69; + description + "Layer 1 VPN Auto-Discovery SAFI."; + } + + enum evpn-safi { + value 70; + description + "Ethernet VPN (EVPN) SAFI."; + } + + enum bgp-ls-safi { + value 71; + description + "BGP-LS SAFI."; + } + + enum bgp-ls-vpn-safi { + value 72; + description + "BGP-LS VPN SAFI."; + } + + enum sr-te-safi { + value 73; + description + "Segment Routing - Traffic Engineering (SR-TE) SAFI."; + } + + enum labeled-vpn-safi { + value 128; + description + "MPLS Labeled VPN SAFI."; + } + + enum multicast-mpls-vpn-safi { + value 129; + description + "Multicast for BGP/MPLS IP VPN SAFI."; + } + + enum route-target-safi { + value 132; + description + "Route Target SAFI."; + } + + enum ipv4-flow-spec-safi { + value 133; + description + "IPv4 Flow Specification SAFI."; + } + + enum vpnv4-flow-spec-safi { + value 134; + description + "IPv4 VPN Flow Specification SAFI."; + } + + enum vpn-auto-discovery-safi { + value 140; + description + "VPN Auto-Discovery SAFI."; + } + } + description + "Enumeration for BGP SAFI."; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4."; + } +} diff --git a/models/ietf/RFC/iana-routing-types@2018-10-29.yang b/models/ietf/RFC/iana-routing-types@2018-10-29.yang new file mode 100644 index 0000000000000000000000000000000000000000..52d5021d311fe14156a290f9849e6491cc719557 --- /dev/null +++ b/models/ietf/RFC/iana-routing-types@2018-10-29.yang @@ -0,0 +1,498 @@ +module iana-routing-types { + namespace "urn:ietf:params:xml:ns:yang:iana-routing-types"; + prefix iana-rt-types; + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + <mailto:iana&iana.org>"; + + description + "This module contains a collection of YANG data types + considered defined by IANA and used for routing + protocols. + + Copyright (c) 2017 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 Simplified 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 8294; see + the RFC itself for full legal notices."; + + revision 2018-10-29 { + description "Added SAFI value 74."; + } + + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 4."; + } + + + + + /*** Collection of IANA types related to routing ***/ + /*** IANA Address Family enumeration ***/ + + typedef address-family { + type enumeration { + enum ipv4 { + value 1; + description + "IPv4 Address Family."; + } + + enum ipv6 { + value 2; + description + "IPv6 Address Family."; + } + + enum nsap { + value 3; + description + "OSI Network Service Access Point (NSAP) Address Family."; + } + + enum hdlc { + value 4; + description + "High-Level Data Link Control (HDLC) Address Family."; + } + + enum bbn1822 { + value 5; + description + "Bolt, Beranek, and Newman Report 1822 (BBN 1822) + Address Family."; + } + + enum ieee802 { + value 6; + description + "IEEE 802 Committee Address Family + (aka Media Access Control (MAC) address)."; + } + + enum e163 { + value 7; + description + "ITU-T E.163 Address Family."; + } + enum e164 { + value 8; + description + "ITU-T E.164 (Switched Multimegabit Data Service (SMDS), + Frame Relay, ATM) Address Family."; + } + + enum f69 { + value 9; + description + "ITU-T F.69 (Telex) Address Family."; + } + + enum x121 { + value 10; + description + "ITU-T X.121 (X.25, Frame Relay) Address Family."; + } + + enum ipx { + value 11; + description + "Novell Internetwork Packet Exchange (IPX) + Address Family."; + } + + enum appletalk { + value 12; + description + "Apple AppleTalk Address Family."; + } + + enum decnet-iv { + value 13; + description + "Digital Equipment DECnet Phase IV Address Family."; + } + + enum vines { + value 14; + description + "Banyan Vines Address Family."; + } + + + + + + enum e164-nsap { + value 15; + description + "ITU-T E.164 with NSAP sub-address Address Family."; + } + + enum dns { + value 16; + description + "Domain Name System (DNS) Address Family."; + } + + enum distinguished-name { + value 17; + description + "Distinguished Name Address Family."; + } + + enum as-num { + value 18; + description + "Autonomous System (AS) Number Address Family."; + } + + enum xtp-v4 { + value 19; + description + "Xpress Transport Protocol (XTP) over IPv4 + Address Family."; + } + + enum xtp-v6 { + value 20; + description + "XTP over IPv6 Address Family."; + } + + enum xtp-native { + value 21; + description + "XTP native mode Address Family."; + } + + enum fc-port { + value 22; + description + "Fibre Channel (FC) World-Wide Port Name Address Family."; + } + enum fc-node { + value 23; + description + "FC World-Wide Node Name Address Family."; + } + + enum gwid { + value 24; + description + "ATM Gateway Identifier (GWID) Number Address Family."; + } + + enum l2vpn { + value 25; + description + "Layer 2 VPN (L2VPN) Address Family."; + } + + enum mpls-tp-section-eid { + value 26; + description + "MPLS Transport Profile (MPLS-TP) Section Endpoint + Identifier Address Family."; + } + + enum mpls-tp-lsp-eid { + value 27; + description + "MPLS-TP Label Switched Path (LSP) Endpoint Identifier + Address Family."; + } + + enum mpls-tp-pwe-eid { + value 28; + description + "MPLS-TP Pseudowire Endpoint Identifier Address Family."; + } + + enum mt-v4 { + value 29; + description + "Multi-Topology IPv4 Address Family."; + } + + + + + + enum mt-v6 { + value 30; + description + "Multi-Topology IPv6 Address Family."; + } + + enum eigrp-common-sf { + value 16384; + description + "Enhanced Interior Gateway Routing Protocol (EIGRP) + Common Service Family Address Family."; + } + + enum eigrp-v4-sf { + value 16385; + description + "EIGRP IPv4 Service Family Address Family."; + } + + enum eigrp-v6-sf { + value 16386; + description + "EIGRP IPv6 Service Family Address Family."; + } + + enum lcaf { + value 16387; + description + "Locator/ID Separation Protocol (LISP) + Canonical Address Format (LCAF) Address Family."; + } + + enum bgp-ls { + value 16388; + description + "Border Gateway Protocol - Link State (BGP-LS) + Address Family."; + } + + enum mac-48 { + value 16389; + description + "IEEE 48-bit MAC Address Family."; + } + + + + + enum mac-64 { + value 16390; + description + "IEEE 64-bit MAC Address Family."; + } + + enum trill-oui { + value 16391; + description + "Transparent Interconnection of Lots of Links (TRILL) + IEEE Organizationally Unique Identifier (OUI) + Address Family."; + } + + enum trill-mac-24 { + value 16392; + description + "TRILL final 3 octets of 48-bit MAC Address Family."; + } + + enum trill-mac-40 { + value 16393; + description + "TRILL final 5 octets of 64-bit MAC Address Family."; + } + + enum ipv6-64 { + value 16394; + description + "First 8 octets (64 bits) of IPv6 address + Address Family."; + } + + enum trill-rbridge-port-id { + value 16395; + description + "TRILL Routing Bridge (RBridge) Port ID Address Family."; + } + + enum trill-nickname { + value 16396; + description + "TRILL Nickname Address Family."; + } + } + + + + description + "Enumeration containing all the IANA-defined + Address Families."; + + } + + /*** Subsequent Address Family Identifiers (SAFIs) ***/ + /*** for multiprotocol BGP enumeration ***/ + + typedef bgp-safi { + type enumeration { + enum unicast-safi { + value 1; + description + "Unicast SAFI."; + } + + enum multicast-safi { + value 2; + description + "Multicast SAFI."; + } + + enum labeled-unicast-safi { + value 4; + description + "Labeled Unicast SAFI."; + } + + enum multicast-vpn-safi { + value 5; + description + "Multicast VPN SAFI."; + } + + enum pseudowire-safi { + value 6; + description + "Multi-segment Pseudowire VPN SAFI."; + } + + enum tunnel-encap-safi { + value 7; + description + "Tunnel Encap SAFI."; + } + + + enum mcast-vpls-safi { + value 8; + description + "Multicast Virtual Private LAN Service (VPLS) SAFI."; + } + + enum tunnel-safi { + value 64; + description + "Tunnel SAFI."; + } + + enum vpls-safi { + value 65; + description + "VPLS SAFI."; + } + + enum mdt-safi { + value 66; + description + "Multicast Distribution Tree (MDT) SAFI."; + } + + enum v4-over-v6-safi { + value 67; + description + "IPv4 over IPv6 SAFI."; + } + + enum v6-over-v4-safi { + value 68; + description + "IPv6 over IPv4 SAFI."; + } + + enum l1-vpn-auto-discovery-safi { + value 69; + description + "Layer 1 VPN Auto-Discovery SAFI."; + } + + enum evpn-safi { + value 70; + description + "Ethernet VPN (EVPN) SAFI."; + } + + enum bgp-ls-safi { + value 71; + description + "BGP-LS SAFI."; + } + + enum bgp-ls-vpn-safi { + value 72; + description + "BGP-LS VPN SAFI."; + } + + enum sr-te-safi { + value 73; + description + "Segment Routing - Traffic Engineering (SR-TE) SAFI."; + } + + enum sd-wan-capabilities-safi { + value 74; + description + "SD-WAN Capabilities SAFI."; + } + + enum labeled-vpn-safi { + value 128; + description + "MPLS Labeled VPN SAFI."; + } + + enum multicast-mpls-vpn-safi { + value 129; + description + "Multicast for BGP/MPLS IP VPN SAFI."; + } + + enum route-target-safi { + value 132; + description + "Route Target SAFI."; + } + + enum ipv4-flow-spec-safi { + value 133; + description + "IPv4 Flow Specification SAFI."; + } + + enum vpnv4-flow-spec-safi { + value 134; + description + "IPv4 VPN Flow Specification SAFI."; + } + + enum vpn-auto-discovery-safi { + value 140; + description + "VPN Auto-Discovery SAFI."; + } + } + description + "Enumeration for BGP SAFI."; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4."; + } +} diff --git a/models/ietf/RFC/iana-tunnel-type.yang b/models/ietf/RFC/iana-tunnel-type.yang new file mode 100644 index 0000000000000000000000000000000000000000..a4053f2b2d7cc3bd36706a36a71639039f9f0d31 --- /dev/null +++ b/models/ietf/RFC/iana-tunnel-type.yang @@ -0,0 +1,203 @@ +module iana-tunnel-type { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-tunnel-type"; + prefix iana-tunnel-type; + + import iana-if-type { + prefix ift; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + <mailto:iana@iana.org>"; + description + "This module contains a collection of YANG identities defined + by IANA and used as interface types for tunnel interfaces. + + Copyright (c) 2019 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 Simplified 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 8675; see + the RFC itself for full legal notices."; + + revision 2019-11-16 { + description + "Initial revision."; + reference + "RFC 8675: A YANG Data Model for Tunnel Interface Types"; + } + + identity other { + base ift:tunnel; + description + "None of the following values."; + reference + "RFC 4087: IP Tunnel MIB"; + } + + identity direct { + base ift:tunnel; + description + "No intermediate header."; + reference + "RFC 2003: IP Encapsulation within IP + RFC 4213: Basic Transition Mechanisms for IPv6 Hosts + and Routers"; + } + + identity gre { + base ift:tunnel; + description + "GRE encapsulation."; + reference + "RFC 1701: Generic Routing Encapsulation (GRE) + RFC 1702: Generic Routing Encapsulation over IPv4 networks + RFC 7676: IPv6 Support for Generic Routing Encapsulation + (GRE)"; + } + + identity minimal { + base ift:tunnel; + description + "Minimal encapsulation."; + reference + "RFC 2004: Minimal Encapsulation within IP"; + } + + identity l2tp { + base ift:tunnel; + description + "L2TP encapsulation."; + reference + "RFC 2661: Layer Two Tunneling Protocol 'L2TP'"; + } + + identity pptp { + base ift:tunnel; + description + "PPTP encapsulation."; + reference + "RFC 2637: Point-to-Point Tunneling Protocol (PPTP)"; + } + + identity l2f { + base ift:tunnel; + description + "L2F encapsulation."; + reference + "RFC 2341: Cisco Layer Two Forwarding (Protocol) 'L2F'"; + } + + identity udp { + base ift:tunnel; + description + "UDP encapsulation."; + reference + "RFC 1234: Tunneling IPX Traffic through IP Networks, + RFC 8085: UDP Usage Guidelines, Section 3.1.11"; + } + + identity atmp { + base ift:tunnel; + description + "ATMP encapsulation."; + reference + "RFC 2107: Ascend Tunnel Management Protocol - ATMP"; + } + + identity msdp { + base ift:tunnel; + description + "MSDP encapsulation."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP)"; + } + + identity sixtofour { + base ift:tunnel; + description + "6to4 encapsulation."; + reference + "RFC 3056: Connection of IPv6 Domains via IPv4 Clouds"; + } + + identity sixoverfour { + base ift:tunnel; + description + "6over4 encapsulation."; + reference + "RFC 2529: Transmission of IPv6 over IPv4 Domains without + Explicit Tunnels"; + } + + identity isatap { + base ift:tunnel; + description + "ISATAP encapsulation."; + reference + "RFC 5214: Intra-Site Automatic Tunnel Addressing Protocol + (ISATAP)"; + } + + identity teredo { + base ift:tunnel; + description + "Teredo encapsulation."; + reference + "RFC 4380: Teredo: Tunneling IPv6 over UDP through + Network Address Translations (NATs)"; + } + + identity iphttps { + base ift:tunnel; + description + "IP over HTTPS (IP-HTTPS) Tunneling Protocol."; + reference + "Microsoft Corporation, IP over HTTPS (IP-HTTPS) Tunneling + Protocol Specification, + https://msdn.microsoft.com/en-us/library/dd358571.aspx"; + } + + identity softwiremesh { + base ift:tunnel; + description + "softwire mesh tunnel."; + reference + "RFC 5565: Softwire Mesh Framework"; + } + + identity dslite { + base ift:tunnel; + description + "DS-Lite tunnel."; + reference + "RFC 6333: Dual-Stack Lite Broadband Deployments Following + IPv4 Exhaustion"; + } + + identity aplusp { + base ift:tunnel; + description + "A+P encapsulation."; + reference + "RFC 6346: The Address plus Port (A+P) Approach to the IPv4 + Address Shortage"; + } +} diff --git a/models/ietf/RFC/iana-tunnel-type@2019-11-16.yang b/models/ietf/RFC/iana-tunnel-type@2019-11-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..a4053f2b2d7cc3bd36706a36a71639039f9f0d31 --- /dev/null +++ b/models/ietf/RFC/iana-tunnel-type@2019-11-16.yang @@ -0,0 +1,203 @@ +module iana-tunnel-type { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-tunnel-type"; + prefix iana-tunnel-type; + + import iana-if-type { + prefix ift; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + <mailto:iana@iana.org>"; + description + "This module contains a collection of YANG identities defined + by IANA and used as interface types for tunnel interfaces. + + Copyright (c) 2019 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 Simplified 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 8675; see + the RFC itself for full legal notices."; + + revision 2019-11-16 { + description + "Initial revision."; + reference + "RFC 8675: A YANG Data Model for Tunnel Interface Types"; + } + + identity other { + base ift:tunnel; + description + "None of the following values."; + reference + "RFC 4087: IP Tunnel MIB"; + } + + identity direct { + base ift:tunnel; + description + "No intermediate header."; + reference + "RFC 2003: IP Encapsulation within IP + RFC 4213: Basic Transition Mechanisms for IPv6 Hosts + and Routers"; + } + + identity gre { + base ift:tunnel; + description + "GRE encapsulation."; + reference + "RFC 1701: Generic Routing Encapsulation (GRE) + RFC 1702: Generic Routing Encapsulation over IPv4 networks + RFC 7676: IPv6 Support for Generic Routing Encapsulation + (GRE)"; + } + + identity minimal { + base ift:tunnel; + description + "Minimal encapsulation."; + reference + "RFC 2004: Minimal Encapsulation within IP"; + } + + identity l2tp { + base ift:tunnel; + description + "L2TP encapsulation."; + reference + "RFC 2661: Layer Two Tunneling Protocol 'L2TP'"; + } + + identity pptp { + base ift:tunnel; + description + "PPTP encapsulation."; + reference + "RFC 2637: Point-to-Point Tunneling Protocol (PPTP)"; + } + + identity l2f { + base ift:tunnel; + description + "L2F encapsulation."; + reference + "RFC 2341: Cisco Layer Two Forwarding (Protocol) 'L2F'"; + } + + identity udp { + base ift:tunnel; + description + "UDP encapsulation."; + reference + "RFC 1234: Tunneling IPX Traffic through IP Networks, + RFC 8085: UDP Usage Guidelines, Section 3.1.11"; + } + + identity atmp { + base ift:tunnel; + description + "ATMP encapsulation."; + reference + "RFC 2107: Ascend Tunnel Management Protocol - ATMP"; + } + + identity msdp { + base ift:tunnel; + description + "MSDP encapsulation."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP)"; + } + + identity sixtofour { + base ift:tunnel; + description + "6to4 encapsulation."; + reference + "RFC 3056: Connection of IPv6 Domains via IPv4 Clouds"; + } + + identity sixoverfour { + base ift:tunnel; + description + "6over4 encapsulation."; + reference + "RFC 2529: Transmission of IPv6 over IPv4 Domains without + Explicit Tunnels"; + } + + identity isatap { + base ift:tunnel; + description + "ISATAP encapsulation."; + reference + "RFC 5214: Intra-Site Automatic Tunnel Addressing Protocol + (ISATAP)"; + } + + identity teredo { + base ift:tunnel; + description + "Teredo encapsulation."; + reference + "RFC 4380: Teredo: Tunneling IPv6 over UDP through + Network Address Translations (NATs)"; + } + + identity iphttps { + base ift:tunnel; + description + "IP over HTTPS (IP-HTTPS) Tunneling Protocol."; + reference + "Microsoft Corporation, IP over HTTPS (IP-HTTPS) Tunneling + Protocol Specification, + https://msdn.microsoft.com/en-us/library/dd358571.aspx"; + } + + identity softwiremesh { + base ift:tunnel; + description + "softwire mesh tunnel."; + reference + "RFC 5565: Softwire Mesh Framework"; + } + + identity dslite { + base ift:tunnel; + description + "DS-Lite tunnel."; + reference + "RFC 6333: Dual-Stack Lite Broadband Deployments Following + IPv4 Exhaustion"; + } + + identity aplusp { + base ift:tunnel; + description + "A+P encapsulation."; + reference + "RFC 6346: The Address plus Port (A+P) Approach to the IPv4 + Address Shortage"; + } +} diff --git a/models/ietf/RFC/ietf-access-control-list.yang b/models/ietf/RFC/ietf-access-control-list.yang new file mode 100644 index 0000000000000000000000000000000000000000..8bb0b626144bde08d3cfd421f83ab6f2e27268b4 --- /dev/null +++ b/models/ietf/RFC/ietf-access-control-list.yang @@ -0,0 +1,668 @@ +module ietf-access-control-list { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-access-control-list"; + prefix acl; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991 - Common YANG Data Types."; + } + + import ietf-packet-fields { + prefix pf; + reference + "RFC 8519 - YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + import ietf-interfaces { + prefix if; + reference + "RFC 8343 - A YANG Data Model for Interface Management."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group."; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: netmod@ietf.org + + Editor: Mahesh Jethanandani + mjethanandani@gmail.com + Editor: Lisa Huang + huangyi_99@yahoo.com + Editor: Sonal Agarwal + sagarwal12@gmail.com + Editor: Dana Blair + dana@blairhome.com"; + + description + "This YANG module defines a component that describes the + configuration and monitoring of Access Control Lists (ACLs). + + 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. + + Copyright (c) 2019 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8519; see + the RFC itself for full legal notices."; + + revision 2019-03-04 { + description + "Initial version."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + /* + * Identities + */ + /* + * Forwarding actions for a packet + */ + + identity forwarding-action { + description + "Base identity for actions in the forwarding category."; + } + + identity accept { + base forwarding-action; + description + "Accept the packet."; + } + + identity drop { + base forwarding-action; + description + "Drop packet without sending any ICMP error message."; + } + + identity reject { + base forwarding-action; + description + "Drop the packet and send an ICMP error message to the source."; + } + + /* + * Logging actions for a packet + */ + + identity log-action { + description + "Base identity for defining the destination for logging + actions."; + } + + identity log-syslog { + base log-action; + description + "System log (syslog) the information for the packet."; + } + identity log-none { + base log-action; + description + "No logging for the packet."; + } + + /* + * ACL type identities + */ + + identity acl-base { + description + "Base Access Control List type for all Access Control List type + identifiers."; + } + + identity ipv4-acl-type { + base acl:acl-base; + if-feature "ipv4"; + description + "An ACL that matches on fields from the IPv4 header + (e.g., IPv4 destination address) and Layer 4 headers (e.g., TCP + destination port). An ACL of type ipv4 does not contain + matches on fields in the Ethernet header or the IPv6 header."; + } + + identity ipv6-acl-type { + base acl:acl-base; + if-feature "ipv6"; + description + "An ACL that matches on fields from the IPv6 header + (e.g., IPv6 destination address) and Layer 4 headers (e.g., TCP + destination port). An ACL of type ipv6 does not contain + matches on fields in the Ethernet header or the IPv4 header."; + } + + identity eth-acl-type { + base acl:acl-base; + if-feature "eth"; + description + "An ACL that matches on fields in the Ethernet header, + like 10/100/1000baseT or a Wi-Fi Access Control List. An ACL + of type ethernet does not contain matches on fields in the + IPv4 header, the IPv6 header, or Layer 4 headers."; + } + + identity mixed-eth-ipv4-acl-type { + base acl:eth-acl-type; + base acl:ipv4-acl-type; + if-feature "mixed-eth-ipv4"; + description + "An ACL that contains a mix of entries that match + on fields in Ethernet headers and in IPv4 headers. + Matching on Layer 4 header fields may also exist in the + list."; + } + + identity mixed-eth-ipv6-acl-type { + base acl:eth-acl-type; + base acl:ipv6-acl-type; + if-feature "mixed-eth-ipv6"; + description + "An ACL that contains a mix of entries that match on fields + in Ethernet headers and in IPv6 headers. Matching + on Layer 4 header fields may also exist in the list."; + } + + identity mixed-eth-ipv4-ipv6-acl-type { + base acl:eth-acl-type; + base acl:ipv4-acl-type; + base acl:ipv6-acl-type; + if-feature "mixed-eth-ipv4-ipv6"; + description + "An ACL that contains a mix of entries that + match on fields in Ethernet headers, IPv4 headers, and IPv6 + headers. Matching on Layer 4 header fields may also exist + in the list."; + } + + /* + * Features + */ + + /* + * Features supported by device + */ + feature match-on-eth { + description + "The device can support matching on Ethernet headers."; + } + + feature match-on-ipv4 { + description + "The device can support matching on IPv4 headers."; + } + + feature match-on-ipv6 { + description + "The device can support matching on IPv6 headers."; + } + + feature match-on-tcp { + description + "The device can support matching on TCP headers."; + } + + feature match-on-udp { + description + "The device can support matching on UDP headers."; + } + + feature match-on-icmp { + description + "The device can support matching on ICMP (v4 and v6) headers."; + } + + /* + * Header classifications combinations supported by + * device + */ + + feature eth { + if-feature "match-on-eth"; + description + "Plain Ethernet ACL supported."; + } + + feature ipv4 { + if-feature "match-on-ipv4"; + description + "Plain IPv4 ACL supported."; + } + + feature ipv6 { + if-feature "match-on-ipv6"; + description + "Plain IPv6 ACL supported."; + } + + feature mixed-eth-ipv4 { + if-feature "match-on-eth and match-on-ipv4"; + description + "Ethernet and IPv4 ACL combinations supported."; + } + feature mixed-eth-ipv6 { + if-feature "match-on-eth and match-on-ipv6"; + description + "Ethernet and IPv6 ACL combinations supported."; + } + + feature mixed-eth-ipv4-ipv6 { + if-feature + "match-on-eth and match-on-ipv4 + and match-on-ipv6"; + description + "Ethernet, IPv4, and IPv6 ACL combinations supported."; + } + + /* + * Stats Features + */ + feature interface-stats { + description + "ACL counters are available and reported only per interface."; + } + + feature acl-aggregate-stats { + description + "ACL counters are aggregated over all interfaces and reported + only per ACL entry."; + } + + /* + * Attachment point features + */ + feature interface-attachment { + description + "ACLs are set on interfaces."; + } + + /* + * Typedefs + */ + typedef acl-type { + type identityref { + base acl-base; + } + description + "This type is used to refer to an ACL type."; + } + + /* + * Groupings + */ + grouping acl-counters { + description + "Common grouping for ACL counters."; + leaf matched-packets { + type yang:counter64; + config false; + description + "Count of the number of packets matching the current ACL + entry. + + An implementation should provide this counter on a + per-interface, per-ACL-entry basis if possible. + + If an implementation only supports ACL counters on a per- + entry basis (i.e., not broken out per interface), then the + value should be equal to the aggregate count across all + interfaces. + + An implementation that provides counters on a per-entry, per- + interface basis is not required to also provide an aggregate + count, e.g., per entry -- the user is expected to be able to + implement the required aggregation if such a count is + needed."; + } + + leaf matched-octets { + type yang:counter64; + config false; + description + "Count of the number of octets (bytes) matching the current + ACL entry. + + An implementation should provide this counter on a + per-interface, per-ACL-entry basis if possible. + + If an implementation only supports ACL counters per entry + (i.e., not broken out per interface), then the value + should be equal to the aggregate count across all interfaces. + + An implementation that provides counters per entry per + interface is not required to also provide an aggregate count, + e.g., per entry -- the user is expected to be able to + implement the required aggregation if such a count is needed."; + } + } + + /* + * Configuration and monitoring data nodes + */ + + container acls { + description + "This is a top-level container for Access Control Lists. + It can have one or more acl nodes."; + list acl { + key "name"; + description + "An ACL is an ordered list of ACEs. Each ACE has a + list of match criteria and a list of actions. + Since there are several kinds of ACLs implemented + with different attributes for different vendors, + this model accommodates customizing ACLs for + each kind and for each vendor."; + leaf name { + type string { + length "1..64"; + } + description + "The name of the access list. A device MAY further + restrict the length of this name; space and special + characters are not allowed."; + } + leaf type { + type acl-type; + description + "Type of ACL. Indicates the primary intended + type of match criteria (e.g., Ethernet, IPv4, IPv6, mixed, + etc.) used in the list instance."; + } + container aces { + description + "The aces container contains one or more ACE nodes."; + list ace { + key "name"; + ordered-by user; + description + "List of ACEs."; + leaf name { + type string { + length "1..64"; + } + description + "A unique name identifying this ACE."; + } + container matches { + description + "The rules in this set determine what fields will be + matched upon before any action is taken on them. + The rules are selected based on the feature set + defined by the server and the acl-type defined. + If no matches are defined in a particular container, + then any packet will match that container. If no + matches are specified at all in an ACE, then any + packet will match the ACE."; + + choice l2 { + container eth { + when "derived-from-or-self(/acls/acl/type, " + + "'acl:eth-acl-type')"; + if-feature "match-on-eth"; + uses pf:acl-eth-header-fields; + description + "Rule set that matches Ethernet headers."; + } + description + "Match Layer 2 headers, for example, Ethernet + header fields."; + } + + choice l3 { + container ipv4 { + when "derived-from-or-self(/acls/acl/type, " + + "'acl:ipv4-acl-type')"; + if-feature "match-on-ipv4"; + uses pf:acl-ip-header-fields; + uses pf:acl-ipv4-header-fields; + description + "Rule set that matches IPv4 headers."; + } + + container ipv6 { + when "derived-from-or-self(/acls/acl/type, " + + "'acl:ipv6-acl-type')"; + if-feature "match-on-ipv6"; + uses pf:acl-ip-header-fields; + uses pf:acl-ipv6-header-fields; + description + "Rule set that matches IPv6 headers."; + } + description + "Choice of either IPv4 or IPv6 headers"; + } + choice l4 { + container tcp { + if-feature "match-on-tcp"; + uses pf:acl-tcp-header-fields; + container source-port { + choice source-port { + case range-or-operator { + uses pf:port-range-or-operator; + description + "Source port definition from range or + operator."; + } + description + "Choice of source port definition using + range/operator or a choice to support future + 'case' statements, such as one enabling a + group of source ports to be referenced."; + } + description + "Source port definition."; + } + container destination-port { + choice destination-port { + case range-or-operator { + uses pf:port-range-or-operator; + description + "Destination port definition from range or + operator."; + } + description + "Choice of destination port definition using + range/operator or a choice to support future + 'case' statements, such as one enabling a + group of destination ports to be referenced."; + } + description + "Destination port definition."; + } + description + "Rule set that matches TCP headers."; + } + + container udp { + if-feature "match-on-udp"; + uses pf:acl-udp-header-fields; + container source-port { + choice source-port { + case range-or-operator { + uses pf:port-range-or-operator; + description + "Source port definition from range or + operator."; + } + description + "Choice of source port definition using + range/operator or a choice to support future + 'case' statements, such as one enabling a + group of source ports to be referenced."; + } + description + "Source port definition."; + } + container destination-port { + choice destination-port { + case range-or-operator { + uses pf:port-range-or-operator; + description + "Destination port definition from range or + operator."; + } + description + "Choice of destination port definition using + range/operator or a choice to support future + 'case' statements, such as one enabling a + group of destination ports to be referenced."; + } + description + "Destination port definition."; + } + description + "Rule set that matches UDP headers."; + } + + container icmp { + if-feature "match-on-icmp"; + uses pf:acl-icmp-header-fields; + description + "Rule set that matches ICMP headers."; + } + description + "Choice of TCP, UDP, or ICMP headers."; + } + + leaf egress-interface { + type if:interface-ref; + description + "Egress interface. This should not be used if this ACL + is attached as an egress ACL (or the value should + equal the interface to which the ACL is attached)."; + } + + leaf ingress-interface { + type if:interface-ref; + description + "Ingress interface. This should not be used if this ACL + is attached as an ingress ACL (or the value should + equal the interface to which the ACL is attached)."; + } + } + + container actions { + description + "Definition of actions for this ace entry."; + leaf forwarding { + type identityref { + base forwarding-action; + } + mandatory true; + description + "Specifies the forwarding action per ace entry."; + } + + leaf logging { + type identityref { + base log-action; + } + default "log-none"; + description + "Specifies the log action and destination for + matched packets. Default value is not to log the + packet."; + } + } + container statistics { + if-feature "acl-aggregate-stats"; + config false; + description + "Statistics gathered across all attachment points for the + given ACL."; + uses acl-counters; + } + } + } + } + container attachment-points { + description + "Enclosing container for the list of + attachment points on which ACLs are set."; + /* + * Groupings + */ + grouping interface-acl { + description + "Grouping for per-interface ingress ACL data."; + container acl-sets { + description + "Enclosing container for the list of ingress ACLs on the + interface."; + list acl-set { + key "name"; + ordered-by user; + description + "List of ingress ACLs on the interface."; + leaf name { + type leafref { + path "/acls/acl/name"; + } + description + "Reference to the ACL name applied on the ingress."; + } + list ace-statistics { + if-feature "interface-stats"; + key "name"; + config false; + description + "List of ACEs."; + leaf name { + type leafref { + path "/acls/acl/aces/ace/name"; + } + description + "Name of the ace entry."; + } + uses acl-counters; + } + } + } + } + + list interface { + if-feature "interface-attachment"; + key "interface-id"; + description + "List of interfaces on which ACLs are set."; + + leaf interface-id { + type if:interface-ref; + description + "Reference to the interface id list key."; + } + + container ingress { + uses interface-acl; + description + "The ACLs applied to the ingress interface."; + } + container egress { + uses interface-acl; + description + "The ACLs applied to the egress interface."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-access-control-list@2019-03-04.yang b/models/ietf/RFC/ietf-access-control-list@2019-03-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..8bb0b626144bde08d3cfd421f83ab6f2e27268b4 --- /dev/null +++ b/models/ietf/RFC/ietf-access-control-list@2019-03-04.yang @@ -0,0 +1,668 @@ +module ietf-access-control-list { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-access-control-list"; + prefix acl; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991 - Common YANG Data Types."; + } + + import ietf-packet-fields { + prefix pf; + reference + "RFC 8519 - YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + import ietf-interfaces { + prefix if; + reference + "RFC 8343 - A YANG Data Model for Interface Management."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group."; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: netmod@ietf.org + + Editor: Mahesh Jethanandani + mjethanandani@gmail.com + Editor: Lisa Huang + huangyi_99@yahoo.com + Editor: Sonal Agarwal + sagarwal12@gmail.com + Editor: Dana Blair + dana@blairhome.com"; + + description + "This YANG module defines a component that describes the + configuration and monitoring of Access Control Lists (ACLs). + + 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. + + Copyright (c) 2019 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8519; see + the RFC itself for full legal notices."; + + revision 2019-03-04 { + description + "Initial version."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + /* + * Identities + */ + /* + * Forwarding actions for a packet + */ + + identity forwarding-action { + description + "Base identity for actions in the forwarding category."; + } + + identity accept { + base forwarding-action; + description + "Accept the packet."; + } + + identity drop { + base forwarding-action; + description + "Drop packet without sending any ICMP error message."; + } + + identity reject { + base forwarding-action; + description + "Drop the packet and send an ICMP error message to the source."; + } + + /* + * Logging actions for a packet + */ + + identity log-action { + description + "Base identity for defining the destination for logging + actions."; + } + + identity log-syslog { + base log-action; + description + "System log (syslog) the information for the packet."; + } + identity log-none { + base log-action; + description + "No logging for the packet."; + } + + /* + * ACL type identities + */ + + identity acl-base { + description + "Base Access Control List type for all Access Control List type + identifiers."; + } + + identity ipv4-acl-type { + base acl:acl-base; + if-feature "ipv4"; + description + "An ACL that matches on fields from the IPv4 header + (e.g., IPv4 destination address) and Layer 4 headers (e.g., TCP + destination port). An ACL of type ipv4 does not contain + matches on fields in the Ethernet header or the IPv6 header."; + } + + identity ipv6-acl-type { + base acl:acl-base; + if-feature "ipv6"; + description + "An ACL that matches on fields from the IPv6 header + (e.g., IPv6 destination address) and Layer 4 headers (e.g., TCP + destination port). An ACL of type ipv6 does not contain + matches on fields in the Ethernet header or the IPv4 header."; + } + + identity eth-acl-type { + base acl:acl-base; + if-feature "eth"; + description + "An ACL that matches on fields in the Ethernet header, + like 10/100/1000baseT or a Wi-Fi Access Control List. An ACL + of type ethernet does not contain matches on fields in the + IPv4 header, the IPv6 header, or Layer 4 headers."; + } + + identity mixed-eth-ipv4-acl-type { + base acl:eth-acl-type; + base acl:ipv4-acl-type; + if-feature "mixed-eth-ipv4"; + description + "An ACL that contains a mix of entries that match + on fields in Ethernet headers and in IPv4 headers. + Matching on Layer 4 header fields may also exist in the + list."; + } + + identity mixed-eth-ipv6-acl-type { + base acl:eth-acl-type; + base acl:ipv6-acl-type; + if-feature "mixed-eth-ipv6"; + description + "An ACL that contains a mix of entries that match on fields + in Ethernet headers and in IPv6 headers. Matching + on Layer 4 header fields may also exist in the list."; + } + + identity mixed-eth-ipv4-ipv6-acl-type { + base acl:eth-acl-type; + base acl:ipv4-acl-type; + base acl:ipv6-acl-type; + if-feature "mixed-eth-ipv4-ipv6"; + description + "An ACL that contains a mix of entries that + match on fields in Ethernet headers, IPv4 headers, and IPv6 + headers. Matching on Layer 4 header fields may also exist + in the list."; + } + + /* + * Features + */ + + /* + * Features supported by device + */ + feature match-on-eth { + description + "The device can support matching on Ethernet headers."; + } + + feature match-on-ipv4 { + description + "The device can support matching on IPv4 headers."; + } + + feature match-on-ipv6 { + description + "The device can support matching on IPv6 headers."; + } + + feature match-on-tcp { + description + "The device can support matching on TCP headers."; + } + + feature match-on-udp { + description + "The device can support matching on UDP headers."; + } + + feature match-on-icmp { + description + "The device can support matching on ICMP (v4 and v6) headers."; + } + + /* + * Header classifications combinations supported by + * device + */ + + feature eth { + if-feature "match-on-eth"; + description + "Plain Ethernet ACL supported."; + } + + feature ipv4 { + if-feature "match-on-ipv4"; + description + "Plain IPv4 ACL supported."; + } + + feature ipv6 { + if-feature "match-on-ipv6"; + description + "Plain IPv6 ACL supported."; + } + + feature mixed-eth-ipv4 { + if-feature "match-on-eth and match-on-ipv4"; + description + "Ethernet and IPv4 ACL combinations supported."; + } + feature mixed-eth-ipv6 { + if-feature "match-on-eth and match-on-ipv6"; + description + "Ethernet and IPv6 ACL combinations supported."; + } + + feature mixed-eth-ipv4-ipv6 { + if-feature + "match-on-eth and match-on-ipv4 + and match-on-ipv6"; + description + "Ethernet, IPv4, and IPv6 ACL combinations supported."; + } + + /* + * Stats Features + */ + feature interface-stats { + description + "ACL counters are available and reported only per interface."; + } + + feature acl-aggregate-stats { + description + "ACL counters are aggregated over all interfaces and reported + only per ACL entry."; + } + + /* + * Attachment point features + */ + feature interface-attachment { + description + "ACLs are set on interfaces."; + } + + /* + * Typedefs + */ + typedef acl-type { + type identityref { + base acl-base; + } + description + "This type is used to refer to an ACL type."; + } + + /* + * Groupings + */ + grouping acl-counters { + description + "Common grouping for ACL counters."; + leaf matched-packets { + type yang:counter64; + config false; + description + "Count of the number of packets matching the current ACL + entry. + + An implementation should provide this counter on a + per-interface, per-ACL-entry basis if possible. + + If an implementation only supports ACL counters on a per- + entry basis (i.e., not broken out per interface), then the + value should be equal to the aggregate count across all + interfaces. + + An implementation that provides counters on a per-entry, per- + interface basis is not required to also provide an aggregate + count, e.g., per entry -- the user is expected to be able to + implement the required aggregation if such a count is + needed."; + } + + leaf matched-octets { + type yang:counter64; + config false; + description + "Count of the number of octets (bytes) matching the current + ACL entry. + + An implementation should provide this counter on a + per-interface, per-ACL-entry basis if possible. + + If an implementation only supports ACL counters per entry + (i.e., not broken out per interface), then the value + should be equal to the aggregate count across all interfaces. + + An implementation that provides counters per entry per + interface is not required to also provide an aggregate count, + e.g., per entry -- the user is expected to be able to + implement the required aggregation if such a count is needed."; + } + } + + /* + * Configuration and monitoring data nodes + */ + + container acls { + description + "This is a top-level container for Access Control Lists. + It can have one or more acl nodes."; + list acl { + key "name"; + description + "An ACL is an ordered list of ACEs. Each ACE has a + list of match criteria and a list of actions. + Since there are several kinds of ACLs implemented + with different attributes for different vendors, + this model accommodates customizing ACLs for + each kind and for each vendor."; + leaf name { + type string { + length "1..64"; + } + description + "The name of the access list. A device MAY further + restrict the length of this name; space and special + characters are not allowed."; + } + leaf type { + type acl-type; + description + "Type of ACL. Indicates the primary intended + type of match criteria (e.g., Ethernet, IPv4, IPv6, mixed, + etc.) used in the list instance."; + } + container aces { + description + "The aces container contains one or more ACE nodes."; + list ace { + key "name"; + ordered-by user; + description + "List of ACEs."; + leaf name { + type string { + length "1..64"; + } + description + "A unique name identifying this ACE."; + } + container matches { + description + "The rules in this set determine what fields will be + matched upon before any action is taken on them. + The rules are selected based on the feature set + defined by the server and the acl-type defined. + If no matches are defined in a particular container, + then any packet will match that container. If no + matches are specified at all in an ACE, then any + packet will match the ACE."; + + choice l2 { + container eth { + when "derived-from-or-self(/acls/acl/type, " + + "'acl:eth-acl-type')"; + if-feature "match-on-eth"; + uses pf:acl-eth-header-fields; + description + "Rule set that matches Ethernet headers."; + } + description + "Match Layer 2 headers, for example, Ethernet + header fields."; + } + + choice l3 { + container ipv4 { + when "derived-from-or-self(/acls/acl/type, " + + "'acl:ipv4-acl-type')"; + if-feature "match-on-ipv4"; + uses pf:acl-ip-header-fields; + uses pf:acl-ipv4-header-fields; + description + "Rule set that matches IPv4 headers."; + } + + container ipv6 { + when "derived-from-or-self(/acls/acl/type, " + + "'acl:ipv6-acl-type')"; + if-feature "match-on-ipv6"; + uses pf:acl-ip-header-fields; + uses pf:acl-ipv6-header-fields; + description + "Rule set that matches IPv6 headers."; + } + description + "Choice of either IPv4 or IPv6 headers"; + } + choice l4 { + container tcp { + if-feature "match-on-tcp"; + uses pf:acl-tcp-header-fields; + container source-port { + choice source-port { + case range-or-operator { + uses pf:port-range-or-operator; + description + "Source port definition from range or + operator."; + } + description + "Choice of source port definition using + range/operator or a choice to support future + 'case' statements, such as one enabling a + group of source ports to be referenced."; + } + description + "Source port definition."; + } + container destination-port { + choice destination-port { + case range-or-operator { + uses pf:port-range-or-operator; + description + "Destination port definition from range or + operator."; + } + description + "Choice of destination port definition using + range/operator or a choice to support future + 'case' statements, such as one enabling a + group of destination ports to be referenced."; + } + description + "Destination port definition."; + } + description + "Rule set that matches TCP headers."; + } + + container udp { + if-feature "match-on-udp"; + uses pf:acl-udp-header-fields; + container source-port { + choice source-port { + case range-or-operator { + uses pf:port-range-or-operator; + description + "Source port definition from range or + operator."; + } + description + "Choice of source port definition using + range/operator or a choice to support future + 'case' statements, such as one enabling a + group of source ports to be referenced."; + } + description + "Source port definition."; + } + container destination-port { + choice destination-port { + case range-or-operator { + uses pf:port-range-or-operator; + description + "Destination port definition from range or + operator."; + } + description + "Choice of destination port definition using + range/operator or a choice to support future + 'case' statements, such as one enabling a + group of destination ports to be referenced."; + } + description + "Destination port definition."; + } + description + "Rule set that matches UDP headers."; + } + + container icmp { + if-feature "match-on-icmp"; + uses pf:acl-icmp-header-fields; + description + "Rule set that matches ICMP headers."; + } + description + "Choice of TCP, UDP, or ICMP headers."; + } + + leaf egress-interface { + type if:interface-ref; + description + "Egress interface. This should not be used if this ACL + is attached as an egress ACL (or the value should + equal the interface to which the ACL is attached)."; + } + + leaf ingress-interface { + type if:interface-ref; + description + "Ingress interface. This should not be used if this ACL + is attached as an ingress ACL (or the value should + equal the interface to which the ACL is attached)."; + } + } + + container actions { + description + "Definition of actions for this ace entry."; + leaf forwarding { + type identityref { + base forwarding-action; + } + mandatory true; + description + "Specifies the forwarding action per ace entry."; + } + + leaf logging { + type identityref { + base log-action; + } + default "log-none"; + description + "Specifies the log action and destination for + matched packets. Default value is not to log the + packet."; + } + } + container statistics { + if-feature "acl-aggregate-stats"; + config false; + description + "Statistics gathered across all attachment points for the + given ACL."; + uses acl-counters; + } + } + } + } + container attachment-points { + description + "Enclosing container for the list of + attachment points on which ACLs are set."; + /* + * Groupings + */ + grouping interface-acl { + description + "Grouping for per-interface ingress ACL data."; + container acl-sets { + description + "Enclosing container for the list of ingress ACLs on the + interface."; + list acl-set { + key "name"; + ordered-by user; + description + "List of ingress ACLs on the interface."; + leaf name { + type leafref { + path "/acls/acl/name"; + } + description + "Reference to the ACL name applied on the ingress."; + } + list ace-statistics { + if-feature "interface-stats"; + key "name"; + config false; + description + "List of ACEs."; + leaf name { + type leafref { + path "/acls/acl/aces/ace/name"; + } + description + "Name of the ace entry."; + } + uses acl-counters; + } + } + } + } + + list interface { + if-feature "interface-attachment"; + key "interface-id"; + description + "List of interfaces on which ACLs are set."; + + leaf interface-id { + type if:interface-ref; + description + "Reference to the interface id list key."; + } + + container ingress { + uses interface-acl; + description + "The ACLs applied to the ingress interface."; + } + container egress { + uses interface-acl; + description + "The ACLs applied to the egress interface."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-acldns.yang b/models/ietf/RFC/ietf-acldns.yang new file mode 100644 index 0000000000000000000000000000000000000000..44286e7f5657211ee31358a394a69128373a4d70 --- /dev/null +++ b/models/ietf/RFC/ietf-acldns.yang @@ -0,0 +1,78 @@ +module ietf-acldns { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-acldns"; + prefix ietf-acldns; + + import ietf-access-control-list { + prefix acl; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/opsawg/> + WG List: opsawg@ietf.org + + Author: Eliot Lear + lear@cisco.com + + Author: Ralph Droms + rdroms@gmail.com + + Author: Dan Romascanu + dromasca@gmail.com + "; + description + "This YANG module defines a component that augments the + IETF description of an access list to allow DNS names + as matching criteria. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info)."; + + revision 2019-01-28 { + description + "Base version of dnsname extension of the ACL model."; + reference + "RFC 8520: Manufacturer Usage Description + Specification"; + } + + grouping dns-matches { + description + "Domain names for matching."; + leaf src-dnsname { + type inet:host; + description + "domain name to be matched against."; + } + leaf dst-dnsname { + type inet:host; + description + "domain name to be matched against."; + } + } + + augment "/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches" + + "/acl:l3/acl:ipv4/acl:ipv4" { + description + "Adding domain names to matching."; + uses dns-matches; + } + augment "/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches" + + "/acl:l3/acl:ipv6/acl:ipv6" { + description + "Adding domain names to matching."; + uses dns-matches; + } +} diff --git a/models/ietf/RFC/ietf-acldns@2019-01-28.yang b/models/ietf/RFC/ietf-acldns@2019-01-28.yang new file mode 100644 index 0000000000000000000000000000000000000000..44286e7f5657211ee31358a394a69128373a4d70 --- /dev/null +++ b/models/ietf/RFC/ietf-acldns@2019-01-28.yang @@ -0,0 +1,78 @@ +module ietf-acldns { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-acldns"; + prefix ietf-acldns; + + import ietf-access-control-list { + prefix acl; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/opsawg/> + WG List: opsawg@ietf.org + + Author: Eliot Lear + lear@cisco.com + + Author: Ralph Droms + rdroms@gmail.com + + Author: Dan Romascanu + dromasca@gmail.com + "; + description + "This YANG module defines a component that augments the + IETF description of an access list to allow DNS names + as matching criteria. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info)."; + + revision 2019-01-28 { + description + "Base version of dnsname extension of the ACL model."; + reference + "RFC 8520: Manufacturer Usage Description + Specification"; + } + + grouping dns-matches { + description + "Domain names for matching."; + leaf src-dnsname { + type inet:host; + description + "domain name to be matched against."; + } + leaf dst-dnsname { + type inet:host; + description + "domain name to be matched against."; + } + } + + augment "/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches" + + "/acl:l3/acl:ipv4/acl:ipv4" { + description + "Adding domain names to matching."; + uses dns-matches; + } + augment "/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches" + + "/acl:l3/acl:ipv6/acl:ipv6" { + description + "Adding domain names to matching."; + uses dns-matches; + } +} diff --git a/models/ietf/RFC/ietf-alarms-x733.yang b/models/ietf/RFC/ietf-alarms-x733.yang new file mode 100644 index 0000000000000000000000000000000000000000..3e0b4f8409c4296cfbcbb871f0cc3c9c65f9f71c --- /dev/null +++ b/models/ietf/RFC/ietf-alarms-x733.yang @@ -0,0 +1,550 @@ +module ietf-alarms-x733 { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-alarms-x733"; + prefix x733; + + import ietf-alarms { + prefix al; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: <https://trac.ietf.org/trac/ccamp> + WG List: <mailto:ccamp@ietf.org> + + Editor: Stefan Vallin + <mailto:stefan@wallan.se> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module augments the ietf-alarms module with X.733 alarm + parameters. + + The following structures are augmented with the X.733 event type + and probable cause: + + 1) alarms/alarm-inventory: all possible alarm types + 2) alarms/alarm-list: every alarm in the system + 3) alarm-notification: notifications indicating alarm-state + changes + 4) alarms/shelved-alarms + + The module also optionally allows the alarm-management system + to configure the mapping from the ietf-alarms' alarm keys + to the ITU tuple (event-type, probable-cause). + + The mapping does not include a corresponding problem value + specific to X.733. The recommendation is to use the + 'alarm-type-qualifier' leaf, which serves the same purpose. + + The module uses an integer and a corresponding string for + probable cause instead of a globally defined enumeration, in + order to be able to manage conflicting enumeration definitions. + A single globally defined enumeration is challenging to + maintain. + + 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. + + Copyright (c) 2019 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 Simplified 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 8632; see + the RFC itself for full legal notices."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function"; + + revision 2019-09-11 { + description + "Initial revision."; + reference + "RFC 8632: A YANG Data Model for Alarm Management"; + } + + /* + * Features + */ + + feature configure-x733-mapping { + description + "The system supports configurable X733 mapping from + the ietf-alarms' alarm-type to X733 event-type + and probable-cause."; + } + + /* + * Typedefs + */ + + typedef event-type { + type enumeration { + enum other { + value 1; + description + "None of the below."; + } + enum communications-alarm { + value 2; + description + "An alarm of this type is principally associated with the + procedures and/or processes required to convey + information from one point to another."; + } + enum quality-of-service-alarm { + value 3; + description + "An alarm of this type is principally associated with a + degradation in the quality of a service."; + } + enum processing-error-alarm { + value 4; + description + "An alarm of this type is principally associated with a + software or processing fault."; + } + enum equipment-alarm { + value 5; + description + "An alarm of this type is principally associated with an + equipment fault."; + } + enum environmental-alarm { + value 6; + description + "An alarm of this type is principally associated with a + condition relating to an enclosure in which the equipment + resides."; + } + enum integrity-violation { + value 7; + description + "An indication that information may have been illegally + modified, inserted, or deleted."; + } + enum operational-violation { + value 8; + description + "An indication that the provision of the requested service + was not possible due to the unavailability, malfunction, + or incorrect invocation of the service."; + } + enum physical-violation { + value 9; + description + "An indication that a physical resource has been violated + in a way that suggests a security attack."; + } + enum security-service-or-mechanism-violation { + value 10; + description + "An indication that a security attack has been detected by + a security service or mechanism."; + } + enum time-domain-violation { + value 11; + description + "An indication that an event has occurred at an unexpected + or prohibited time."; + } + } + description + "The event types as defined by X.733 and X.736."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function + ITU-T Recommendation X.736: Information Technology + - Open Systems Interconnection + - System Management: Security Alarm Reporting Function"; + } + + typedef trend { + type enumeration { + enum less-severe { + description + "There is at least one outstanding alarm of a + severity higher (more severe) than that in the + current alarm."; + } + enum no-change { + description + "The Perceived severity reported in the current + alarm is the same as the highest (most severe) + of any of the outstanding alarms"; + } + enum more-severe { + description + "The Perceived severity in the current alarm is + higher (more severe) than that reported in any + of the outstanding alarms."; + } + } + description + "This type is used to describe the + severity trend of the alarming resource."; + reference + "ITU-T Recommendation X.721: Information Technology + - Open Systems Interconnection + - Structure of management information: + Definition of management information + Module Attribute-ASN1Module"; + } + + typedef value-type { + type union { + type int64; + type uint64; + type decimal64 { + fraction-digits 2; + } + } + description + "A generic union type to match the ITU choice of + integer and real."; + } + + /* + * Groupings + */ + + grouping x733-alarm-parameters { + description + "Common X.733 parameters for alarms."; + leaf event-type { + type event-type; + description + "The X.733/X.736 event type for this alarm."; + } + leaf probable-cause { + type uint32; + description + "The X.733 probable cause for this alarm."; + } + leaf probable-cause-string { + type string; + description + "The user-friendly string matching + the probable cause integer value. The string + SHOULD match the X.733 enumeration. For example, + value 27 is 'localNodeTransmissionError'."; + } + container threshold-information { + description + "This parameter shall be present when the alarm + is a result of crossing a threshold. "; + leaf triggered-threshold { + type string; + description + "The identifier of the threshold attribute that + caused the notification."; + } + leaf observed-value { + type value-type; + description + "The value of the gauge or counter that crossed + the threshold. This may be different from the + threshold value if, for example, the gauge may + only take on discrete values."; + } + choice threshold-level { + description + "In the case of a gauge, the threshold level specifies + a pair of threshold values: the first is the value + of the crossed threshold, and the second is its + corresponding hysteresis; in the case of a counter, + the threshold level specifies only the threshold + value."; + case up { + leaf up-high { + type value-type; + description + "The going-up threshold for raising the alarm."; + } + leaf up-low { + type value-type; + description + "The going-down threshold for clearing the alarm. + This is used for hysteresis functions for gauges."; + } + } + case down { + leaf down-low { + type value-type; + description + "The going-down threshold for raising the alarm."; + } + leaf down-high { + type value-type; + description + "The going-up threshold for clearing the alarm. + This is used for hysteresis functions for gauges."; + } + } + } + leaf arm-time { + type yang:date-and-time; + description + "For a gauge threshold, it's the time at which the + threshold was last re-armed; namely, it's the time after + the previous threshold crossing at which the hysteresis + value of the threshold was exceeded, thus again permitting + the generation of notifications when the threshold is + crossed. For a counter threshold, it's the later of the + time at which the threshold offset was last applied or the + counter was last initialized (for resettable counters)."; + } + } + list monitored-attributes { + uses attribute; + key "id"; + description + "The Monitored attributes parameter, when present, defines + one or more attributes of the resource and their + corresponding values at the time of the alarm."; + } + leaf-list proposed-repair-actions { + type string; + description + "This parameter, when present, is used if the cause is + known and the system being managed can suggest one or + more solutions (such as switch in standby equipment, + retry, and replace media)."; + } + leaf trend-indication { + type trend; + description + "This parameter specifies the current severity + trend of the resource. If present, it indicates + that there are one or more alarms ('outstanding + alarms') that have not been cleared and that + pertain to the same resource as this alarm + ('current alarm') does. The possible values are: + + more-severe: The Perceived severity in the current + alarm is higher (more severe) than that reported in + any of the outstanding alarms. + + no-change: The Perceived severity reported in the + current alarm is the same as the highest (most severe) + of any of the outstanding alarms. + + less-severe: There is at least one outstanding alarm + of a severity higher (more severe) than that in the + current alarm."; + } + leaf backedup-status { + type boolean; + description + "This parameter, when present, specifies whether or not the + object emitting the alarm has been backed up; therefore, it + is possible to know whether or not services provided to the + user have been disrupted when this parameter is included. + The use of this field in conjunction with the + 'perceived-severity' field provides information in an + independent form to qualify the seriousness of the alarm and + the ability of the system as a whole to continue to provide + services. If the value of this parameter is true, it + indicates that the object emitting the alarm has been backed + up; if false, the object has not been backed up."; + } + leaf backup-object { + type al:resource; + description + "This parameter SHALL be present when the 'backedup-status' + parameter is present and has the value 'true'. This + parameter specifies the managed object instance that is + providing back-up services for the managed object to which + the notification pertains. This parameter is useful, for + example, when the back-up object is from a pool of objects, + any of which may be dynamically allocated to replace a + faulty object."; + } + list additional-information { + key "identifier"; + description + "This parameter allows the inclusion of an additional + information set in the alarm. It is a series of data + structures, each of which contains three items of + information: an identifier, a significance indicator, + and the problem information."; + leaf identifier { + type string; + description + "Identifies the data type of the information parameter."; + } + leaf significant { + type boolean; + description + "Set to 'true' if the receiving system must be able to + parse the contents of the information subparameter + for the event report to be fully understood."; + } + leaf information { + type string; + description + "Additional information about the alarm."; + } + } + leaf security-alarm-detector { + type al:resource; + description + "This parameter identifies the detector of the security + alarm."; + } + leaf service-user { + type al:resource; + description + "This parameter identifies the service-user whose request + for service led to the generation of the security alarm."; + } + leaf service-provider { + type al:resource; + description + "This parameter identifies the intended service-provider + of the service that led to the generation of the security + alarm."; + } + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function + ITU-T Recommendation X.736: Information Technology + - Open Systems Interconnection + - System Management: Security Alarm Reporting Function"; + } + + grouping x733-alarm-definition-parameters { + description + "Common X.733 parameters for alarm definitions. + This grouping is used to define those alarm + attributes that can be mapped from the alarm-type + mechanism in the ietf-alarms module."; + leaf event-type { + type event-type; + description + "The alarm type has this X.733/X.736 event type."; + } + leaf probable-cause { + type uint32; + description + "The alarm type has this X.733 probable cause value. + This module defines probable cause as an integer + and not as an enumeration. The reason being that the + primary use of probable cause is in the management + application if it is based on the X.733 standard. + However, most management applications have their own + defined enum definitions and merging enums from + different systems might create conflicts. By using + a configurable uint32, the system can be configured + to match the enum values in the management application."; + } + leaf probable-cause-string { + type string; + description + "This string can be used to give a user-friendly string + to the probable cause value."; + } + } + + grouping attribute { + description + "A grouping to match the ITU generic reference to + an attribute."; + leaf id { + type al:resource; + description + "The resource representing the attribute."; + } + leaf value { + type string; + description + "The value represented as a string since it could + be of any type."; + } + reference + "ITU-T Recommendation X.721: Information Technology + - Open Systems Interconnection + - Structure of management information: + Definition of management information + Module Attribute-ASN1Module"; + } + + /* + * Add X.733 parameters to the alarm definitions, alarms, + * and notification. + */ + + augment "/al:alarms/al:alarm-inventory/al:alarm-type" { + description + "Augment X.733 mapping information to the alarm inventory."; + uses x733-alarm-definition-parameters; + } + + /* + * Add X.733 configurable mapping. + */ + + augment "/al:alarms/al:control" { + description + "Add X.733 mapping capabilities. "; + list x733-mapping { + if-feature "configure-x733-mapping"; + key "alarm-type-id alarm-type-qualifier-match"; + description + "This list allows a management application to control the + X.733 mapping for all alarm types in the system. Any entry + in this list will allow the alarm manager to override the + default X.733 mapping in the system, and the final mapping + will be shown in the alarm inventory."; + leaf alarm-type-id { + type al:alarm-type-id; + description + "Map the alarm type with this alarm type identifier."; + } + leaf alarm-type-qualifier-match { + type string; + description + "A W3C regular expression that is used when mapping an + alarm type and alarm-type-qualifier to X.733 parameters."; + } + uses x733-alarm-definition-parameters; + } + } + + augment "/al:alarms/al:alarm-list/al:alarm" { + description + "Augment X.733 information to the alarm."; + uses x733-alarm-parameters; + } + + augment "/al:alarms/al:shelved-alarms/al:shelved-alarm" { + description + "Augment X.733 information to the alarm."; + uses x733-alarm-parameters; + } + + augment "/al:alarm-notification" { + description + "Augment X.733 information to the alarm notification."; + uses x733-alarm-parameters; + } +} diff --git a/models/ietf/RFC/ietf-alarms-x733@2019-09-11.yang b/models/ietf/RFC/ietf-alarms-x733@2019-09-11.yang new file mode 100644 index 0000000000000000000000000000000000000000..3e0b4f8409c4296cfbcbb871f0cc3c9c65f9f71c --- /dev/null +++ b/models/ietf/RFC/ietf-alarms-x733@2019-09-11.yang @@ -0,0 +1,550 @@ +module ietf-alarms-x733 { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-alarms-x733"; + prefix x733; + + import ietf-alarms { + prefix al; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: <https://trac.ietf.org/trac/ccamp> + WG List: <mailto:ccamp@ietf.org> + + Editor: Stefan Vallin + <mailto:stefan@wallan.se> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module augments the ietf-alarms module with X.733 alarm + parameters. + + The following structures are augmented with the X.733 event type + and probable cause: + + 1) alarms/alarm-inventory: all possible alarm types + 2) alarms/alarm-list: every alarm in the system + 3) alarm-notification: notifications indicating alarm-state + changes + 4) alarms/shelved-alarms + + The module also optionally allows the alarm-management system + to configure the mapping from the ietf-alarms' alarm keys + to the ITU tuple (event-type, probable-cause). + + The mapping does not include a corresponding problem value + specific to X.733. The recommendation is to use the + 'alarm-type-qualifier' leaf, which serves the same purpose. + + The module uses an integer and a corresponding string for + probable cause instead of a globally defined enumeration, in + order to be able to manage conflicting enumeration definitions. + A single globally defined enumeration is challenging to + maintain. + + 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. + + Copyright (c) 2019 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 Simplified 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 8632; see + the RFC itself for full legal notices."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function"; + + revision 2019-09-11 { + description + "Initial revision."; + reference + "RFC 8632: A YANG Data Model for Alarm Management"; + } + + /* + * Features + */ + + feature configure-x733-mapping { + description + "The system supports configurable X733 mapping from + the ietf-alarms' alarm-type to X733 event-type + and probable-cause."; + } + + /* + * Typedefs + */ + + typedef event-type { + type enumeration { + enum other { + value 1; + description + "None of the below."; + } + enum communications-alarm { + value 2; + description + "An alarm of this type is principally associated with the + procedures and/or processes required to convey + information from one point to another."; + } + enum quality-of-service-alarm { + value 3; + description + "An alarm of this type is principally associated with a + degradation in the quality of a service."; + } + enum processing-error-alarm { + value 4; + description + "An alarm of this type is principally associated with a + software or processing fault."; + } + enum equipment-alarm { + value 5; + description + "An alarm of this type is principally associated with an + equipment fault."; + } + enum environmental-alarm { + value 6; + description + "An alarm of this type is principally associated with a + condition relating to an enclosure in which the equipment + resides."; + } + enum integrity-violation { + value 7; + description + "An indication that information may have been illegally + modified, inserted, or deleted."; + } + enum operational-violation { + value 8; + description + "An indication that the provision of the requested service + was not possible due to the unavailability, malfunction, + or incorrect invocation of the service."; + } + enum physical-violation { + value 9; + description + "An indication that a physical resource has been violated + in a way that suggests a security attack."; + } + enum security-service-or-mechanism-violation { + value 10; + description + "An indication that a security attack has been detected by + a security service or mechanism."; + } + enum time-domain-violation { + value 11; + description + "An indication that an event has occurred at an unexpected + or prohibited time."; + } + } + description + "The event types as defined by X.733 and X.736."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function + ITU-T Recommendation X.736: Information Technology + - Open Systems Interconnection + - System Management: Security Alarm Reporting Function"; + } + + typedef trend { + type enumeration { + enum less-severe { + description + "There is at least one outstanding alarm of a + severity higher (more severe) than that in the + current alarm."; + } + enum no-change { + description + "The Perceived severity reported in the current + alarm is the same as the highest (most severe) + of any of the outstanding alarms"; + } + enum more-severe { + description + "The Perceived severity in the current alarm is + higher (more severe) than that reported in any + of the outstanding alarms."; + } + } + description + "This type is used to describe the + severity trend of the alarming resource."; + reference + "ITU-T Recommendation X.721: Information Technology + - Open Systems Interconnection + - Structure of management information: + Definition of management information + Module Attribute-ASN1Module"; + } + + typedef value-type { + type union { + type int64; + type uint64; + type decimal64 { + fraction-digits 2; + } + } + description + "A generic union type to match the ITU choice of + integer and real."; + } + + /* + * Groupings + */ + + grouping x733-alarm-parameters { + description + "Common X.733 parameters for alarms."; + leaf event-type { + type event-type; + description + "The X.733/X.736 event type for this alarm."; + } + leaf probable-cause { + type uint32; + description + "The X.733 probable cause for this alarm."; + } + leaf probable-cause-string { + type string; + description + "The user-friendly string matching + the probable cause integer value. The string + SHOULD match the X.733 enumeration. For example, + value 27 is 'localNodeTransmissionError'."; + } + container threshold-information { + description + "This parameter shall be present when the alarm + is a result of crossing a threshold. "; + leaf triggered-threshold { + type string; + description + "The identifier of the threshold attribute that + caused the notification."; + } + leaf observed-value { + type value-type; + description + "The value of the gauge or counter that crossed + the threshold. This may be different from the + threshold value if, for example, the gauge may + only take on discrete values."; + } + choice threshold-level { + description + "In the case of a gauge, the threshold level specifies + a pair of threshold values: the first is the value + of the crossed threshold, and the second is its + corresponding hysteresis; in the case of a counter, + the threshold level specifies only the threshold + value."; + case up { + leaf up-high { + type value-type; + description + "The going-up threshold for raising the alarm."; + } + leaf up-low { + type value-type; + description + "The going-down threshold for clearing the alarm. + This is used for hysteresis functions for gauges."; + } + } + case down { + leaf down-low { + type value-type; + description + "The going-down threshold for raising the alarm."; + } + leaf down-high { + type value-type; + description + "The going-up threshold for clearing the alarm. + This is used for hysteresis functions for gauges."; + } + } + } + leaf arm-time { + type yang:date-and-time; + description + "For a gauge threshold, it's the time at which the + threshold was last re-armed; namely, it's the time after + the previous threshold crossing at which the hysteresis + value of the threshold was exceeded, thus again permitting + the generation of notifications when the threshold is + crossed. For a counter threshold, it's the later of the + time at which the threshold offset was last applied or the + counter was last initialized (for resettable counters)."; + } + } + list monitored-attributes { + uses attribute; + key "id"; + description + "The Monitored attributes parameter, when present, defines + one or more attributes of the resource and their + corresponding values at the time of the alarm."; + } + leaf-list proposed-repair-actions { + type string; + description + "This parameter, when present, is used if the cause is + known and the system being managed can suggest one or + more solutions (such as switch in standby equipment, + retry, and replace media)."; + } + leaf trend-indication { + type trend; + description + "This parameter specifies the current severity + trend of the resource. If present, it indicates + that there are one or more alarms ('outstanding + alarms') that have not been cleared and that + pertain to the same resource as this alarm + ('current alarm') does. The possible values are: + + more-severe: The Perceived severity in the current + alarm is higher (more severe) than that reported in + any of the outstanding alarms. + + no-change: The Perceived severity reported in the + current alarm is the same as the highest (most severe) + of any of the outstanding alarms. + + less-severe: There is at least one outstanding alarm + of a severity higher (more severe) than that in the + current alarm."; + } + leaf backedup-status { + type boolean; + description + "This parameter, when present, specifies whether or not the + object emitting the alarm has been backed up; therefore, it + is possible to know whether or not services provided to the + user have been disrupted when this parameter is included. + The use of this field in conjunction with the + 'perceived-severity' field provides information in an + independent form to qualify the seriousness of the alarm and + the ability of the system as a whole to continue to provide + services. If the value of this parameter is true, it + indicates that the object emitting the alarm has been backed + up; if false, the object has not been backed up."; + } + leaf backup-object { + type al:resource; + description + "This parameter SHALL be present when the 'backedup-status' + parameter is present and has the value 'true'. This + parameter specifies the managed object instance that is + providing back-up services for the managed object to which + the notification pertains. This parameter is useful, for + example, when the back-up object is from a pool of objects, + any of which may be dynamically allocated to replace a + faulty object."; + } + list additional-information { + key "identifier"; + description + "This parameter allows the inclusion of an additional + information set in the alarm. It is a series of data + structures, each of which contains three items of + information: an identifier, a significance indicator, + and the problem information."; + leaf identifier { + type string; + description + "Identifies the data type of the information parameter."; + } + leaf significant { + type boolean; + description + "Set to 'true' if the receiving system must be able to + parse the contents of the information subparameter + for the event report to be fully understood."; + } + leaf information { + type string; + description + "Additional information about the alarm."; + } + } + leaf security-alarm-detector { + type al:resource; + description + "This parameter identifies the detector of the security + alarm."; + } + leaf service-user { + type al:resource; + description + "This parameter identifies the service-user whose request + for service led to the generation of the security alarm."; + } + leaf service-provider { + type al:resource; + description + "This parameter identifies the intended service-provider + of the service that led to the generation of the security + alarm."; + } + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function + ITU-T Recommendation X.736: Information Technology + - Open Systems Interconnection + - System Management: Security Alarm Reporting Function"; + } + + grouping x733-alarm-definition-parameters { + description + "Common X.733 parameters for alarm definitions. + This grouping is used to define those alarm + attributes that can be mapped from the alarm-type + mechanism in the ietf-alarms module."; + leaf event-type { + type event-type; + description + "The alarm type has this X.733/X.736 event type."; + } + leaf probable-cause { + type uint32; + description + "The alarm type has this X.733 probable cause value. + This module defines probable cause as an integer + and not as an enumeration. The reason being that the + primary use of probable cause is in the management + application if it is based on the X.733 standard. + However, most management applications have their own + defined enum definitions and merging enums from + different systems might create conflicts. By using + a configurable uint32, the system can be configured + to match the enum values in the management application."; + } + leaf probable-cause-string { + type string; + description + "This string can be used to give a user-friendly string + to the probable cause value."; + } + } + + grouping attribute { + description + "A grouping to match the ITU generic reference to + an attribute."; + leaf id { + type al:resource; + description + "The resource representing the attribute."; + } + leaf value { + type string; + description + "The value represented as a string since it could + be of any type."; + } + reference + "ITU-T Recommendation X.721: Information Technology + - Open Systems Interconnection + - Structure of management information: + Definition of management information + Module Attribute-ASN1Module"; + } + + /* + * Add X.733 parameters to the alarm definitions, alarms, + * and notification. + */ + + augment "/al:alarms/al:alarm-inventory/al:alarm-type" { + description + "Augment X.733 mapping information to the alarm inventory."; + uses x733-alarm-definition-parameters; + } + + /* + * Add X.733 configurable mapping. + */ + + augment "/al:alarms/al:control" { + description + "Add X.733 mapping capabilities. "; + list x733-mapping { + if-feature "configure-x733-mapping"; + key "alarm-type-id alarm-type-qualifier-match"; + description + "This list allows a management application to control the + X.733 mapping for all alarm types in the system. Any entry + in this list will allow the alarm manager to override the + default X.733 mapping in the system, and the final mapping + will be shown in the alarm inventory."; + leaf alarm-type-id { + type al:alarm-type-id; + description + "Map the alarm type with this alarm type identifier."; + } + leaf alarm-type-qualifier-match { + type string; + description + "A W3C regular expression that is used when mapping an + alarm type and alarm-type-qualifier to X.733 parameters."; + } + uses x733-alarm-definition-parameters; + } + } + + augment "/al:alarms/al:alarm-list/al:alarm" { + description + "Augment X.733 information to the alarm."; + uses x733-alarm-parameters; + } + + augment "/al:alarms/al:shelved-alarms/al:shelved-alarm" { + description + "Augment X.733 information to the alarm."; + uses x733-alarm-parameters; + } + + augment "/al:alarm-notification" { + description + "Augment X.733 information to the alarm notification."; + uses x733-alarm-parameters; + } +} diff --git a/models/ietf/RFC/ietf-alarms.yang b/models/ietf/RFC/ietf-alarms.yang new file mode 100644 index 0000000000000000000000000000000000000000..a1c195faf0e9788f84c75c744d13b8fa6fc16d46 --- /dev/null +++ b/models/ietf/RFC/ietf-alarms.yang @@ -0,0 +1,1526 @@ +module ietf-alarms { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-alarms"; + prefix al; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: <https://trac.ietf.org/trac/ccamp> + WG List: <mailto:ccamp@ietf.org> + + Editor: Stefan Vallin + <mailto:stefan@wallan.se> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module defines an interface for managing alarms. Main + inputs to the module design are the 3GPP Alarm Integration + Reference Point (IRP), ITU-T X.733, and ANSI/ISA-18.2 alarm + standards. + Main features of this module include: + + * Alarm list: + A list of all alarms. Cleared alarms stay in + the list until explicitly purged. + + * Operator actions on alarms: + Acknowledging and closing alarms. + + * Administrative actions on alarms: + Purging alarms from the list according to specific + criteria. + + * Alarm inventory: + A management application can read all + alarm types implemented by the system. + + * Alarm shelving: + Shelving (blocking) alarms according + to specific criteria. + + * Alarm profiles: + A management system can attach further + information to alarm types, for example, + overriding system-default severity + levels. + + This module uses a stateful view on alarms. An alarm is a state + for a specific resource (note that an alarm is not a + notification). An alarm type is a possible alarm state for a + resource. For example, the tuple: + + ('link-alarm', 'GigabitEthernet0/25') + + is an alarm of type 'link-alarm' on the resource + 'GigabitEthernet0/25'. + + Alarm types are identified using YANG identities and an optional + string-based qualifier. The string-based qualifier allows for + dynamic extension of the statically defined alarm types. Alarm + types identify a possible alarm state and not the individual + notifications. For example, the traditional 'link-down' and + 'link-up' notifications are two notifications referring to the + same alarm type 'link-alarm'. + + With this design, there is no ambiguity about how alarm and + alarm clear correlation should be performed; notifications that + report the same resource and alarm type are considered updates + of the same alarm, e.g., clearing an active alarm or changing + the severity of an alarm. The instrumentation can update the + severity and alarm text on an existing alarm. The above alarm + example can therefore look like the following: + + (('link-alarm', 'GigabitEthernet0/25'), + warning, + 'interface down while interface admin state is up') + + There is a clear separation between updates on the alarm from + the underlying resource, like clear, and updates from an + operator, like acknowledging or closing an alarm: + + (('link-alarm', 'GigabitEthernet0/25'), + warning, + 'interface down while interface admin state is up', + cleared, + closed) + + Administrative actions like removing closed alarms older than a + given time is supported. + + This YANG module does not define how the underlying + instrumentation detects and clears the specific alarms. That + belongs to the Standards Development Organization (SDO) or + enterprise that owns that specific technology. + + 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. + + Copyright (c) 2019 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 Simplified 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 8632; see + the RFC itself for full legal notices."; + + revision 2019-09-11 { + description + "Initial revision."; + reference + "RFC 8632: A YANG Data Model for Alarm Management"; + } + + /* + * Features + */ + + feature operator-actions { + description + "This feature indicates that the system supports operator + states on alarms."; + } + + feature alarm-shelving { + description + "This feature indicates that the system supports shelving + (blocking) alarms. + + Alarm shelving may have an impact on server processing + resources in order to match alarms against shelf + criteria."; + } + + feature alarm-history { + description + "This feature indicates that the server maintains a history + of state changes for each alarm. For example, if an alarm + toggles between cleared and active 10 times, these state + changes are present in a separate list in the alarm. + + Keeping the alarm history may have an impact on server + memory resources."; + } + + feature alarm-summary { + description + "This feature indicates that the server summarizes the number + of alarms per severity and operator state."; + } + + feature alarm-profile { + description + "The system enables clients to configure further information + to each alarm type."; + } + + feature severity-assignment { + description + "The system supports configurable alarm severity levels."; + reference + "ITU-T Recommendation M.3100: + Generic network information model + ITU-T Recommendation M.3160: + Generic, protocol-neutral management information model"; + } + + feature root-cause-analysis { + description + "The system supports identifying candidate root-cause + resources for an alarm, for example, a disk partition + root cause for a logger failure alarm."; + } + + feature service-impact-analysis { + description + "The system supports identifying candidate-impacted + resources for an alarm, for example, an interface state change + resulting in a link alarm, which can refer to a link as being + impacted."; + } + + feature alarm-correlation { + description + "The system supports correlating/grouping alarms + that belong together."; + } + + /* + * Identities + */ + + identity alarm-type-id { + description + "Base identity for alarm types. A unique identification of + the alarm, not including the resource. Different resources + can share alarm types. If the resource reports the same + alarm type, it is considered to be the same alarm. The alarm + type is a simplification of the different X.733 and 3GPP Alarm + IRP correlation mechanisms, and it allows for + hierarchical extensions. + + A string-based qualifier can be used in addition to the + identity in order to have different alarm types based on + information not known at design time, such as values in + textual SNMP Notification varbinds. + + Standards and vendors can define sub-identities to clearly + identify specific alarm types. + + This identity is abstract and MUST NOT be used for alarms."; + } + + /* + * Common types + */ + + typedef resource { + type union { + type instance-identifier { + require-instance false; + } + type yang:object-identifier; + type string; + type yang:uuid; + } + description + "This is an identification of the alarming resource, such as an + interface. It should be as fine-grained as possible to both + guide the operator and guarantee uniqueness of the alarms. + + If the alarming resource is modeled in YANG, this type will + be an instance-identifier. + + If the resource is an SNMP object, the type will be an + 'object-identifier'. + + If the resource is anything else, for example, a distinguished + name or a Common Information Model (CIM) path, this type will + be a string. + + If the alarming object is identified by a Universally Unique + Identifier (UUID), use the uuid type. Be cautious when using + this type, since a UUID is hard to use for an operator. + + If the server supports several models, the precedence should + be in the order as given in the union definition."; + } + + typedef resource-match { + type union { + type yang:xpath1.0; + type yang:object-identifier; + type string; + } + description + "This type is used to match resources of type 'resource'. + Since the type 'resource' is a union of different types, the + 'resource-match' type is also a union of corresponding types. + + If the type is given as an XPath 1.0 expression, a resource + of type 'instance-identifier' matches if the instance is part + of the node set that is the result of evaluating the XPath 1.0 + expression. For example, the XPath 1.0 expression: + + /ietf-interfaces:interfaces/ietf-interfaces:interface + [ietf-interfaces:type='ianaift:ethernetCsmacd'] + + would match the resource instance-identifier: + + /if:interfaces/if:interface[if:name='eth1'], + + assuming that the interface 'eth1' is of type + 'ianaift:ethernetCsmacd'. + + If the type is given as an object identifier, a resource of + type 'object-identifier' matches if the match object + identifier is a prefix of the resource's object identifier. + For example, the value: + + 1.3.6.1.2.1.2.2 + + would match the resource object identifier: + + 1.3.6.1.2.1.2.2.1.1.5 + + If the type is given as an UUID or a string, it is interpreted + as an XML Schema regular expression, which matches a resource + of type 'yang:uuid' or 'string' if the given regular + expression matches the resource string. + + If the type is given as an XPath expression, it is evaluated + in the following XPath context: + + o The set of namespace declarations is the set of prefix + and namespace pairs for all YANG modules implemented by + the server, where the prefix is the YANG module name and + the namespace is as defined by the 'namespace' statement + in the YANG module. + + If a leaf of this type is encoded in XML, all namespace + declarations in scope on the leaf element are added to + the set of namespace declarations. If a prefix found in + the XML is already present in the set of namespace + declarations, the namespace in the XML is used. + + o The set of variable bindings is empty. + + o The function library is the core function library, and + the functions are defined in Section 10 of RFC 7950. + + o The context node is the root node in the data tree."; + reference + "XML Schema Part 2: Datatypes Second Edition, + World Wide Web Consortium Recommendation + REC-xmlschema-2-20041028"; + } + + typedef alarm-text { + type string; + description + "The string used to inform operators about the alarm. This + MUST contain enough information for an operator to be able to + understand the problem and how to resolve it. If this string + contains structure, this format should be clearly documented + for programs to be able to parse that information."; + } + + typedef severity { + type enumeration { + enum indeterminate { + value 2; + description + "Indicates that the severity level could not be + determined. This level SHOULD be avoided."; + } + enum warning { + value 3; + description + "The 'warning' severity level indicates the detection of a + potential or impending service-affecting fault, before any + significant effects have been felt. Action should be + taken to further diagnose (if necessary) and correct the + problem in order to prevent it from becoming a more + serious service-affecting fault."; + } + enum minor { + value 4; + description + "The 'minor' severity level indicates the existence of a + non-service-affecting fault condition and that corrective + action should be taken in order to prevent a more serious + (for example, service-affecting) fault. Such a severity + can be reported, for example, when the detected alarm + condition is not currently degrading the capacity of the + resource."; + } + enum major { + value 5; + description + "The 'major' severity level indicates that a service- + affecting condition has developed and an urgent corrective + action is required. Such a severity can be reported, for + example, when there is a severe degradation in the + capability of the resource and its full capability must be + restored."; + } + enum critical { + value 6; + description + "The 'critical' severity level indicates that a service- + affecting condition has occurred and an immediate + corrective action is required. Such a severity can be + reported, for example, when a resource becomes totally out + of service and its capability must be restored."; + } + } + description + "The severity level of the alarm. Note well that the value + 'clear' is not included. Whether or not an alarm is cleared + is a separate boolean flag."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function"; + } + + typedef severity-with-clear { + type union { + type enumeration { + enum cleared { + value 1; + description + "The alarm is cleared by the instrumentation."; + } + } + type severity; + } + description + "The severity level of the alarm including clear. This is used + only in notifications reporting state changes for an alarm."; + } + + typedef writable-operator-state { + type enumeration { + enum none { + value 1; + description + "The alarm is not being taken care of."; + } + enum ack { + value 2; + description + "The alarm is being taken care of. Corrective action not + taken yet or has failed"; + } + enum closed { + value 3; + description + "Corrective action taken successfully."; + } + } + description + "Operator states on an alarm. The 'closed' state indicates + that an operator considers the alarm being resolved. This is + separate from the alarm's 'is-cleared' leaf."; + } + + typedef operator-state { + type union { + type writable-operator-state; + type enumeration { + enum shelved { + value 4; + description + "The alarm is shelved. Alarms in /alarms/shelved-alarms/ + MUST be assigned this operator state by the server as + the last entry in the 'operator-state-change' list. The + text for that entry SHOULD include the shelf name."; + } + enum un-shelved { + value 5; + description + "The alarm is moved back to 'alarm-list' from a shelf. + Alarms that are moved from /alarms/shelved-alarms/ to + /alarms/alarm-list MUST be assigned this state by the + server as the last entry in the 'operator-state-change' + list. The text for that entry SHOULD include the shelf + name."; + } + } + } + description + "Operator states on an alarm. The 'closed' state indicates + that an operator considers the alarm being resolved. This is + separate from the alarm's 'is-cleared' leaf."; + } + + /* Alarm type */ + + typedef alarm-type-id { + type identityref { + base alarm-type-id; + } + description + "Identifies an alarm type. The description of the alarm type + id MUST indicate whether or not the alarm type is abstract. + An abstract alarm type is used as a base for other alarm type + ids and will not be used as a value for an alarm or be present + in the alarm inventory."; + } + + typedef alarm-type-qualifier { + type string; + description + "If an alarm type cannot be fully specified at design time by + 'alarm-type-id', this string qualifier is used in addition to + fully define a unique alarm type. + + The definition of alarm qualifiers is considered to be part of + the instrumentation and is out of scope for this module. An + empty string is used when this is part of a key."; + } + + /* + * Groupings + */ + + grouping common-alarm-parameters { + description + "Common parameters for an alarm. + + This grouping is used both in the alarm list and in the + notification representing an alarm-state change."; + leaf resource { + type resource; + mandatory true; + description + "The alarming resource. See also 'alt-resource'. This could + be, for example, a reference to the alarming interface"; + } + leaf alarm-type-id { + type alarm-type-id; + mandatory true; + description + "This leaf and the leaf 'alarm-type-qualifier' together + provide a unique identification of the alarm type."; + } + leaf alarm-type-qualifier { + type alarm-type-qualifier; + description + "This leaf is used when the 'alarm-type-id' leaf cannot + uniquely identify the alarm type. Normally, this is not the + case, and this leaf is the empty string."; + } + leaf-list alt-resource { + type resource; + description + "Used if the alarming resource is available over other + interfaces. This field can contain SNMP OIDs, CIM paths, or + 3GPP distinguished names, for example."; + } + list related-alarm { + if-feature "alarm-correlation"; + key "resource alarm-type-id alarm-type-qualifier"; + description + "References to related alarms. Note that the related alarm + might have been purged from the alarm list."; + leaf resource { + type leafref { + path "/alarms/alarm-list/alarm/resource"; + require-instance false; + } + description + "The alarming resource for the related alarm."; + } + leaf alarm-type-id { + type leafref { + path "/alarms/alarm-list/alarm" + + "[resource=current()/../resource]" + + "/alarm-type-id"; + require-instance false; + } + description + "The alarm type identifier for the related alarm."; + } + leaf alarm-type-qualifier { + type leafref { + path "/alarms/alarm-list/alarm" + + "[resource=current()/../resource]" + + "[alarm-type-id=current()/../alarm-type-id]" + + "/alarm-type-qualifier"; + require-instance false; + } + description + "The alarm qualifier for the related alarm."; + } + } + leaf-list impacted-resource { + if-feature "service-impact-analysis"; + type resource; + description + "Resources that might be affected by this alarm. If the + system creates an alarm on a resource and also has a mapping + to other resources that might be impacted, these resources + can be listed in this leaf-list. In this way, the system + can create one alarm instead of several. For example, if an + interface has an alarm, the 'impacted-resource' can + reference the aggregated port channels."; + } + leaf-list root-cause-resource { + if-feature "root-cause-analysis"; + type resource; + description + "Resources that are candidates for causing the alarm. If the + system has a mechanism to understand the candidate root + causes of an alarm, this leaf-list can be used to list the + root-cause candidate resources. In this way, the system can + create one alarm instead of several. An example might be a + logging system (alarm resource) that fails; the alarm can + reference the file system in the 'root-cause-resource' + leaf-list. Note that the intended use is not to also send + an alarm with the 'root-cause-resource' as an alarming + resource. The 'root-cause-resource' leaf-list is a hint and + should not also generate an alarm for the same problem."; + } + } + + grouping alarm-state-change-parameters { + description + "Parameters for an alarm-state change. + + This grouping is used both in the alarm list's status-change + list and in the notification representing an alarm-state + change."; + leaf time { + type yang:date-and-time; + mandatory true; + description + "The time the status of the alarm changed. The value + represents the time the real alarm-state change appeared in + the resource and not when it was added to the alarm + list. The /alarm-list/alarm/last-changed MUST be set to the + same value."; + } + leaf perceived-severity { + type severity-with-clear; + mandatory true; + description + "The severity of the alarm as defined by X.733. Note that + this may not be the original severity since the alarm may + have changed severity."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function"; + } + leaf alarm-text { + type alarm-text; + mandatory true; + description + "A user-friendly text describing the alarm-state change."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function"; + } + } + + grouping operator-parameters { + description + "This grouping defines parameters that can be changed by an + operator."; + leaf time { + type yang:date-and-time; + mandatory true; + description + "Timestamp for operator action on the alarm."; + } + leaf operator { + type string; + mandatory true; + description + "The name of the operator that has acted on this alarm."; + } + leaf state { + type operator-state; + mandatory true; + description + "The operator's view of the alarm state."; + } + leaf text { + type string; + description + "Additional optional textual information provided by the + operator."; + } + } + + grouping resource-alarm-parameters { + description + "Alarm parameters that originate from the resource view."; + leaf is-cleared { + type boolean; + mandatory true; + description + "Indicates the current clearance state of the alarm. An + alarm might toggle from active alarm to cleared alarm and + back to active again."; + } + leaf last-raised { + type yang:date-and-time; + mandatory true; + description + "An alarm may change severity level and toggle between + active and cleared during its lifetime. This leaf indicates + the last time it was raised ('is-cleared' = 'false')."; + } + leaf last-changed { + type yang:date-and-time; + mandatory true; + description + "A timestamp when the 'status-change' or + 'operator-state-change' list was last changed."; + } + leaf perceived-severity { + type severity; + mandatory true; + description + "The last severity of the alarm. + + If an alarm was raised with severity 'warning' but later + changed to 'major', this leaf will show 'major'."; + } + leaf alarm-text { + type alarm-text; + mandatory true; + description + "The last reported alarm text. This text should contain + information for an operator to be able to understand the + problem and how to resolve it."; + } + list status-change { + if-feature "alarm-history"; + key "time"; + min-elements 1; + description + "A list of status-change events for this alarm. + + The entry with latest timestamp in this list MUST + correspond to the leafs 'is-cleared', 'perceived-severity', + and 'alarm-text' for the alarm. + + This list is ordered according to the timestamps of alarm + state changes. The first item corresponds to the latest + state change. + + The following state changes create an entry in this + list: + - changed severity (warning, minor, major, critical) + - clearance status; this also updates the 'is-cleared' + leaf + - alarm-text update"; + uses alarm-state-change-parameters; + } + } + + grouping filter-input { + description + "Grouping to specify a filter construct on alarm information."; + leaf alarm-clearance-status { + type enumeration { + enum any { + description + "Ignore alarm-clearance status."; + } + enum cleared { + description + "Filter cleared alarms."; + } + enum not-cleared { + description + "Filter not-cleared alarms."; + } + } + mandatory true; + description + "The clearance status of the alarm."; + } + container older-than { + presence "Age specification"; + description + "Matches the 'last-status-change' leaf in the alarm."; + choice age-spec { + description + "Filter using date and time age."; + case seconds { + leaf seconds { + type uint16; + description + "Age expressed in seconds."; + } + } + case minutes { + leaf minutes { + type uint16; + description + "Age expressed in minutes."; + } + } + case hours { + leaf hours { + type uint16; + description + "Age expressed in hours."; + } + } + case days { + leaf days { + type uint16; + description + "Age expressed in days."; + } + } + case weeks { + leaf weeks { + type uint16; + description + "Age expressed in weeks."; + } + } + } + } + container severity { + presence "Severity filter"; + choice sev-spec { + description + "Filter based on severity level."; + leaf below { + type severity; + description + "Severity less than this leaf."; + } + leaf is { + type severity; + description + "Severity level equal to this leaf."; + } + leaf above { + type severity; + description + "Severity level higher than this leaf."; + } + } + description + "Filter based on severity."; + } + container operator-state-filter { + if-feature "operator-actions"; + presence "Operator state filter"; + leaf state { + type operator-state; + description + "Filter on operator state."; + } + leaf user { + type string; + description + "Filter based on which operator."; + } + description + "Filter based on operator state."; + } + } + + /* + * The /alarms data tree + */ + + container alarms { + description + "The top container for this module."; + container control { + description + "Configuration to control the alarm behavior."; + leaf max-alarm-status-changes { + type union { + type uint16; + type enumeration { + enum infinite { + description + "The status-change entries are accumulated + infinitely."; + } + } + } + default "32"; + description + "The 'status-change' entries are kept in a circular list + per alarm. When this number is exceeded, the oldest + status change entry is automatically removed. If the + value is 'infinite', the status-change entries are + accumulated infinitely."; + } + leaf notify-status-changes { + type enumeration { + enum all-state-changes { + description + "Send notifications for all status changes."; + } + enum raise-and-clear { + description + "Send notifications only for raise, clear, and + re-raise. Notifications for severity-level changes or + alarm-text changes are not sent."; + } + enum severity-level { + description + "Only send notifications for alarm-state changes + crossing the level specified in + 'notify-severity-level'. Always send clear + notifications."; + } + } + must '. != "severity-level" or ../notify-severity-level' { + description + "When notify-status-changes is 'severity-level', a value + must be given for 'notify-severity-level'."; + } + default "all-state-changes"; + description + "This leaf controls the notifications sent for alarm status + updates. There are three options: + + 1. Notifications are sent for all updates, severity-level + changes, and alarm-text changes. + + 2. Notifications are only sent for alarm raise and clear. + + 3. Notifications are sent for status changes equal to or + above the specified severity level. Clear + notifications shall always be sent. Notifications + shall also be sent for state changes that make an + alarm less severe than the specified level. + + For example, in option 3, assume that the severity level + is set to major and that the alarm has the following state + changes: + + [(Time, severity, clear)]: + [(T1, major, -), (T2, minor, -), (T3, warning, -), + (T4, minor, -), (T5, major, -), (T6, critical, -), + (T7, major. -), (T8, major, clear)] + + In that case, notifications will be sent at times + T1, T2, T5, T6, T7, and T8."; + } + leaf notify-severity-level { + when '../notify-status-changes = "severity-level"'; + type severity; + description + "Only send notifications for alarm-state changes crossing + the specified level. Always send clear notifications."; + } + container alarm-shelving { + if-feature "alarm-shelving"; + description + "The 'alarm-shelving/shelf' list is used to shelve + (block/filter) alarms. The conditions in the shelf + criteria are logically ANDed. The first matching shelf is + used, and an alarm is shelved only for this first match. + Matching alarms MUST appear in the + /alarms/shelved-alarms/shelved-alarm list, and + non-matching /alarms MUST appear in the + /alarms/alarm-list/alarm list. The server does not send + any notifications for shelved alarms. + + The server MUST maintain states (e.g., severity + changes) for the shelved alarms. + + Alarms that match the criteria shall have an + operator state 'shelved'. When the shelf + configuration removes an alarm from the shelf, the server + shall add the operator state 'un-shelved'."; + list shelf { + key "name"; + ordered-by user; + leaf name { + type string; + description + "An arbitrary name for the alarm shelf."; + } + description + "Each entry defines the criteria for shelving alarms. + Criteria are ANDed. If no criteria are specified, + all alarms will be shelved."; + leaf-list resource { + type resource-match; + description + "Shelve alarms for matching resources."; + } + list alarm-type { + key "alarm-type-id alarm-type-qualifier-match"; + description + "Any alarm matching the combined criteria of + 'alarm-type-id' and 'alarm-type-qualifier-match' + MUST be matched."; + leaf alarm-type-id { + type alarm-type-id; + description + "Shelve all alarms that have an 'alarm-type-id' that + is equal to or derived from the given + 'alarm-type-id'."; + } + leaf alarm-type-qualifier-match { + type string; + description + "An XML Schema regular expression that is used to + match an alarm type qualifier. Shelve all alarms + that match this regular expression for the alarm + type qualifier."; + reference + "XML Schema Part 2: Datatypes Second Edition, + World Wide Web Consortium Recommendation + REC-xmlschema-2-20041028"; + } + } + leaf description { + type string; + description + "An optional textual description of the shelf. This + description should include the reason for shelving + these alarms."; + } + } + } + } + container alarm-inventory { + config false; + description + "The 'alarm-inventory/alarm-type' list contains all possible + alarm types for the system. + + If the system knows for which resources a specific alarm + type can appear, it is also identified in the inventory. + The list also tells if each alarm type has a corresponding + clear state. The inventory shall only contain concrete + alarm types. + + The alarm inventory MUST be updated by the system when new + alarms can appear. This can be the case when installing new + software modules or inserting new card types. A + notification 'alarm-inventory-changed' is sent when the + inventory is changed."; + list alarm-type { + key "alarm-type-id alarm-type-qualifier"; + description + "An entry in this list defines a possible alarm."; + leaf alarm-type-id { + type alarm-type-id; + description + "The statically defined alarm type identifier for this + possible alarm."; + } + leaf alarm-type-qualifier { + type alarm-type-qualifier; + description + "The optionally dynamically defined alarm type identifier + for this possible alarm."; + } + leaf-list resource { + type resource-match; + description + "Optionally, specifies for which resources the alarm type + is valid."; + } + leaf will-clear { + type boolean; + mandatory true; + description + "This leaf tells the operator if the alarm will be + cleared when the correct corrective action has been + taken. Implementations SHOULD strive for detecting the + cleared state for all alarm types. + + If this leaf is 'true', the operator can monitor the + alarm until it becomes cleared after the corrective + action has been taken. + + If this leaf is 'false', the operator needs to validate + that the alarm is no longer active using other + mechanisms. Alarms can lack a corresponding clear due + to missing instrumentation or no logical + corresponding clear state."; + } + leaf-list severity-level { + type severity; + description + "This leaf-list indicates the possible severity levels of + this alarm type. Note well that 'clear' is not part of + the severity type. In general, the severity level + should be defined by the instrumentation based on the + dynamic state, rather than being defined statically by + the alarm type, in order to provide a relevant severity + level based on dynamic state and context. However, most + alarm types have a defined set of possible severity + levels, and this should be provided here."; + } + leaf description { + type string; + mandatory true; + description + "A description of the possible alarm. It SHOULD include + information on possible underlying root causes and + corrective actions."; + } + } + } + container summary { + if-feature "alarm-summary"; + config false; + description + "This container gives a summary of the number of alarms."; + list alarm-summary { + key "severity"; + description + "A global summary of all alarms in the system. The summary + does not include shelved alarms."; + leaf severity { + type severity; + description + "Alarm summary for this severity level."; + } + leaf total { + type yang:gauge32; + description + "Total number of alarms of this severity level."; + } + leaf not-cleared { + type yang:gauge32; + description + "Total number of alarms of this severity level + that are not cleared."; + } + leaf cleared { + type yang:gauge32; + description + "For this severity level, the number of alarms that are + cleared."; + } + leaf cleared-not-closed { + if-feature "operator-actions"; + type yang:gauge32; + description + "For this severity level, the number of alarms that are + cleared but not closed."; + } + leaf cleared-closed { + if-feature "operator-actions"; + type yang:gauge32; + description + "For this severity level, the number of alarms that are + cleared and closed."; + } + leaf not-cleared-closed { + if-feature "operator-actions"; + type yang:gauge32; + description + "For this severity level, the number of alarms that are + not cleared but closed."; + } + leaf not-cleared-not-closed { + if-feature "operator-actions"; + type yang:gauge32; + description + "For this severity level, the number of alarms that are + not cleared and not closed."; + } + } + leaf shelves-active { + if-feature "alarm-shelving"; + type empty; + description + "This is a hint to the operator that there are active + alarm shelves. This leaf MUST exist if the + /alarms/shelved-alarms/number-of-shelved-alarms is > 0."; + } + } + container alarm-list { + config false; + description + "The alarms in the system."; + leaf number-of-alarms { + type yang:gauge32; + description + "This object shows the total number of + alarms in the system, i.e., the total number + of entries in the alarm list."; + } + leaf last-changed { + type yang:date-and-time; + description + "A timestamp when the alarm list was last + changed. The value can be used by a manager to + initiate an alarm resynchronization procedure."; + } + list alarm { + key "resource alarm-type-id alarm-type-qualifier"; + description + "The list of alarms. Each entry in the list holds one + alarm for a given alarm type and resource. An alarm can + be updated from the underlying resource or by the user. + The following leafs are maintained by the resource: + 'is-cleared', 'last-change', 'perceived-severity', and + 'alarm-text'. An operator can change 'operator-state' and + 'operator-text'. + + Entries appear in the alarm list the first time an alarm + becomes active for a given alarm type and resource. + Entries do not get deleted when the alarm is cleared. + Clear status is represented as a boolean flag. + + Alarm entries are removed, i.e., purged, from the list by + an explicit purge action. For example, purge all alarms + that are cleared and in closed operator state that are + older than 24 hours. Purged alarms are removed from the + alarm list. If the alarm resource state changes after a + purge, the alarm will reappear in the alarm list. + + Systems may also remove alarms based on locally configured + policies; this is out of scope for this module."; + uses common-alarm-parameters; + leaf time-created { + type yang:date-and-time; + mandatory true; + description + "The timestamp when this alarm entry was created. This + represents the first time the alarm appeared; it can + also represent that the alarm reappeared after a purge. + Further state changes of the same alarm do not change + this leaf; these changes will update the 'last-changed' + leaf."; + } + uses resource-alarm-parameters; + list operator-state-change { + if-feature "operator-actions"; + key "time"; + description + "This list is used by operators to indicate the state of + human intervention on an alarm. For example, if an + operator has seen an alarm, the operator can add a new + item to this list indicating that the alarm is + acknowledged."; + uses operator-parameters; + } + action set-operator-state { + if-feature "operator-actions"; + description + "This is a means for the operator to indicate the level + of human intervention on an alarm."; + input { + leaf state { + type writable-operator-state; + mandatory true; + description + "Set this operator state."; + } + leaf text { + type string; + description + "Additional optional textual information."; + } + } + } + notification operator-action { + if-feature "operator-actions"; + description + "This notification is used to report that an operator + acted upon an alarm."; + uses operator-parameters; + } + } + action purge-alarms { + description + "This operation requests that the server delete entries + from the alarm list according to the supplied criteria. + + Typically, this operation is used to delete alarms that + are in closed operator state and older than a specified + time. + + The number of purged alarms is returned as an output + parameter."; + input { + uses filter-input; + } + output { + leaf purged-alarms { + type uint32; + description + "Number of purged alarms."; + } + } + } + action compress-alarms { + if-feature "alarm-history"; + description + "This operation requests that the server compress + entries in the alarm list by removing all but the + latest 'status-change' entry for all matching alarms. + Conditions in the input are logically ANDed. If no + input condition is given, all alarms are compressed."; + input { + leaf resource { + type resource-match; + description + "Compress the alarms matching this resource."; + } + leaf alarm-type-id { + type leafref { + path "/alarms/alarm-list/alarm/alarm-type-id"; + require-instance false; + } + description + "Compress alarms with this 'alarm-type-id'."; + } + leaf alarm-type-qualifier { + type leafref { + path "/alarms/alarm-list/alarm/alarm-type-qualifier"; + require-instance false; + } + description + "Compress the alarms with this + 'alarm-type-qualifier'."; + } + } + output { + leaf compressed-alarms { + type uint32; + description + "Number of compressed alarm entries."; + } + } + } + } + container shelved-alarms { + if-feature "alarm-shelving"; + config false; + description + "The shelved alarms. Alarms appear here if they match the + criteria in /alarms/control/alarm-shelving. This list does + not generate any notifications. The list represents alarms + that are considered not relevant by the operator. Alarms in + this list have an 'operator-state' of 'shelved'. This + cannot be changed."; + leaf number-of-shelved-alarms { + type yang:gauge32; + description + "This object shows the total number of current + alarms, i.e., the total number of entries + in the alarm list."; + } + leaf shelved-alarms-last-changed { + type yang:date-and-time; + description + "A timestamp when the shelved-alarm list was last changed. + The value can be used by a manager to initiate an alarm + resynchronization procedure."; + } + list shelved-alarm { + key "resource alarm-type-id alarm-type-qualifier"; + description + "The list of shelved alarms. Shelved alarms can only be + updated from the underlying resource; no operator actions + are supported."; + uses common-alarm-parameters; + leaf shelf-name { + type leafref { + path "/alarms/control/alarm-shelving/shelf/name"; + require-instance false; + } + description + "The name of the shelf."; + } + uses resource-alarm-parameters; + list operator-state-change { + if-feature "operator-actions"; + key "time"; + description + "This list is used by operators to indicate the state of + human intervention on an alarm. For shelved alarms, the + system has set the list item in the list to 'shelved'."; + uses operator-parameters; + } + } + action purge-shelved-alarms { + description + "This operation requests that the server delete entries from + the shelved-alarm list according to the supplied criteria. + In the shelved-alarm list, it makes sense to delete alarms + that are not relevant anymore. + + The number of purged alarms is returned as an output + parameter."; + input { + uses filter-input; + } + output { + leaf purged-alarms { + type uint32; + description + "Number of purged alarms."; + } + } + } + action compress-shelved-alarms { + if-feature "alarm-history"; + description + "This operation requests that the server compress entries + in the shelved-alarm list by removing all but the latest + 'status-change' entry for all matching shelved alarms. + Conditions in the input are logically ANDed. If no input + condition is given, all alarms are compressed."; + input { + leaf resource { + type leafref { + path "/alarms/shelved-alarms/shelved-alarm/resource"; + require-instance false; + } + description + "Compress the alarms with this resource."; + } + leaf alarm-type-id { + type leafref { + path "/alarms/shelved-alarms/shelved-alarm" + + "/alarm-type-id"; + require-instance false; + } + description + "Compress alarms with this 'alarm-type-id'."; + } + leaf alarm-type-qualifier { + type leafref { + path "/alarms/shelved-alarms/shelved-alarm" + + "/alarm-type-qualifier"; + require-instance false; + } + description + "Compress the alarms with this + 'alarm-type-qualifier'."; + } + } + output { + leaf compressed-alarms { + type uint32; + description + "Number of compressed alarm entries."; + } + } + } + } + list alarm-profile { + if-feature "alarm-profile"; + key "alarm-type-id alarm-type-qualifier-match resource"; + ordered-by user; + description + "This list is used to assign further information or + configuration for each alarm type. This module supports a + mechanism where the client can override the system-default + alarm severity levels. The 'alarm-profile' is also a useful + augmentation point for specific additions to alarm types."; + leaf alarm-type-id { + type alarm-type-id; + description + "The alarm type identifier to match."; + } + leaf alarm-type-qualifier-match { + type string; + description + "An XML Schema regular expression that is used to match the + alarm type qualifier."; + reference + "XML Schema Part 2: Datatypes Second Edition, + World Wide Web Consortium Recommendation + REC-xmlschema-2-20041028"; + } + leaf resource { + type resource-match; + description + "Specifies which resources to match."; + } + leaf description { + type string; + mandatory true; + description + "A description of the alarm profile."; + } + container alarm-severity-assignment-profile { + if-feature "severity-assignment"; + description + "The client can override the system-default severity + level."; + reference + "ITU-T Recommendation M.3100: + Generic network information model + ITU-T Recommendation M.3160: + Generic, protocol-neutral management information model"; + leaf-list severity-level { + type severity; + ordered-by user; + description + "Specifies the configured severity level(s) for the + matching alarm. If the alarm has several severity + levels, the leaf-list shall be given in rising severity + order. The original M3100/M3160 ASAP function only + allows for a one-to-one mapping between alarm type and + severity, but since YANG module supports stateful + alarms, the mapping must allow for several severity + levels. + + Assume a high-utilization alarm type with two thresholds + with the system-default severity levels of threshold1 = + warning and threshold2 = minor. Setting this leaf-list + to (minor, major) will assign the severity levels as + threshold1 = minor and threshold2 = major"; + } + } + } + } + + /* + * Notifications + */ + + notification alarm-notification { + description + "This notification is used to report a state change for an + alarm. The same notification is used for reporting a newly + raised alarm, a cleared alarm, or changing the text and/or + severity of an existing alarm."; + uses common-alarm-parameters; + uses alarm-state-change-parameters; + } + + notification alarm-inventory-changed { + description + "This notification is used to report that the list of possible + alarms has changed. This can happen when, for example, a new + software module is installed or a new physical card is + inserted."; + } +} diff --git a/models/ietf/RFC/ietf-alarms@2019-09-11.yang b/models/ietf/RFC/ietf-alarms@2019-09-11.yang new file mode 100644 index 0000000000000000000000000000000000000000..a1c195faf0e9788f84c75c744d13b8fa6fc16d46 --- /dev/null +++ b/models/ietf/RFC/ietf-alarms@2019-09-11.yang @@ -0,0 +1,1526 @@ +module ietf-alarms { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-alarms"; + prefix al; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: <https://trac.ietf.org/trac/ccamp> + WG List: <mailto:ccamp@ietf.org> + + Editor: Stefan Vallin + <mailto:stefan@wallan.se> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module defines an interface for managing alarms. Main + inputs to the module design are the 3GPP Alarm Integration + Reference Point (IRP), ITU-T X.733, and ANSI/ISA-18.2 alarm + standards. + Main features of this module include: + + * Alarm list: + A list of all alarms. Cleared alarms stay in + the list until explicitly purged. + + * Operator actions on alarms: + Acknowledging and closing alarms. + + * Administrative actions on alarms: + Purging alarms from the list according to specific + criteria. + + * Alarm inventory: + A management application can read all + alarm types implemented by the system. + + * Alarm shelving: + Shelving (blocking) alarms according + to specific criteria. + + * Alarm profiles: + A management system can attach further + information to alarm types, for example, + overriding system-default severity + levels. + + This module uses a stateful view on alarms. An alarm is a state + for a specific resource (note that an alarm is not a + notification). An alarm type is a possible alarm state for a + resource. For example, the tuple: + + ('link-alarm', 'GigabitEthernet0/25') + + is an alarm of type 'link-alarm' on the resource + 'GigabitEthernet0/25'. + + Alarm types are identified using YANG identities and an optional + string-based qualifier. The string-based qualifier allows for + dynamic extension of the statically defined alarm types. Alarm + types identify a possible alarm state and not the individual + notifications. For example, the traditional 'link-down' and + 'link-up' notifications are two notifications referring to the + same alarm type 'link-alarm'. + + With this design, there is no ambiguity about how alarm and + alarm clear correlation should be performed; notifications that + report the same resource and alarm type are considered updates + of the same alarm, e.g., clearing an active alarm or changing + the severity of an alarm. The instrumentation can update the + severity and alarm text on an existing alarm. The above alarm + example can therefore look like the following: + + (('link-alarm', 'GigabitEthernet0/25'), + warning, + 'interface down while interface admin state is up') + + There is a clear separation between updates on the alarm from + the underlying resource, like clear, and updates from an + operator, like acknowledging or closing an alarm: + + (('link-alarm', 'GigabitEthernet0/25'), + warning, + 'interface down while interface admin state is up', + cleared, + closed) + + Administrative actions like removing closed alarms older than a + given time is supported. + + This YANG module does not define how the underlying + instrumentation detects and clears the specific alarms. That + belongs to the Standards Development Organization (SDO) or + enterprise that owns that specific technology. + + 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. + + Copyright (c) 2019 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 Simplified 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 8632; see + the RFC itself for full legal notices."; + + revision 2019-09-11 { + description + "Initial revision."; + reference + "RFC 8632: A YANG Data Model for Alarm Management"; + } + + /* + * Features + */ + + feature operator-actions { + description + "This feature indicates that the system supports operator + states on alarms."; + } + + feature alarm-shelving { + description + "This feature indicates that the system supports shelving + (blocking) alarms. + + Alarm shelving may have an impact on server processing + resources in order to match alarms against shelf + criteria."; + } + + feature alarm-history { + description + "This feature indicates that the server maintains a history + of state changes for each alarm. For example, if an alarm + toggles between cleared and active 10 times, these state + changes are present in a separate list in the alarm. + + Keeping the alarm history may have an impact on server + memory resources."; + } + + feature alarm-summary { + description + "This feature indicates that the server summarizes the number + of alarms per severity and operator state."; + } + + feature alarm-profile { + description + "The system enables clients to configure further information + to each alarm type."; + } + + feature severity-assignment { + description + "The system supports configurable alarm severity levels."; + reference + "ITU-T Recommendation M.3100: + Generic network information model + ITU-T Recommendation M.3160: + Generic, protocol-neutral management information model"; + } + + feature root-cause-analysis { + description + "The system supports identifying candidate root-cause + resources for an alarm, for example, a disk partition + root cause for a logger failure alarm."; + } + + feature service-impact-analysis { + description + "The system supports identifying candidate-impacted + resources for an alarm, for example, an interface state change + resulting in a link alarm, which can refer to a link as being + impacted."; + } + + feature alarm-correlation { + description + "The system supports correlating/grouping alarms + that belong together."; + } + + /* + * Identities + */ + + identity alarm-type-id { + description + "Base identity for alarm types. A unique identification of + the alarm, not including the resource. Different resources + can share alarm types. If the resource reports the same + alarm type, it is considered to be the same alarm. The alarm + type is a simplification of the different X.733 and 3GPP Alarm + IRP correlation mechanisms, and it allows for + hierarchical extensions. + + A string-based qualifier can be used in addition to the + identity in order to have different alarm types based on + information not known at design time, such as values in + textual SNMP Notification varbinds. + + Standards and vendors can define sub-identities to clearly + identify specific alarm types. + + This identity is abstract and MUST NOT be used for alarms."; + } + + /* + * Common types + */ + + typedef resource { + type union { + type instance-identifier { + require-instance false; + } + type yang:object-identifier; + type string; + type yang:uuid; + } + description + "This is an identification of the alarming resource, such as an + interface. It should be as fine-grained as possible to both + guide the operator and guarantee uniqueness of the alarms. + + If the alarming resource is modeled in YANG, this type will + be an instance-identifier. + + If the resource is an SNMP object, the type will be an + 'object-identifier'. + + If the resource is anything else, for example, a distinguished + name or a Common Information Model (CIM) path, this type will + be a string. + + If the alarming object is identified by a Universally Unique + Identifier (UUID), use the uuid type. Be cautious when using + this type, since a UUID is hard to use for an operator. + + If the server supports several models, the precedence should + be in the order as given in the union definition."; + } + + typedef resource-match { + type union { + type yang:xpath1.0; + type yang:object-identifier; + type string; + } + description + "This type is used to match resources of type 'resource'. + Since the type 'resource' is a union of different types, the + 'resource-match' type is also a union of corresponding types. + + If the type is given as an XPath 1.0 expression, a resource + of type 'instance-identifier' matches if the instance is part + of the node set that is the result of evaluating the XPath 1.0 + expression. For example, the XPath 1.0 expression: + + /ietf-interfaces:interfaces/ietf-interfaces:interface + [ietf-interfaces:type='ianaift:ethernetCsmacd'] + + would match the resource instance-identifier: + + /if:interfaces/if:interface[if:name='eth1'], + + assuming that the interface 'eth1' is of type + 'ianaift:ethernetCsmacd'. + + If the type is given as an object identifier, a resource of + type 'object-identifier' matches if the match object + identifier is a prefix of the resource's object identifier. + For example, the value: + + 1.3.6.1.2.1.2.2 + + would match the resource object identifier: + + 1.3.6.1.2.1.2.2.1.1.5 + + If the type is given as an UUID or a string, it is interpreted + as an XML Schema regular expression, which matches a resource + of type 'yang:uuid' or 'string' if the given regular + expression matches the resource string. + + If the type is given as an XPath expression, it is evaluated + in the following XPath context: + + o The set of namespace declarations is the set of prefix + and namespace pairs for all YANG modules implemented by + the server, where the prefix is the YANG module name and + the namespace is as defined by the 'namespace' statement + in the YANG module. + + If a leaf of this type is encoded in XML, all namespace + declarations in scope on the leaf element are added to + the set of namespace declarations. If a prefix found in + the XML is already present in the set of namespace + declarations, the namespace in the XML is used. + + o The set of variable bindings is empty. + + o The function library is the core function library, and + the functions are defined in Section 10 of RFC 7950. + + o The context node is the root node in the data tree."; + reference + "XML Schema Part 2: Datatypes Second Edition, + World Wide Web Consortium Recommendation + REC-xmlschema-2-20041028"; + } + + typedef alarm-text { + type string; + description + "The string used to inform operators about the alarm. This + MUST contain enough information for an operator to be able to + understand the problem and how to resolve it. If this string + contains structure, this format should be clearly documented + for programs to be able to parse that information."; + } + + typedef severity { + type enumeration { + enum indeterminate { + value 2; + description + "Indicates that the severity level could not be + determined. This level SHOULD be avoided."; + } + enum warning { + value 3; + description + "The 'warning' severity level indicates the detection of a + potential or impending service-affecting fault, before any + significant effects have been felt. Action should be + taken to further diagnose (if necessary) and correct the + problem in order to prevent it from becoming a more + serious service-affecting fault."; + } + enum minor { + value 4; + description + "The 'minor' severity level indicates the existence of a + non-service-affecting fault condition and that corrective + action should be taken in order to prevent a more serious + (for example, service-affecting) fault. Such a severity + can be reported, for example, when the detected alarm + condition is not currently degrading the capacity of the + resource."; + } + enum major { + value 5; + description + "The 'major' severity level indicates that a service- + affecting condition has developed and an urgent corrective + action is required. Such a severity can be reported, for + example, when there is a severe degradation in the + capability of the resource and its full capability must be + restored."; + } + enum critical { + value 6; + description + "The 'critical' severity level indicates that a service- + affecting condition has occurred and an immediate + corrective action is required. Such a severity can be + reported, for example, when a resource becomes totally out + of service and its capability must be restored."; + } + } + description + "The severity level of the alarm. Note well that the value + 'clear' is not included. Whether or not an alarm is cleared + is a separate boolean flag."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function"; + } + + typedef severity-with-clear { + type union { + type enumeration { + enum cleared { + value 1; + description + "The alarm is cleared by the instrumentation."; + } + } + type severity; + } + description + "The severity level of the alarm including clear. This is used + only in notifications reporting state changes for an alarm."; + } + + typedef writable-operator-state { + type enumeration { + enum none { + value 1; + description + "The alarm is not being taken care of."; + } + enum ack { + value 2; + description + "The alarm is being taken care of. Corrective action not + taken yet or has failed"; + } + enum closed { + value 3; + description + "Corrective action taken successfully."; + } + } + description + "Operator states on an alarm. The 'closed' state indicates + that an operator considers the alarm being resolved. This is + separate from the alarm's 'is-cleared' leaf."; + } + + typedef operator-state { + type union { + type writable-operator-state; + type enumeration { + enum shelved { + value 4; + description + "The alarm is shelved. Alarms in /alarms/shelved-alarms/ + MUST be assigned this operator state by the server as + the last entry in the 'operator-state-change' list. The + text for that entry SHOULD include the shelf name."; + } + enum un-shelved { + value 5; + description + "The alarm is moved back to 'alarm-list' from a shelf. + Alarms that are moved from /alarms/shelved-alarms/ to + /alarms/alarm-list MUST be assigned this state by the + server as the last entry in the 'operator-state-change' + list. The text for that entry SHOULD include the shelf + name."; + } + } + } + description + "Operator states on an alarm. The 'closed' state indicates + that an operator considers the alarm being resolved. This is + separate from the alarm's 'is-cleared' leaf."; + } + + /* Alarm type */ + + typedef alarm-type-id { + type identityref { + base alarm-type-id; + } + description + "Identifies an alarm type. The description of the alarm type + id MUST indicate whether or not the alarm type is abstract. + An abstract alarm type is used as a base for other alarm type + ids and will not be used as a value for an alarm or be present + in the alarm inventory."; + } + + typedef alarm-type-qualifier { + type string; + description + "If an alarm type cannot be fully specified at design time by + 'alarm-type-id', this string qualifier is used in addition to + fully define a unique alarm type. + + The definition of alarm qualifiers is considered to be part of + the instrumentation and is out of scope for this module. An + empty string is used when this is part of a key."; + } + + /* + * Groupings + */ + + grouping common-alarm-parameters { + description + "Common parameters for an alarm. + + This grouping is used both in the alarm list and in the + notification representing an alarm-state change."; + leaf resource { + type resource; + mandatory true; + description + "The alarming resource. See also 'alt-resource'. This could + be, for example, a reference to the alarming interface"; + } + leaf alarm-type-id { + type alarm-type-id; + mandatory true; + description + "This leaf and the leaf 'alarm-type-qualifier' together + provide a unique identification of the alarm type."; + } + leaf alarm-type-qualifier { + type alarm-type-qualifier; + description + "This leaf is used when the 'alarm-type-id' leaf cannot + uniquely identify the alarm type. Normally, this is not the + case, and this leaf is the empty string."; + } + leaf-list alt-resource { + type resource; + description + "Used if the alarming resource is available over other + interfaces. This field can contain SNMP OIDs, CIM paths, or + 3GPP distinguished names, for example."; + } + list related-alarm { + if-feature "alarm-correlation"; + key "resource alarm-type-id alarm-type-qualifier"; + description + "References to related alarms. Note that the related alarm + might have been purged from the alarm list."; + leaf resource { + type leafref { + path "/alarms/alarm-list/alarm/resource"; + require-instance false; + } + description + "The alarming resource for the related alarm."; + } + leaf alarm-type-id { + type leafref { + path "/alarms/alarm-list/alarm" + + "[resource=current()/../resource]" + + "/alarm-type-id"; + require-instance false; + } + description + "The alarm type identifier for the related alarm."; + } + leaf alarm-type-qualifier { + type leafref { + path "/alarms/alarm-list/alarm" + + "[resource=current()/../resource]" + + "[alarm-type-id=current()/../alarm-type-id]" + + "/alarm-type-qualifier"; + require-instance false; + } + description + "The alarm qualifier for the related alarm."; + } + } + leaf-list impacted-resource { + if-feature "service-impact-analysis"; + type resource; + description + "Resources that might be affected by this alarm. If the + system creates an alarm on a resource and also has a mapping + to other resources that might be impacted, these resources + can be listed in this leaf-list. In this way, the system + can create one alarm instead of several. For example, if an + interface has an alarm, the 'impacted-resource' can + reference the aggregated port channels."; + } + leaf-list root-cause-resource { + if-feature "root-cause-analysis"; + type resource; + description + "Resources that are candidates for causing the alarm. If the + system has a mechanism to understand the candidate root + causes of an alarm, this leaf-list can be used to list the + root-cause candidate resources. In this way, the system can + create one alarm instead of several. An example might be a + logging system (alarm resource) that fails; the alarm can + reference the file system in the 'root-cause-resource' + leaf-list. Note that the intended use is not to also send + an alarm with the 'root-cause-resource' as an alarming + resource. The 'root-cause-resource' leaf-list is a hint and + should not also generate an alarm for the same problem."; + } + } + + grouping alarm-state-change-parameters { + description + "Parameters for an alarm-state change. + + This grouping is used both in the alarm list's status-change + list and in the notification representing an alarm-state + change."; + leaf time { + type yang:date-and-time; + mandatory true; + description + "The time the status of the alarm changed. The value + represents the time the real alarm-state change appeared in + the resource and not when it was added to the alarm + list. The /alarm-list/alarm/last-changed MUST be set to the + same value."; + } + leaf perceived-severity { + type severity-with-clear; + mandatory true; + description + "The severity of the alarm as defined by X.733. Note that + this may not be the original severity since the alarm may + have changed severity."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function"; + } + leaf alarm-text { + type alarm-text; + mandatory true; + description + "A user-friendly text describing the alarm-state change."; + reference + "ITU-T Recommendation X.733: Information Technology + - Open Systems Interconnection + - System Management: Alarm Reporting Function"; + } + } + + grouping operator-parameters { + description + "This grouping defines parameters that can be changed by an + operator."; + leaf time { + type yang:date-and-time; + mandatory true; + description + "Timestamp for operator action on the alarm."; + } + leaf operator { + type string; + mandatory true; + description + "The name of the operator that has acted on this alarm."; + } + leaf state { + type operator-state; + mandatory true; + description + "The operator's view of the alarm state."; + } + leaf text { + type string; + description + "Additional optional textual information provided by the + operator."; + } + } + + grouping resource-alarm-parameters { + description + "Alarm parameters that originate from the resource view."; + leaf is-cleared { + type boolean; + mandatory true; + description + "Indicates the current clearance state of the alarm. An + alarm might toggle from active alarm to cleared alarm and + back to active again."; + } + leaf last-raised { + type yang:date-and-time; + mandatory true; + description + "An alarm may change severity level and toggle between + active and cleared during its lifetime. This leaf indicates + the last time it was raised ('is-cleared' = 'false')."; + } + leaf last-changed { + type yang:date-and-time; + mandatory true; + description + "A timestamp when the 'status-change' or + 'operator-state-change' list was last changed."; + } + leaf perceived-severity { + type severity; + mandatory true; + description + "The last severity of the alarm. + + If an alarm was raised with severity 'warning' but later + changed to 'major', this leaf will show 'major'."; + } + leaf alarm-text { + type alarm-text; + mandatory true; + description + "The last reported alarm text. This text should contain + information for an operator to be able to understand the + problem and how to resolve it."; + } + list status-change { + if-feature "alarm-history"; + key "time"; + min-elements 1; + description + "A list of status-change events for this alarm. + + The entry with latest timestamp in this list MUST + correspond to the leafs 'is-cleared', 'perceived-severity', + and 'alarm-text' for the alarm. + + This list is ordered according to the timestamps of alarm + state changes. The first item corresponds to the latest + state change. + + The following state changes create an entry in this + list: + - changed severity (warning, minor, major, critical) + - clearance status; this also updates the 'is-cleared' + leaf + - alarm-text update"; + uses alarm-state-change-parameters; + } + } + + grouping filter-input { + description + "Grouping to specify a filter construct on alarm information."; + leaf alarm-clearance-status { + type enumeration { + enum any { + description + "Ignore alarm-clearance status."; + } + enum cleared { + description + "Filter cleared alarms."; + } + enum not-cleared { + description + "Filter not-cleared alarms."; + } + } + mandatory true; + description + "The clearance status of the alarm."; + } + container older-than { + presence "Age specification"; + description + "Matches the 'last-status-change' leaf in the alarm."; + choice age-spec { + description + "Filter using date and time age."; + case seconds { + leaf seconds { + type uint16; + description + "Age expressed in seconds."; + } + } + case minutes { + leaf minutes { + type uint16; + description + "Age expressed in minutes."; + } + } + case hours { + leaf hours { + type uint16; + description + "Age expressed in hours."; + } + } + case days { + leaf days { + type uint16; + description + "Age expressed in days."; + } + } + case weeks { + leaf weeks { + type uint16; + description + "Age expressed in weeks."; + } + } + } + } + container severity { + presence "Severity filter"; + choice sev-spec { + description + "Filter based on severity level."; + leaf below { + type severity; + description + "Severity less than this leaf."; + } + leaf is { + type severity; + description + "Severity level equal to this leaf."; + } + leaf above { + type severity; + description + "Severity level higher than this leaf."; + } + } + description + "Filter based on severity."; + } + container operator-state-filter { + if-feature "operator-actions"; + presence "Operator state filter"; + leaf state { + type operator-state; + description + "Filter on operator state."; + } + leaf user { + type string; + description + "Filter based on which operator."; + } + description + "Filter based on operator state."; + } + } + + /* + * The /alarms data tree + */ + + container alarms { + description + "The top container for this module."; + container control { + description + "Configuration to control the alarm behavior."; + leaf max-alarm-status-changes { + type union { + type uint16; + type enumeration { + enum infinite { + description + "The status-change entries are accumulated + infinitely."; + } + } + } + default "32"; + description + "The 'status-change' entries are kept in a circular list + per alarm. When this number is exceeded, the oldest + status change entry is automatically removed. If the + value is 'infinite', the status-change entries are + accumulated infinitely."; + } + leaf notify-status-changes { + type enumeration { + enum all-state-changes { + description + "Send notifications for all status changes."; + } + enum raise-and-clear { + description + "Send notifications only for raise, clear, and + re-raise. Notifications for severity-level changes or + alarm-text changes are not sent."; + } + enum severity-level { + description + "Only send notifications for alarm-state changes + crossing the level specified in + 'notify-severity-level'. Always send clear + notifications."; + } + } + must '. != "severity-level" or ../notify-severity-level' { + description + "When notify-status-changes is 'severity-level', a value + must be given for 'notify-severity-level'."; + } + default "all-state-changes"; + description + "This leaf controls the notifications sent for alarm status + updates. There are three options: + + 1. Notifications are sent for all updates, severity-level + changes, and alarm-text changes. + + 2. Notifications are only sent for alarm raise and clear. + + 3. Notifications are sent for status changes equal to or + above the specified severity level. Clear + notifications shall always be sent. Notifications + shall also be sent for state changes that make an + alarm less severe than the specified level. + + For example, in option 3, assume that the severity level + is set to major and that the alarm has the following state + changes: + + [(Time, severity, clear)]: + [(T1, major, -), (T2, minor, -), (T3, warning, -), + (T4, minor, -), (T5, major, -), (T6, critical, -), + (T7, major. -), (T8, major, clear)] + + In that case, notifications will be sent at times + T1, T2, T5, T6, T7, and T8."; + } + leaf notify-severity-level { + when '../notify-status-changes = "severity-level"'; + type severity; + description + "Only send notifications for alarm-state changes crossing + the specified level. Always send clear notifications."; + } + container alarm-shelving { + if-feature "alarm-shelving"; + description + "The 'alarm-shelving/shelf' list is used to shelve + (block/filter) alarms. The conditions in the shelf + criteria are logically ANDed. The first matching shelf is + used, and an alarm is shelved only for this first match. + Matching alarms MUST appear in the + /alarms/shelved-alarms/shelved-alarm list, and + non-matching /alarms MUST appear in the + /alarms/alarm-list/alarm list. The server does not send + any notifications for shelved alarms. + + The server MUST maintain states (e.g., severity + changes) for the shelved alarms. + + Alarms that match the criteria shall have an + operator state 'shelved'. When the shelf + configuration removes an alarm from the shelf, the server + shall add the operator state 'un-shelved'."; + list shelf { + key "name"; + ordered-by user; + leaf name { + type string; + description + "An arbitrary name for the alarm shelf."; + } + description + "Each entry defines the criteria for shelving alarms. + Criteria are ANDed. If no criteria are specified, + all alarms will be shelved."; + leaf-list resource { + type resource-match; + description + "Shelve alarms for matching resources."; + } + list alarm-type { + key "alarm-type-id alarm-type-qualifier-match"; + description + "Any alarm matching the combined criteria of + 'alarm-type-id' and 'alarm-type-qualifier-match' + MUST be matched."; + leaf alarm-type-id { + type alarm-type-id; + description + "Shelve all alarms that have an 'alarm-type-id' that + is equal to or derived from the given + 'alarm-type-id'."; + } + leaf alarm-type-qualifier-match { + type string; + description + "An XML Schema regular expression that is used to + match an alarm type qualifier. Shelve all alarms + that match this regular expression for the alarm + type qualifier."; + reference + "XML Schema Part 2: Datatypes Second Edition, + World Wide Web Consortium Recommendation + REC-xmlschema-2-20041028"; + } + } + leaf description { + type string; + description + "An optional textual description of the shelf. This + description should include the reason for shelving + these alarms."; + } + } + } + } + container alarm-inventory { + config false; + description + "The 'alarm-inventory/alarm-type' list contains all possible + alarm types for the system. + + If the system knows for which resources a specific alarm + type can appear, it is also identified in the inventory. + The list also tells if each alarm type has a corresponding + clear state. The inventory shall only contain concrete + alarm types. + + The alarm inventory MUST be updated by the system when new + alarms can appear. This can be the case when installing new + software modules or inserting new card types. A + notification 'alarm-inventory-changed' is sent when the + inventory is changed."; + list alarm-type { + key "alarm-type-id alarm-type-qualifier"; + description + "An entry in this list defines a possible alarm."; + leaf alarm-type-id { + type alarm-type-id; + description + "The statically defined alarm type identifier for this + possible alarm."; + } + leaf alarm-type-qualifier { + type alarm-type-qualifier; + description + "The optionally dynamically defined alarm type identifier + for this possible alarm."; + } + leaf-list resource { + type resource-match; + description + "Optionally, specifies for which resources the alarm type + is valid."; + } + leaf will-clear { + type boolean; + mandatory true; + description + "This leaf tells the operator if the alarm will be + cleared when the correct corrective action has been + taken. Implementations SHOULD strive for detecting the + cleared state for all alarm types. + + If this leaf is 'true', the operator can monitor the + alarm until it becomes cleared after the corrective + action has been taken. + + If this leaf is 'false', the operator needs to validate + that the alarm is no longer active using other + mechanisms. Alarms can lack a corresponding clear due + to missing instrumentation or no logical + corresponding clear state."; + } + leaf-list severity-level { + type severity; + description + "This leaf-list indicates the possible severity levels of + this alarm type. Note well that 'clear' is not part of + the severity type. In general, the severity level + should be defined by the instrumentation based on the + dynamic state, rather than being defined statically by + the alarm type, in order to provide a relevant severity + level based on dynamic state and context. However, most + alarm types have a defined set of possible severity + levels, and this should be provided here."; + } + leaf description { + type string; + mandatory true; + description + "A description of the possible alarm. It SHOULD include + information on possible underlying root causes and + corrective actions."; + } + } + } + container summary { + if-feature "alarm-summary"; + config false; + description + "This container gives a summary of the number of alarms."; + list alarm-summary { + key "severity"; + description + "A global summary of all alarms in the system. The summary + does not include shelved alarms."; + leaf severity { + type severity; + description + "Alarm summary for this severity level."; + } + leaf total { + type yang:gauge32; + description + "Total number of alarms of this severity level."; + } + leaf not-cleared { + type yang:gauge32; + description + "Total number of alarms of this severity level + that are not cleared."; + } + leaf cleared { + type yang:gauge32; + description + "For this severity level, the number of alarms that are + cleared."; + } + leaf cleared-not-closed { + if-feature "operator-actions"; + type yang:gauge32; + description + "For this severity level, the number of alarms that are + cleared but not closed."; + } + leaf cleared-closed { + if-feature "operator-actions"; + type yang:gauge32; + description + "For this severity level, the number of alarms that are + cleared and closed."; + } + leaf not-cleared-closed { + if-feature "operator-actions"; + type yang:gauge32; + description + "For this severity level, the number of alarms that are + not cleared but closed."; + } + leaf not-cleared-not-closed { + if-feature "operator-actions"; + type yang:gauge32; + description + "For this severity level, the number of alarms that are + not cleared and not closed."; + } + } + leaf shelves-active { + if-feature "alarm-shelving"; + type empty; + description + "This is a hint to the operator that there are active + alarm shelves. This leaf MUST exist if the + /alarms/shelved-alarms/number-of-shelved-alarms is > 0."; + } + } + container alarm-list { + config false; + description + "The alarms in the system."; + leaf number-of-alarms { + type yang:gauge32; + description + "This object shows the total number of + alarms in the system, i.e., the total number + of entries in the alarm list."; + } + leaf last-changed { + type yang:date-and-time; + description + "A timestamp when the alarm list was last + changed. The value can be used by a manager to + initiate an alarm resynchronization procedure."; + } + list alarm { + key "resource alarm-type-id alarm-type-qualifier"; + description + "The list of alarms. Each entry in the list holds one + alarm for a given alarm type and resource. An alarm can + be updated from the underlying resource or by the user. + The following leafs are maintained by the resource: + 'is-cleared', 'last-change', 'perceived-severity', and + 'alarm-text'. An operator can change 'operator-state' and + 'operator-text'. + + Entries appear in the alarm list the first time an alarm + becomes active for a given alarm type and resource. + Entries do not get deleted when the alarm is cleared. + Clear status is represented as a boolean flag. + + Alarm entries are removed, i.e., purged, from the list by + an explicit purge action. For example, purge all alarms + that are cleared and in closed operator state that are + older than 24 hours. Purged alarms are removed from the + alarm list. If the alarm resource state changes after a + purge, the alarm will reappear in the alarm list. + + Systems may also remove alarms based on locally configured + policies; this is out of scope for this module."; + uses common-alarm-parameters; + leaf time-created { + type yang:date-and-time; + mandatory true; + description + "The timestamp when this alarm entry was created. This + represents the first time the alarm appeared; it can + also represent that the alarm reappeared after a purge. + Further state changes of the same alarm do not change + this leaf; these changes will update the 'last-changed' + leaf."; + } + uses resource-alarm-parameters; + list operator-state-change { + if-feature "operator-actions"; + key "time"; + description + "This list is used by operators to indicate the state of + human intervention on an alarm. For example, if an + operator has seen an alarm, the operator can add a new + item to this list indicating that the alarm is + acknowledged."; + uses operator-parameters; + } + action set-operator-state { + if-feature "operator-actions"; + description + "This is a means for the operator to indicate the level + of human intervention on an alarm."; + input { + leaf state { + type writable-operator-state; + mandatory true; + description + "Set this operator state."; + } + leaf text { + type string; + description + "Additional optional textual information."; + } + } + } + notification operator-action { + if-feature "operator-actions"; + description + "This notification is used to report that an operator + acted upon an alarm."; + uses operator-parameters; + } + } + action purge-alarms { + description + "This operation requests that the server delete entries + from the alarm list according to the supplied criteria. + + Typically, this operation is used to delete alarms that + are in closed operator state and older than a specified + time. + + The number of purged alarms is returned as an output + parameter."; + input { + uses filter-input; + } + output { + leaf purged-alarms { + type uint32; + description + "Number of purged alarms."; + } + } + } + action compress-alarms { + if-feature "alarm-history"; + description + "This operation requests that the server compress + entries in the alarm list by removing all but the + latest 'status-change' entry for all matching alarms. + Conditions in the input are logically ANDed. If no + input condition is given, all alarms are compressed."; + input { + leaf resource { + type resource-match; + description + "Compress the alarms matching this resource."; + } + leaf alarm-type-id { + type leafref { + path "/alarms/alarm-list/alarm/alarm-type-id"; + require-instance false; + } + description + "Compress alarms with this 'alarm-type-id'."; + } + leaf alarm-type-qualifier { + type leafref { + path "/alarms/alarm-list/alarm/alarm-type-qualifier"; + require-instance false; + } + description + "Compress the alarms with this + 'alarm-type-qualifier'."; + } + } + output { + leaf compressed-alarms { + type uint32; + description + "Number of compressed alarm entries."; + } + } + } + } + container shelved-alarms { + if-feature "alarm-shelving"; + config false; + description + "The shelved alarms. Alarms appear here if they match the + criteria in /alarms/control/alarm-shelving. This list does + not generate any notifications. The list represents alarms + that are considered not relevant by the operator. Alarms in + this list have an 'operator-state' of 'shelved'. This + cannot be changed."; + leaf number-of-shelved-alarms { + type yang:gauge32; + description + "This object shows the total number of current + alarms, i.e., the total number of entries + in the alarm list."; + } + leaf shelved-alarms-last-changed { + type yang:date-and-time; + description + "A timestamp when the shelved-alarm list was last changed. + The value can be used by a manager to initiate an alarm + resynchronization procedure."; + } + list shelved-alarm { + key "resource alarm-type-id alarm-type-qualifier"; + description + "The list of shelved alarms. Shelved alarms can only be + updated from the underlying resource; no operator actions + are supported."; + uses common-alarm-parameters; + leaf shelf-name { + type leafref { + path "/alarms/control/alarm-shelving/shelf/name"; + require-instance false; + } + description + "The name of the shelf."; + } + uses resource-alarm-parameters; + list operator-state-change { + if-feature "operator-actions"; + key "time"; + description + "This list is used by operators to indicate the state of + human intervention on an alarm. For shelved alarms, the + system has set the list item in the list to 'shelved'."; + uses operator-parameters; + } + } + action purge-shelved-alarms { + description + "This operation requests that the server delete entries from + the shelved-alarm list according to the supplied criteria. + In the shelved-alarm list, it makes sense to delete alarms + that are not relevant anymore. + + The number of purged alarms is returned as an output + parameter."; + input { + uses filter-input; + } + output { + leaf purged-alarms { + type uint32; + description + "Number of purged alarms."; + } + } + } + action compress-shelved-alarms { + if-feature "alarm-history"; + description + "This operation requests that the server compress entries + in the shelved-alarm list by removing all but the latest + 'status-change' entry for all matching shelved alarms. + Conditions in the input are logically ANDed. If no input + condition is given, all alarms are compressed."; + input { + leaf resource { + type leafref { + path "/alarms/shelved-alarms/shelved-alarm/resource"; + require-instance false; + } + description + "Compress the alarms with this resource."; + } + leaf alarm-type-id { + type leafref { + path "/alarms/shelved-alarms/shelved-alarm" + + "/alarm-type-id"; + require-instance false; + } + description + "Compress alarms with this 'alarm-type-id'."; + } + leaf alarm-type-qualifier { + type leafref { + path "/alarms/shelved-alarms/shelved-alarm" + + "/alarm-type-qualifier"; + require-instance false; + } + description + "Compress the alarms with this + 'alarm-type-qualifier'."; + } + } + output { + leaf compressed-alarms { + type uint32; + description + "Number of compressed alarm entries."; + } + } + } + } + list alarm-profile { + if-feature "alarm-profile"; + key "alarm-type-id alarm-type-qualifier-match resource"; + ordered-by user; + description + "This list is used to assign further information or + configuration for each alarm type. This module supports a + mechanism where the client can override the system-default + alarm severity levels. The 'alarm-profile' is also a useful + augmentation point for specific additions to alarm types."; + leaf alarm-type-id { + type alarm-type-id; + description + "The alarm type identifier to match."; + } + leaf alarm-type-qualifier-match { + type string; + description + "An XML Schema regular expression that is used to match the + alarm type qualifier."; + reference + "XML Schema Part 2: Datatypes Second Edition, + World Wide Web Consortium Recommendation + REC-xmlschema-2-20041028"; + } + leaf resource { + type resource-match; + description + "Specifies which resources to match."; + } + leaf description { + type string; + mandatory true; + description + "A description of the alarm profile."; + } + container alarm-severity-assignment-profile { + if-feature "severity-assignment"; + description + "The client can override the system-default severity + level."; + reference + "ITU-T Recommendation M.3100: + Generic network information model + ITU-T Recommendation M.3160: + Generic, protocol-neutral management information model"; + leaf-list severity-level { + type severity; + ordered-by user; + description + "Specifies the configured severity level(s) for the + matching alarm. If the alarm has several severity + levels, the leaf-list shall be given in rising severity + order. The original M3100/M3160 ASAP function only + allows for a one-to-one mapping between alarm type and + severity, but since YANG module supports stateful + alarms, the mapping must allow for several severity + levels. + + Assume a high-utilization alarm type with two thresholds + with the system-default severity levels of threshold1 = + warning and threshold2 = minor. Setting this leaf-list + to (minor, major) will assign the severity levels as + threshold1 = minor and threshold2 = major"; + } + } + } + } + + /* + * Notifications + */ + + notification alarm-notification { + description + "This notification is used to report a state change for an + alarm. The same notification is used for reporting a newly + raised alarm, a cleared alarm, or changing the text and/or + severity of an existing alarm."; + uses common-alarm-parameters; + uses alarm-state-change-parameters; + } + + notification alarm-inventory-changed { + description + "This notification is used to report that the list of possible + alarms has changed. This can happen when, for example, a new + software module is installed or a new physical card is + inserted."; + } +} diff --git a/models/ietf/RFC/ietf-complex-types.yang b/models/ietf/RFC/ietf-complex-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..dd967ba8564562f203f6127ca6bdfaf3b2e3afcc --- /dev/null +++ b/models/ietf/RFC/ietf-complex-types.yang @@ -0,0 +1,91 @@ +module ietf-complex-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-complex-types"; + prefix "ct"; + + organization + "NETMOD WG"; + + contact + "Editor: Bernd Linowski + <bernd.linowski.ext@nsn.com> + Editor: Mehmet Ersue + <mehmet.ersue@nsn.com> + Editor: Siarhei Kuryla + <s.kuryla@gmail.com>"; + + description + "YANG extensions for complex types and typed instance + identifiers. + + Copyright (c) 2011 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6095; see + the RFC itself for full legal notices."; + + revision 2011-03-15 { + description "Initial revision."; + } + + extension complex-type { + description "Defines a complex-type."; + reference "Section 2.2, complex-type Extension Statement"; + argument type-identifier { + yin-element true; + } + } + + extension extends { + description "Defines the base type of a complex-type."; + reference "Section 2.5, extends Extension Statement"; + argument base-type-identifier { + yin-element true; + } + } + extension abstract { + description "Makes the complex-type abstract."; + reference "Section 2.6, abstract Extension Statement"; + argument status; + } + + extension instance { + description "Declares an instance of the given + complex type."; + reference "Section 2.3, instance Extension Statement"; + argument ct-instance-identifier { + yin-element true; + } + } + + extension instance-list { + description "Declares a list of instances of the given + complex type"; + reference "Section 2.4, instance-list Extension Statement"; + argument ct-instance-identifier { + yin-element true; + } + } + + extension instance-type { + description "Tells to which type instance the instance + identifier refers."; + reference "Section 3.2, instance-type Extension Statement"; + argument target-type-identifier { + yin-element true; + } + } + + feature complex-types { + description "Indicates that the server supports + complex types and instance identifiers."; + } + + } diff --git a/models/ietf/RFC/ietf-complex-types@2011-03-15.yang b/models/ietf/RFC/ietf-complex-types@2011-03-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..dd967ba8564562f203f6127ca6bdfaf3b2e3afcc --- /dev/null +++ b/models/ietf/RFC/ietf-complex-types@2011-03-15.yang @@ -0,0 +1,91 @@ +module ietf-complex-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-complex-types"; + prefix "ct"; + + organization + "NETMOD WG"; + + contact + "Editor: Bernd Linowski + <bernd.linowski.ext@nsn.com> + Editor: Mehmet Ersue + <mehmet.ersue@nsn.com> + Editor: Siarhei Kuryla + <s.kuryla@gmail.com>"; + + description + "YANG extensions for complex types and typed instance + identifiers. + + Copyright (c) 2011 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6095; see + the RFC itself for full legal notices."; + + revision 2011-03-15 { + description "Initial revision."; + } + + extension complex-type { + description "Defines a complex-type."; + reference "Section 2.2, complex-type Extension Statement"; + argument type-identifier { + yin-element true; + } + } + + extension extends { + description "Defines the base type of a complex-type."; + reference "Section 2.5, extends Extension Statement"; + argument base-type-identifier { + yin-element true; + } + } + extension abstract { + description "Makes the complex-type abstract."; + reference "Section 2.6, abstract Extension Statement"; + argument status; + } + + extension instance { + description "Declares an instance of the given + complex type."; + reference "Section 2.3, instance Extension Statement"; + argument ct-instance-identifier { + yin-element true; + } + } + + extension instance-list { + description "Declares a list of instances of the given + complex type"; + reference "Section 2.4, instance-list Extension Statement"; + argument ct-instance-identifier { + yin-element true; + } + } + + extension instance-type { + description "Tells to which type instance the instance + identifier refers."; + reference "Section 3.2, instance-type Extension Statement"; + argument target-type-identifier { + yin-element true; + } + } + + feature complex-types { + description "Indicates that the server supports + complex types and instance identifiers."; + } + + } diff --git a/models/ietf/RFC/ietf-connection-oriented-oam.yang b/models/ietf/RFC/ietf-connection-oriented-oam.yang new file mode 100644 index 0000000000000000000000000000000000000000..1a37489b670ff535e2f213f57b355c239ea2d098 --- /dev/null +++ b/models/ietf/RFC/ietf-connection-oriented-oam.yang @@ -0,0 +1,1082 @@ +module ietf-connection-oriented-oam { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-connection-oriented-oam"; + prefix co-oam; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + import ietf-interfaces { + prefix if; + } + + organization + "IETF LIME Working Group"; + contact + "WG Web: http://datatracker.ietf.org/wg/lime + WG List: <mailto:lime@ietf.org> + Editor: Deepak Kumar <dekumar@cisco.com> + Editor: Qin Wu <bill.wu@huawei.com> + Editor: Michael Wang <wangzitao@huawei.com>"; + description + "This YANG module defines the generic configuration, + statistics and RPC for connection-oriented OAM + to be used within IETF in a protocol-independent manner. + Functional-level abstraction is independent + with YANG modeling. It is assumed that each protocol + maps corresponding abstracts to its native format. + Each protocol may extend the YANG data model defined + here to include protocol-specific extensions + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8531; see + the RFC itself for full legal notices."; + + revision 2019-04-16 { + description + "Initial revision."; + reference + "RFC 8531: Generic YANG Data Model for Connection- + Oriented Operations, Administration, and Maintenance (OAM) + Protocols"; + } + + feature connectivity-verification { + description + "This feature indicates that the server supports + executing a connectivity verification OAM command and + returning a response. Servers that do not advertise + this feature will not support executing a + connectivity verification command or RPC model for a + connectivity verification command."; + } + + feature continuity-check { + description + "This feature indicates that the server supports + executing a Continuity Check OAM command and + returning a response. Servers that do not advertise + this feature will not support executing a + Continuity Check command or RPC model for a + Continuity Check command."; + } + + feature traceroute { + description + "This feature indicates that the server supports + executing a traceroute OAM command and + returning a response. Servers that do not advertise + this feature will not support executing a + traceroute command or RPC model for a + traceroute command."; + } + + feature mip { + description + "This feature indicates that the Maintenance + Intermediate Point (MIP) needs to be explicitly configured"; + } + + identity technology-types { + description + "This is the base identity of technology types that are + TRILL, MPLS-TP, etc."; + } + + identity command-sub-type { + description + "Defines different RPC command subtypes, + e.g., TRILL OAM as specified in RFC 6905; this is + optional for most cases."; + reference + "RFC 6905: Requirements for OAM in Transparent + Interconnection of Lots of Links (TRILL)"; + } + + identity on-demand { + base command-sub-type; + description + "On-demand activation indicates that the tool is activated + manually to detect a specific anomaly. + An on-demand OAM method requires only transient configuration."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity proactive { + base command-sub-type; + description + "Proactive activation indicates that the tool is activated on a + continual basis, where messages are sent periodically, and errors + are detected when a certain number of expected messages are not + received. A proactive OAM method requires persistent + configuration."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity name-format { + description + "This defines the name format, CFM (IEEE 802.1Q) defines varying + styles of names. It is expected that name format is an identity + reference to be extended with new types."; + } + identity name-format-null { + base name-format; + description + "Defines name format as null."; + } + + identity identifier-format { + description + "Identifier-format identity can be augmented to define other + format identifiers used in MEP-ID, etc."; + } + + identity identifier-format-integer { + base identifier-format; + description + "Defines identifier-format to be integer."; + } + + identity defect-types { + description + "Defines different defect types, e.g., + Remote Defect Indication (RDI), loss of continuity."; + } + + identity rdi { + base defect-types; + description + "The RDI indicates the + aggregate health of the remote Maintenance End Points (MEPs)."; + } + + identity remote-mep-defect { + base defect-types; + description + "Indicates that one or more of the remote MEPs are + reporting a failure."; + } + + identity loss-of-continuity { + base defect-types; + description + "Indicates that there are no proactive Continuity Check (CC) + OAM packets from the source MEP (and in the case of + Connectivity Verification, this includes the requirement to have + the expected unique, technology-dependent source MEP identifier) + received within the interval."; + reference + "RFC 6371: Operations, Administration, and Maintenance + Framework for MPLS-Based Transport Networks"; + } + + identity cv-defect { + base defect-types; + description + "This function should support monitoring between the MEPs + and, in addition, between a MEP and MIP. When performing + Connectivity Verification, the Continuity Check and + Connectivity Verification (CC-V) messages need to include + unique identification of the MEG that is being monitored and + the MEP that originated the message."; + reference + "RFC 6371: Operations, Administration, and Maintenance + Framework for MPLS-Based Transport Networks"; + } + + identity invalid-oam-defect { + base defect-types; + description + "Indicates that one or more invalid OAM messages have been + received and that 3.5 times that OAM message transmission + interval has not yet expired."; + } + + identity cross-connect-defect { + base defect-types; + description + "Indicates that one or more cross-connect defect + (for example, a service ID does not match the VLAN) + messages have been received and that 3.5 times that OAM message + transmission interval has not yet expired."; + } + + typedef mep-name { + type string; + description + "Generic administrative name for a MEP."; + } + + typedef time-interval { + type decimal64 { + fraction-digits 2; + } + units "milliseconds"; + description + "Time interval between packets in milliseconds. + Time interval should not be less than 0. + 0 means no packets are sent."; + } + + typedef md-name-string { + type string; + description + "Generic administrative name for Maintenance Domain (MD)."; + } + + typedef ma-name-string { + type string; + description + "Generic administrative name for a + Maintenance Association (MA)."; + } + + typedef oam-counter32 { + type yang:zero-based-counter32; + description + "Define 32-bit counter for OAM."; + } + + typedef md-level { + type uint32 { + range "0..255"; + } + description + "Maintenance Domain Level. The level may be restricted in + certain protocols (e.g., protocol in layer 0 to layer 7)."; + } + + grouping maintenance-domain-reference { + description + "This grouping uniquely identifies a Maintenance Domain."; + leaf maintenance-domain { + type leafref { + path "/co-oam:domains/co-oam:domain/co-oam:md-name-string"; + } + description + "A reference to a specific Maintenance Domain."; + } + } + + grouping maintenance-association-reference { + description + "This grouping uniquely identifies a + Maintenance Association. It consists + of a maintenance-domain-reference and + a maintenance-association leafref."; + uses maintenance-domain-reference; + leaf maintenance-association { + type leafref { + path "/co-oam:domains/co-oam:domain[co-oam:md-name-string " + + "= current()/../maintenance-domain]/co-oam:mas" + + "/co-oam:ma/co-oam:ma-name-string"; + } + description + "A reference to a specific Maintenance Association."; + } + } + + grouping maintenance-association-end-point-reference { + description + "This grouping uniquely identifies + a Maintenance Association. It consists + of a maintenance-association-reference and + a maintenance-association-end-point leafref."; + uses maintenance-association-reference; + leaf maintenance-association-end-point { + type leafref { + path "/co-oam:domains/co-oam:domain[co-oam:md-name-string " + + "= current()/../maintenance-domain]/co-oam:mas" + + "/co-oam:ma[co-oam:ma-name-string = " + + "current()/../maintenance-association]" + + "/co-oam:mep/co-oam:mep-name"; + } + description + "A reference to a specific Maintenance + association End Point."; + } + } + + grouping time-to-live { + leaf ttl { + type uint8; + description + "Time to Live."; + } + description + "Time to Live grouping."; + } + + grouping defect-message { + choice defect { + case defect-null { + description + "This is a placeholder when no defect status is needed."; + leaf defect-null { + type empty; + description + "There is no defect to be defined; it will be defined in + a technology-specific model."; + } + } + case defect-code { + description + "This is a placeholder to display defect code."; + leaf defect-code { + type int32; + description + "Defect code is integer value specific to a technology."; + } + } + description + "Defect Message choices."; + } + description + "Defect Message."; + } + + grouping mep-address { + choice mep-address { + default "ip-address"; + case mac-address { + leaf mac-address { + type yang:mac-address; + description + "MAC Address."; + } + description + "MAC Address based MEP Addressing."; + } + case ip-address { + leaf ip-address { + type inet:ip-address; + description + "IP Address."; + } + description + "IP Address based MEP Addressing."; + } + description + "MEP Addressing."; + } + description + "Grouping for MEP Address"; + } + + grouping mip-address { + choice mip-address { + default "ip-address"; + case mac-address { + leaf mac-address { + type yang:mac-address; + description + "MAC Address of Maintenance Intermediate Point"; + } + description + "MAC Address based MIP Addressing."; + } + case ip-address { + leaf ip-address { + type inet:ip-address; + description + "IP Address."; + } + description + "IP Address based MIP Addressing."; + } + description + "MIP Addressing."; + } + description + "MIP Address."; + } + + grouping maintenance-domain-id { + description + "Grouping containing leaves sufficient to identify + a Maintenance Domain."; + leaf technology { + type identityref { + base technology-types; + } + mandatory true; + description + "Defines the technology."; + } + leaf md-name-string { + type md-name-string; + mandatory true; + description + "Defines the generic administrative Maintenance Domain name."; + } + } + + grouping md-name { + leaf md-name-format { + type identityref { + base name-format; + } + description + "Maintenance Domain Name format."; + } + choice md-name { + case md-name-null { + leaf md-name-null { + when "derived-from-or-self(../md-name-format," + + "'name-format-null')" { + description + "MD name format is equal to null format."; + } + type empty; + description + "MD name null."; + } + } + description + "MD name."; + } + description + "MD name."; + } + + grouping ma-identifier { + description + "Grouping containing leaves sufficient to identify an MA."; + leaf ma-name-string { + type ma-name-string; + description + "MA name string."; + } + } + + grouping ma-name { + description + "MA name."; + leaf ma-name-format { + type identityref { + base name-format; + } + description + "MA name format."; + } + choice ma-name { + case ma-name-null { + leaf ma-name-null { + when "derived-from-or-self(../ma-name-format," + + "'name-format-null')" { + description + "MA."; + } + type empty; + description + "Empty"; + } + } + description + "MA name."; + } + } + + grouping mep-id { + choice mep-id { + default "mep-id-int"; + case mep-id-int { + leaf mep-id-int { + type int32; + description + "MEP ID + in integer format."; + } + } + description + "MEP ID."; + } + leaf mep-id-format { + type identityref { + base identifier-format; + } + description + "MEP ID format."; + } + description + "MEP ID."; + } + + grouping mep { + description + "Defines elements within the MEP."; + leaf mep-name { + type mep-name; + mandatory true; + description + "Generic administrative name of the + MEP."; + } + uses mep-id; + uses mep-address; + } + + grouping monitor-stats { + description + "Grouping for monitoring statistics; this will be augmented + by others who use this component."; + choice monitor-stats { + default "monitor-null"; + case monitor-null { + description + "This is a placeholder when + no monitoring statistics are needed."; + leaf monitor-null { + type empty; + description + "There are no monitoring statistics to be defined."; + } + } + description + "Define the monitor stats."; + } + } + + grouping connectivity-context { + description + "Grouping defining the connectivity context for an MA, + for example, an LSP for MPLS-TP. This will be + augmented by each protocol that uses this component."; + choice connectivity-context { + default "context-null"; + case context-null { + description + "This is a placeholder when no context is needed."; + leaf context-null { + type empty; + description + "There is no context to be defined."; + } + } + description + "Connectivity context."; + } + } + + grouping cos { + description + "Grouping for Priority used in transmitted packets, + for example, in the CoS field in MPLS-TP."; + leaf cos-id { + type uint8; + description + "Class of Service (CoS) ID; this value is used to indicate + Class of Service information ."; + } + } + + grouping mip-grouping { + uses mip-address; + description + "Grouping for MIP + configuration."; + } + + container domains { + description + "Contains configuration related data. Within the + container, there is a list of fault domains. Each + domain has a list of MAs."; + list domain { + key "technology md-name-string"; + description + "Define a list of Domains within the + ietf-connection-oriented-oam module."; + uses maintenance-domain-id; + uses md-name; + leaf md-level { + type md-level; + description + "Define the MD level."; + } + container mas { + description + "Contains configuration-related data. Within the + container, there is a list of MAs. Each MA has a + list of MEPs."; + list ma { + key "ma-name-string"; + uses ma-identifier; + uses ma-name; + uses connectivity-context; + uses cos { + description + "Default class of service for this MA; + it may be overridden for particular MEPs, + sessions, or operations."; + } + leaf cc-enable { + type boolean; + description + "Indicate whether the CC is enabled."; + } + list mep { + key "mep-name"; + description + "Contain a list of MEPs."; + uses mep; + uses cos; + leaf cc-enable { + type boolean; + description + "Indicate whether the CC is enabled."; + } + list session { + key "session-cookie"; + description + "Monitoring session to/from a particular remote MEP. + Depending on the protocol, this could represent + CC messages received from a single remote MEP (if the + protocol uses multicast CCs) or a target to which + unicast echo request CCs are sent and from which + responses are received (if the protocol uses a + unicast request/response mechanism)."; + leaf session-cookie { + type uint32; + description + "Cookie to identify different sessions, when there + are multiple remote MEPs or multiple sessions to + the same remote MEP."; + } + container destination-mep { + uses mep-id; + description + "Destination MEP."; + } + container destination-mep-address { + uses mep-address; + description + "Destination MEP Address."; + } + uses cos; + } + } + list mip { + if-feature "mip"; + key "name"; + leaf name { + type string; + description + "Identifier of Maintenance Intermediate Point"; + } + leaf interface { + type if:interface-ref; + description + "Interface."; + } + uses mip-grouping; + description + "List for MIP."; + } + description + "Maintenance Association list."; + } + } + } + } + + notification defect-condition-notification { + description + "When the defect condition is met, this notification is sent."; + leaf technology { + type identityref { + base technology-types; + } + description + "The technology."; + } + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to."; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + leaf mep-name { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Indicate which MEP is seeing the defect."; + } + leaf defect-type { + type identityref { + base defect-types; + } + description + "The currently active defects on the specific MEP."; + } + container generating-mepid { + uses mep-id; + description + "Indicate who is generating the defect (if known). If + unknown, set it to 0."; + } + uses defect-message { + description + "Defect message to provide more details."; + } + } + + notification defect-cleared-notification { + description + "When the defect is cleared, this notification is sent."; + leaf technology { + type identityref { + base technology-types; + } + description + "The technology."; + } + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to"; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + leaf mep-name { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Indicate which MEP is seeing the defect."; + } + leaf defect-type { + type identityref { + base defect-types; + } + description + "The currently active defects on the specific MEP."; + } + container generating-mepid { + uses mep-id; + description + "Indicate who is generating the defect (if known). If + unknown, set it to 0."; + } + uses defect-message { + description + "Defect message to provide more details."; + } + } + + rpc continuity-check { + if-feature "continuity-check"; + description + "Generates Continuity Check as per Table 4 of RFC 7276."; + input { + leaf technology { + type identityref { + base technology-types; + } + description + "The technology."; + } + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to."; + } + leaf md-level { + type leafref { + path "/domains/domain/md-level"; + } + description + "The Maintenance Domain Level."; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + uses cos; + uses time-to-live; + leaf sub-type { + type identityref { + base command-sub-type; + } + description + "Defines different command types."; + } + leaf source-mep { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Source MEP."; + } + container destination-mep { + uses mep-address; + uses mep-id { + description + "Only applicable if the destination is a MEP."; + } + description + "Destination MEP."; + } + leaf count { + type uint32; + default "3"; + description + "Number of continuity-check messages to be sent."; + } + leaf cc-transmit-interval { + type time-interval; + description + "Time interval between echo requests."; + } + leaf packet-size { + type uint32 { + range "64..10000"; + } + description + "Size of continuity-check packets, in octets."; + } + } + output { + uses monitor-stats { + description + "Stats of Continuity Check."; + } + } + } + + rpc continuity-verification { + if-feature "connectivity-verification"; + description + "Generates Connectivity Verification as per Table 4 in RFC 7276."; + input { + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to."; + } + leaf md-level { + type leafref { + path "/domains/domain/md-level"; + } + description + "The Maintenance Domain Level."; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + uses cos; + uses time-to-live; + leaf sub-type { + type identityref { + base command-sub-type; + } + description + "Defines different command types."; + } + leaf source-mep { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Source MEP."; + } + container destination-mep { + uses mep-address; + uses mep-id { + description + "Only applicable if the destination is a MEP."; + } + description + "Destination MEP."; + } + leaf count { + type uint32; + default "3"; + description + "Number of continuity-verification messages to be sent."; + } + leaf interval { + type time-interval; + description + "Time interval between echo requests."; + } + leaf packet-size { + type uint32 { + range "64..10000"; + } + description + "Size of continuity-verification packets, in octets."; + } + } + output { + uses monitor-stats { + description + "Stats of Continuity Check."; + } + } + } + + rpc traceroute { + if-feature "traceroute"; + description + "Generates Traceroute or Path Trace and returns response. + References RFC 7276 for common Toolset name -- for + MPLS-TP OAM, it's Route Tracing, and for TRILL OAM, it's + Path Tracing tool. Starts with TTL of one and increments + by one at each hop until the destination is reached or TTL + reaches max value."; + input { + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to."; + } + leaf md-level { + type leafref { + path "/domains/domain/md-level"; + } + description + "The Maintenance Domain Level."; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + uses cos; + uses time-to-live; + leaf command-sub-type { + type identityref { + base command-sub-type; + } + description + "Defines different command types."; + } + leaf source-mep { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Source MEP."; + } + container destination-mep { + uses mep-address; + uses mep-id { + description + "Only applicable if the destination is a MEP."; + } + description + "Destination MEP."; + } + leaf count { + type uint32; + default "1"; + description + "Number of traceroute probes to send. In protocols where a + separate message is sent at each TTL, this is the number + of packets to be sent at each TTL."; + } + leaf interval { + type time-interval; + description + "Time interval between echo requests."; + } + } + output { + list response { + key "response-index"; + leaf response-index { + type uint8; + description + "Arbitrary index for the response. In protocols that + guarantee there is only a single response at each TTL, + the TTL can be used as the response index."; + } + uses time-to-live; + container destination-mep { + description + "MEP from which the response has been received"; + uses mep-address; + uses mep-id { + description + "Only applicable if the destination is a MEP."; + } + } + container mip { + if-feature "mip"; + leaf interface { + type if:interface-ref; + description + "MIP interface."; + } + uses mip-address; + description + "MIP responding with traceroute"; + } + uses monitor-stats { + description + "Stats of traceroute."; + } + description + "List of responses."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-connection-oriented-oam@2019-04-16.yang b/models/ietf/RFC/ietf-connection-oriented-oam@2019-04-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..1a37489b670ff535e2f213f57b355c239ea2d098 --- /dev/null +++ b/models/ietf/RFC/ietf-connection-oriented-oam@2019-04-16.yang @@ -0,0 +1,1082 @@ +module ietf-connection-oriented-oam { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-connection-oriented-oam"; + prefix co-oam; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + import ietf-interfaces { + prefix if; + } + + organization + "IETF LIME Working Group"; + contact + "WG Web: http://datatracker.ietf.org/wg/lime + WG List: <mailto:lime@ietf.org> + Editor: Deepak Kumar <dekumar@cisco.com> + Editor: Qin Wu <bill.wu@huawei.com> + Editor: Michael Wang <wangzitao@huawei.com>"; + description + "This YANG module defines the generic configuration, + statistics and RPC for connection-oriented OAM + to be used within IETF in a protocol-independent manner. + Functional-level abstraction is independent + with YANG modeling. It is assumed that each protocol + maps corresponding abstracts to its native format. + Each protocol may extend the YANG data model defined + here to include protocol-specific extensions + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8531; see + the RFC itself for full legal notices."; + + revision 2019-04-16 { + description + "Initial revision."; + reference + "RFC 8531: Generic YANG Data Model for Connection- + Oriented Operations, Administration, and Maintenance (OAM) + Protocols"; + } + + feature connectivity-verification { + description + "This feature indicates that the server supports + executing a connectivity verification OAM command and + returning a response. Servers that do not advertise + this feature will not support executing a + connectivity verification command or RPC model for a + connectivity verification command."; + } + + feature continuity-check { + description + "This feature indicates that the server supports + executing a Continuity Check OAM command and + returning a response. Servers that do not advertise + this feature will not support executing a + Continuity Check command or RPC model for a + Continuity Check command."; + } + + feature traceroute { + description + "This feature indicates that the server supports + executing a traceroute OAM command and + returning a response. Servers that do not advertise + this feature will not support executing a + traceroute command or RPC model for a + traceroute command."; + } + + feature mip { + description + "This feature indicates that the Maintenance + Intermediate Point (MIP) needs to be explicitly configured"; + } + + identity technology-types { + description + "This is the base identity of technology types that are + TRILL, MPLS-TP, etc."; + } + + identity command-sub-type { + description + "Defines different RPC command subtypes, + e.g., TRILL OAM as specified in RFC 6905; this is + optional for most cases."; + reference + "RFC 6905: Requirements for OAM in Transparent + Interconnection of Lots of Links (TRILL)"; + } + + identity on-demand { + base command-sub-type; + description + "On-demand activation indicates that the tool is activated + manually to detect a specific anomaly. + An on-demand OAM method requires only transient configuration."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity proactive { + base command-sub-type; + description + "Proactive activation indicates that the tool is activated on a + continual basis, where messages are sent periodically, and errors + are detected when a certain number of expected messages are not + received. A proactive OAM method requires persistent + configuration."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity name-format { + description + "This defines the name format, CFM (IEEE 802.1Q) defines varying + styles of names. It is expected that name format is an identity + reference to be extended with new types."; + } + identity name-format-null { + base name-format; + description + "Defines name format as null."; + } + + identity identifier-format { + description + "Identifier-format identity can be augmented to define other + format identifiers used in MEP-ID, etc."; + } + + identity identifier-format-integer { + base identifier-format; + description + "Defines identifier-format to be integer."; + } + + identity defect-types { + description + "Defines different defect types, e.g., + Remote Defect Indication (RDI), loss of continuity."; + } + + identity rdi { + base defect-types; + description + "The RDI indicates the + aggregate health of the remote Maintenance End Points (MEPs)."; + } + + identity remote-mep-defect { + base defect-types; + description + "Indicates that one or more of the remote MEPs are + reporting a failure."; + } + + identity loss-of-continuity { + base defect-types; + description + "Indicates that there are no proactive Continuity Check (CC) + OAM packets from the source MEP (and in the case of + Connectivity Verification, this includes the requirement to have + the expected unique, technology-dependent source MEP identifier) + received within the interval."; + reference + "RFC 6371: Operations, Administration, and Maintenance + Framework for MPLS-Based Transport Networks"; + } + + identity cv-defect { + base defect-types; + description + "This function should support monitoring between the MEPs + and, in addition, between a MEP and MIP. When performing + Connectivity Verification, the Continuity Check and + Connectivity Verification (CC-V) messages need to include + unique identification of the MEG that is being monitored and + the MEP that originated the message."; + reference + "RFC 6371: Operations, Administration, and Maintenance + Framework for MPLS-Based Transport Networks"; + } + + identity invalid-oam-defect { + base defect-types; + description + "Indicates that one or more invalid OAM messages have been + received and that 3.5 times that OAM message transmission + interval has not yet expired."; + } + + identity cross-connect-defect { + base defect-types; + description + "Indicates that one or more cross-connect defect + (for example, a service ID does not match the VLAN) + messages have been received and that 3.5 times that OAM message + transmission interval has not yet expired."; + } + + typedef mep-name { + type string; + description + "Generic administrative name for a MEP."; + } + + typedef time-interval { + type decimal64 { + fraction-digits 2; + } + units "milliseconds"; + description + "Time interval between packets in milliseconds. + Time interval should not be less than 0. + 0 means no packets are sent."; + } + + typedef md-name-string { + type string; + description + "Generic administrative name for Maintenance Domain (MD)."; + } + + typedef ma-name-string { + type string; + description + "Generic administrative name for a + Maintenance Association (MA)."; + } + + typedef oam-counter32 { + type yang:zero-based-counter32; + description + "Define 32-bit counter for OAM."; + } + + typedef md-level { + type uint32 { + range "0..255"; + } + description + "Maintenance Domain Level. The level may be restricted in + certain protocols (e.g., protocol in layer 0 to layer 7)."; + } + + grouping maintenance-domain-reference { + description + "This grouping uniquely identifies a Maintenance Domain."; + leaf maintenance-domain { + type leafref { + path "/co-oam:domains/co-oam:domain/co-oam:md-name-string"; + } + description + "A reference to a specific Maintenance Domain."; + } + } + + grouping maintenance-association-reference { + description + "This grouping uniquely identifies a + Maintenance Association. It consists + of a maintenance-domain-reference and + a maintenance-association leafref."; + uses maintenance-domain-reference; + leaf maintenance-association { + type leafref { + path "/co-oam:domains/co-oam:domain[co-oam:md-name-string " + + "= current()/../maintenance-domain]/co-oam:mas" + + "/co-oam:ma/co-oam:ma-name-string"; + } + description + "A reference to a specific Maintenance Association."; + } + } + + grouping maintenance-association-end-point-reference { + description + "This grouping uniquely identifies + a Maintenance Association. It consists + of a maintenance-association-reference and + a maintenance-association-end-point leafref."; + uses maintenance-association-reference; + leaf maintenance-association-end-point { + type leafref { + path "/co-oam:domains/co-oam:domain[co-oam:md-name-string " + + "= current()/../maintenance-domain]/co-oam:mas" + + "/co-oam:ma[co-oam:ma-name-string = " + + "current()/../maintenance-association]" + + "/co-oam:mep/co-oam:mep-name"; + } + description + "A reference to a specific Maintenance + association End Point."; + } + } + + grouping time-to-live { + leaf ttl { + type uint8; + description + "Time to Live."; + } + description + "Time to Live grouping."; + } + + grouping defect-message { + choice defect { + case defect-null { + description + "This is a placeholder when no defect status is needed."; + leaf defect-null { + type empty; + description + "There is no defect to be defined; it will be defined in + a technology-specific model."; + } + } + case defect-code { + description + "This is a placeholder to display defect code."; + leaf defect-code { + type int32; + description + "Defect code is integer value specific to a technology."; + } + } + description + "Defect Message choices."; + } + description + "Defect Message."; + } + + grouping mep-address { + choice mep-address { + default "ip-address"; + case mac-address { + leaf mac-address { + type yang:mac-address; + description + "MAC Address."; + } + description + "MAC Address based MEP Addressing."; + } + case ip-address { + leaf ip-address { + type inet:ip-address; + description + "IP Address."; + } + description + "IP Address based MEP Addressing."; + } + description + "MEP Addressing."; + } + description + "Grouping for MEP Address"; + } + + grouping mip-address { + choice mip-address { + default "ip-address"; + case mac-address { + leaf mac-address { + type yang:mac-address; + description + "MAC Address of Maintenance Intermediate Point"; + } + description + "MAC Address based MIP Addressing."; + } + case ip-address { + leaf ip-address { + type inet:ip-address; + description + "IP Address."; + } + description + "IP Address based MIP Addressing."; + } + description + "MIP Addressing."; + } + description + "MIP Address."; + } + + grouping maintenance-domain-id { + description + "Grouping containing leaves sufficient to identify + a Maintenance Domain."; + leaf technology { + type identityref { + base technology-types; + } + mandatory true; + description + "Defines the technology."; + } + leaf md-name-string { + type md-name-string; + mandatory true; + description + "Defines the generic administrative Maintenance Domain name."; + } + } + + grouping md-name { + leaf md-name-format { + type identityref { + base name-format; + } + description + "Maintenance Domain Name format."; + } + choice md-name { + case md-name-null { + leaf md-name-null { + when "derived-from-or-self(../md-name-format," + + "'name-format-null')" { + description + "MD name format is equal to null format."; + } + type empty; + description + "MD name null."; + } + } + description + "MD name."; + } + description + "MD name."; + } + + grouping ma-identifier { + description + "Grouping containing leaves sufficient to identify an MA."; + leaf ma-name-string { + type ma-name-string; + description + "MA name string."; + } + } + + grouping ma-name { + description + "MA name."; + leaf ma-name-format { + type identityref { + base name-format; + } + description + "MA name format."; + } + choice ma-name { + case ma-name-null { + leaf ma-name-null { + when "derived-from-or-self(../ma-name-format," + + "'name-format-null')" { + description + "MA."; + } + type empty; + description + "Empty"; + } + } + description + "MA name."; + } + } + + grouping mep-id { + choice mep-id { + default "mep-id-int"; + case mep-id-int { + leaf mep-id-int { + type int32; + description + "MEP ID + in integer format."; + } + } + description + "MEP ID."; + } + leaf mep-id-format { + type identityref { + base identifier-format; + } + description + "MEP ID format."; + } + description + "MEP ID."; + } + + grouping mep { + description + "Defines elements within the MEP."; + leaf mep-name { + type mep-name; + mandatory true; + description + "Generic administrative name of the + MEP."; + } + uses mep-id; + uses mep-address; + } + + grouping monitor-stats { + description + "Grouping for monitoring statistics; this will be augmented + by others who use this component."; + choice monitor-stats { + default "monitor-null"; + case monitor-null { + description + "This is a placeholder when + no monitoring statistics are needed."; + leaf monitor-null { + type empty; + description + "There are no monitoring statistics to be defined."; + } + } + description + "Define the monitor stats."; + } + } + + grouping connectivity-context { + description + "Grouping defining the connectivity context for an MA, + for example, an LSP for MPLS-TP. This will be + augmented by each protocol that uses this component."; + choice connectivity-context { + default "context-null"; + case context-null { + description + "This is a placeholder when no context is needed."; + leaf context-null { + type empty; + description + "There is no context to be defined."; + } + } + description + "Connectivity context."; + } + } + + grouping cos { + description + "Grouping for Priority used in transmitted packets, + for example, in the CoS field in MPLS-TP."; + leaf cos-id { + type uint8; + description + "Class of Service (CoS) ID; this value is used to indicate + Class of Service information ."; + } + } + + grouping mip-grouping { + uses mip-address; + description + "Grouping for MIP + configuration."; + } + + container domains { + description + "Contains configuration related data. Within the + container, there is a list of fault domains. Each + domain has a list of MAs."; + list domain { + key "technology md-name-string"; + description + "Define a list of Domains within the + ietf-connection-oriented-oam module."; + uses maintenance-domain-id; + uses md-name; + leaf md-level { + type md-level; + description + "Define the MD level."; + } + container mas { + description + "Contains configuration-related data. Within the + container, there is a list of MAs. Each MA has a + list of MEPs."; + list ma { + key "ma-name-string"; + uses ma-identifier; + uses ma-name; + uses connectivity-context; + uses cos { + description + "Default class of service for this MA; + it may be overridden for particular MEPs, + sessions, or operations."; + } + leaf cc-enable { + type boolean; + description + "Indicate whether the CC is enabled."; + } + list mep { + key "mep-name"; + description + "Contain a list of MEPs."; + uses mep; + uses cos; + leaf cc-enable { + type boolean; + description + "Indicate whether the CC is enabled."; + } + list session { + key "session-cookie"; + description + "Monitoring session to/from a particular remote MEP. + Depending on the protocol, this could represent + CC messages received from a single remote MEP (if the + protocol uses multicast CCs) or a target to which + unicast echo request CCs are sent and from which + responses are received (if the protocol uses a + unicast request/response mechanism)."; + leaf session-cookie { + type uint32; + description + "Cookie to identify different sessions, when there + are multiple remote MEPs or multiple sessions to + the same remote MEP."; + } + container destination-mep { + uses mep-id; + description + "Destination MEP."; + } + container destination-mep-address { + uses mep-address; + description + "Destination MEP Address."; + } + uses cos; + } + } + list mip { + if-feature "mip"; + key "name"; + leaf name { + type string; + description + "Identifier of Maintenance Intermediate Point"; + } + leaf interface { + type if:interface-ref; + description + "Interface."; + } + uses mip-grouping; + description + "List for MIP."; + } + description + "Maintenance Association list."; + } + } + } + } + + notification defect-condition-notification { + description + "When the defect condition is met, this notification is sent."; + leaf technology { + type identityref { + base technology-types; + } + description + "The technology."; + } + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to."; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + leaf mep-name { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Indicate which MEP is seeing the defect."; + } + leaf defect-type { + type identityref { + base defect-types; + } + description + "The currently active defects on the specific MEP."; + } + container generating-mepid { + uses mep-id; + description + "Indicate who is generating the defect (if known). If + unknown, set it to 0."; + } + uses defect-message { + description + "Defect message to provide more details."; + } + } + + notification defect-cleared-notification { + description + "When the defect is cleared, this notification is sent."; + leaf technology { + type identityref { + base technology-types; + } + description + "The technology."; + } + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to"; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + leaf mep-name { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Indicate which MEP is seeing the defect."; + } + leaf defect-type { + type identityref { + base defect-types; + } + description + "The currently active defects on the specific MEP."; + } + container generating-mepid { + uses mep-id; + description + "Indicate who is generating the defect (if known). If + unknown, set it to 0."; + } + uses defect-message { + description + "Defect message to provide more details."; + } + } + + rpc continuity-check { + if-feature "continuity-check"; + description + "Generates Continuity Check as per Table 4 of RFC 7276."; + input { + leaf technology { + type identityref { + base technology-types; + } + description + "The technology."; + } + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to."; + } + leaf md-level { + type leafref { + path "/domains/domain/md-level"; + } + description + "The Maintenance Domain Level."; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + uses cos; + uses time-to-live; + leaf sub-type { + type identityref { + base command-sub-type; + } + description + "Defines different command types."; + } + leaf source-mep { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Source MEP."; + } + container destination-mep { + uses mep-address; + uses mep-id { + description + "Only applicable if the destination is a MEP."; + } + description + "Destination MEP."; + } + leaf count { + type uint32; + default "3"; + description + "Number of continuity-check messages to be sent."; + } + leaf cc-transmit-interval { + type time-interval; + description + "Time interval between echo requests."; + } + leaf packet-size { + type uint32 { + range "64..10000"; + } + description + "Size of continuity-check packets, in octets."; + } + } + output { + uses monitor-stats { + description + "Stats of Continuity Check."; + } + } + } + + rpc continuity-verification { + if-feature "connectivity-verification"; + description + "Generates Connectivity Verification as per Table 4 in RFC 7276."; + input { + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to."; + } + leaf md-level { + type leafref { + path "/domains/domain/md-level"; + } + description + "The Maintenance Domain Level."; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + uses cos; + uses time-to-live; + leaf sub-type { + type identityref { + base command-sub-type; + } + description + "Defines different command types."; + } + leaf source-mep { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Source MEP."; + } + container destination-mep { + uses mep-address; + uses mep-id { + description + "Only applicable if the destination is a MEP."; + } + description + "Destination MEP."; + } + leaf count { + type uint32; + default "3"; + description + "Number of continuity-verification messages to be sent."; + } + leaf interval { + type time-interval; + description + "Time interval between echo requests."; + } + leaf packet-size { + type uint32 { + range "64..10000"; + } + description + "Size of continuity-verification packets, in octets."; + } + } + output { + uses monitor-stats { + description + "Stats of Continuity Check."; + } + } + } + + rpc traceroute { + if-feature "traceroute"; + description + "Generates Traceroute or Path Trace and returns response. + References RFC 7276 for common Toolset name -- for + MPLS-TP OAM, it's Route Tracing, and for TRILL OAM, it's + Path Tracing tool. Starts with TTL of one and increments + by one at each hop until the destination is reached or TTL + reaches max value."; + input { + leaf md-name-string { + type leafref { + path "/domains/domain/md-name-string"; + } + mandatory true; + description + "Indicate which MD the defect belongs to."; + } + leaf md-level { + type leafref { + path "/domains/domain/md-level"; + } + description + "The Maintenance Domain Level."; + } + leaf ma-name-string { + type leafref { + path "/domains/domain/mas/ma/ma-name-string"; + } + mandatory true; + description + "Indicate which MA the defect is associated with."; + } + uses cos; + uses time-to-live; + leaf command-sub-type { + type identityref { + base command-sub-type; + } + description + "Defines different command types."; + } + leaf source-mep { + type leafref { + path "/domains/domain/mas/ma/mep/mep-name"; + } + description + "Source MEP."; + } + container destination-mep { + uses mep-address; + uses mep-id { + description + "Only applicable if the destination is a MEP."; + } + description + "Destination MEP."; + } + leaf count { + type uint32; + default "1"; + description + "Number of traceroute probes to send. In protocols where a + separate message is sent at each TTL, this is the number + of packets to be sent at each TTL."; + } + leaf interval { + type time-interval; + description + "Time interval between echo requests."; + } + } + output { + list response { + key "response-index"; + leaf response-index { + type uint8; + description + "Arbitrary index for the response. In protocols that + guarantee there is only a single response at each TTL, + the TTL can be used as the response index."; + } + uses time-to-live; + container destination-mep { + description + "MEP from which the response has been received"; + uses mep-address; + uses mep-id { + description + "Only applicable if the destination is a MEP."; + } + } + container mip { + if-feature "mip"; + leaf interface { + type if:interface-ref; + description + "MIP interface."; + } + uses mip-address; + description + "MIP responding with traceroute"; + } + uses monitor-stats { + description + "Stats of traceroute."; + } + description + "List of responses."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-connectionless-oam-methods.yang b/models/ietf/RFC/ietf-connectionless-oam-methods.yang new file mode 100644 index 0000000000000000000000000000000000000000..7964381d3e5c935e60d6143581ea80eb91bdf124 --- /dev/null +++ b/models/ietf/RFC/ietf-connectionless-oam-methods.yang @@ -0,0 +1,434 @@ +module ietf-connectionless-oam-methods { + namespace + "urn:ietf:params:xml:ns:yang:ietf-connectionless-oam-methods"; + prefix cloam-methods; + + import ietf-interfaces { + prefix if; + } + import ietf-connectionless-oam { + prefix cl-oam; + } + organization + "IETF LIME Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/lime> + WG List: <mailto:lmap@ietf.org> + + Deepak Kumar <dekumar@cisco.com> + Qin Wu <bill.wu@huawei.com> + Srihari Raghavan <rihari@cisco.com> + Michael Wang <wangzitao@huawei.com> + Reshad Rahman <rrahman@cisco.com>"; + description + "This YANG module defines the RPC operations for + connectionless OAM to be used within the IETF + in a protocol-independent manner. It is + assumed that each protocol maps corresponding + abstracts to its native format. Each protocol + may extend the YANG data model defined here to + include protocol-specific extensions. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8533; see + the RFC itself for full legal notices."; + + revision 2019-04-16 { + description + "Initial revision."; + reference + "RFC 8533: Retrieval Methods YANG Data Model for the Management + of Operations, Administration, and Maintenance (OAM) + Protocols That Use Connectionless Communications"; + } + + identity protocol-id { + description + "This is the base identity for a generic protocol + ID. The protocol registry can be found at + https://www.iana.org/protocols."; + } + identity protocol-id-internet { + base protocol-id; + description + "Identity for Internet Protocols."; + } + + identity protocol-id-proprietary { + base protocol-id; + description + "Identity for proprietary protocols (e.g., + IP SLA)."; + } + + identity protocol-id-sfc { + base protocol-id; + description + "Identity for Service Function Chaining."; + } + + identity protocol-id-mpls { + base protocol-id; + description + "The MPLS protocol."; + } + + identity protocol-id-mpls-tp { + base protocol-id; + description + "The MPLS-TP protocol."; + } + + identity protocol-id-twamp { + base protocol-id; + description + "The Two-Way Active Measurement Protocol (TWAMP) + protocol."; + } + + identity protocol-id-bier { + base protocol-id; + description + "The Bit Index Explicit Replication (BIER) + protocol."; + } + + identity status-code { + description + "This is base identity for a status code."; + } + + identity success-reach { + base status-code; + description + "Indicates that the destination being verified + is reachable (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity fail-reach { + base status-code; + description + "Indicates that the destination being verified + is not reachable (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity success-path-verification { + base status-code; + description + "Indicates that the path verification is performed + successfully (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity fail-path-verification { + base status-code; + description + "Indicates that the path verification fails + (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity status-sub-code { + description + "IdentityBase status-sub-code."; + } + + identity invalid-cc { + base status-sub-code; + description + "Indicates that the Continuity Check message is invalid + (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity invalid-pd { + base status-sub-code; + description + "Indicates that the path discovery message is invalid + (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity protocol-id-meta-data { + description + "This is the base identity for metadata that corresponds + to the protocol ID."; + } + + identity protocol-internet-number { + base protocol-id-meta-data; + description + "Internet Protocol number for standard + Internet Protocols (IANA-assigned Internet + Protocol numbers) to help in protocol processing. + The Protocol Numbers registry can be found at + https://www.iana.org/assignments/protocol-numbers."; + } + + grouping rpc-input-parameters { + container destination-tp { + uses cl-oam:tp-address; + description + "Destination test point."; + } + leaf source-interface { + type if:interface-ref; + mandatory true; + description + "Source interface."; + } + leaf outbound-interface { + type if:interface-ref; + mandatory true; + description + "Outbound interface."; + } + leaf vrf { + type cl-oam:routing-instance-ref; + description + "Virtual Routing and Forwarding (VRF) instance."; + } + description + "Grouping for RPC input parameters"; + } + + rpc continuity-check { + if-feature "cl-oam:continuity-check"; + description + "Continuity Check RPC operation as per RFC 7276."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + input { + uses rpc-input-parameters; + uses cl-oam:session-type { + description + "If session-type is specified, then session-type + must be set to on demand"; + } + leaf count { + type uint32 { + range "0..4294967295" { + description + "The overall number of packets to be transmitted + by the sender. The value of the count will be set + to zero (0) on creation and will thereafter + increase monotonically until it reaches a maximum + value of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + } + default "5"; + description + "Specifies the number of + packets that will be sent. By + default, the packet number is + set to 5."; + } + leaf ttl { + type uint8; + default "255"; + description + "Time to live (TTL) used to limit the lifetime + of data packets transmitted in the network + to prevent looping. The TTL value is decremented + for every hop that the packet traverses. If the + TTL is zero, the data packet will be discarded."; + } + leaf packet-size { + type uint32 { + range "64..10000"; + } + default "64"; + description + "Packet size of the Continuity Check message, in octets. + By default, the packet size is set to 64 octets."; + } + } + output { + container response-info { + leaf protocol-id { + type identityref { + base protocol-id; + } + mandatory true; + description + "Protocol used in the Continuity Check message. + This could be a standard protocol (e.g., + TCP/IP protocols, MPLS, etc.) or a proprietary + protocol as identified by this field."; + } + leaf protocol-id-meta-data { + type identityref { + base protocol-id-meta-data; + } + description + "An optional metadata related to the protocol ID. + For example, this could be the Internet Protocol + number for standard Internet Protocols used for + help with protocol processing."; + } + leaf status-code { + type identityref { + base status-code; + } + mandatory true; + description + "Status code for Continuity Check RPC operation. + This could be a basic status code (e.g., destination + is reachable or destination is not reachable; see RFC 7276) + or some customized status code as identified by this + field."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + leaf status-sub-code { + type identityref { + base status-sub-code; + } + mandatory true; + description + "An optional status-sub-code for Continuity Check + RPC operation. If the basic status code is destination + reachable, this status-sub-code doesn't need to be + specified. If the basic status code is destination + unreachable, the status-sub-code can be used to specify + the detailed reasons. This could be a basic + sub-status-code (such as an invalid Continuity Check) or + other error codes specific to the protocol under use for + the Continuity Checks. For example, if ICMP is the + protocol under use, the error codes defined in RFC 4443 + can be used to specify the reasons specific to ICMP. + This technology-specific status-sub-code can be + defined in technology-specific models."; + reference + "RFC 4443: The IETF Administrative Oversight Committee + (IAOC) Member Selection Guidelines and Process."; + } + description + "Status code and status-sub-code for Continuity Check RPC + operation."; + } + uses cl-oam:continuity-check-data; + } + } + + rpc path-discovery { + if-feature "cl-oam:path-discovery"; + description + "Path discovery RPC operation as per RFC 7276."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + input { + uses rpc-input-parameters; + uses cl-oam:session-type { + description + "If session-type is specified, then session-type + must be set to on demand"; + } + leaf max-ttl { + type uint8; + default "255"; + description + "Maximum TTL indicates the maximum number of hops that + a packet is permitted to travel before being discarded + by a router. By default, the maximum TTL is set to + 255."; + } + } + output { + list response-list { + key "response-index"; + description + "Path discovery response list."; + leaf response-index { + type uint32; + mandatory true; + description + "Response index."; + } + leaf protocol-id { + type identityref { + base protocol-id; + } + mandatory true; + description + "Protocol used in path discovery. This could be a + standard protocol (e.g., TCP/IP protocols, MPLS, etc.) + or a proprietary protocol as identified by + this field."; + } + leaf protocol-id-meta-data { + type identityref { + base protocol-id-meta-data; + } + description + "An optional metadata related to the protocol ID. + For example, this could be the Internet Protocol + number for standard Internet Protocols used for + help with protocol processing."; + } + leaf status-code { + type identityref { + base status-code; + } + mandatory true; + description + "Status code for Continuity Check RPC operation. + This could be a basic status code (e.g., destination + is reachable or destination is not reachable) or some + customized status code as identified by this field."; + } + leaf status-sub-code { + type identityref { + base status-sub-code; + } + mandatory true; + description + "An optional status-sub-code for Continuity Check + RPC operation. If the basic status code is destination + reachable, this status-sub-code doesn't need to be + specified. If the basic status code is destination + unreachable, the status-sub-code can be used to specify + the detailed reasons. This could be a basic + sub-status-code (such as an invalid Continuity Check) or + other error codes specific to the protocol under use for + Continuity Checks. For example, if ICMP is the protocol + under use, the error codes defined in RFC 4443 + can be used to specify the reasons specific to ICMP. + This technology-specific status-sub-code can be defined + in technology-specific models."; + reference + "RFC 4443: The IETF Administrative Oversight Committee + (IAOC) Member Selection Guidelines and Process."; + } + } + uses cl-oam:path-discovery-data; + } + } +} diff --git a/models/ietf/RFC/ietf-connectionless-oam-methods@2019-04-16.yang b/models/ietf/RFC/ietf-connectionless-oam-methods@2019-04-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..7964381d3e5c935e60d6143581ea80eb91bdf124 --- /dev/null +++ b/models/ietf/RFC/ietf-connectionless-oam-methods@2019-04-16.yang @@ -0,0 +1,434 @@ +module ietf-connectionless-oam-methods { + namespace + "urn:ietf:params:xml:ns:yang:ietf-connectionless-oam-methods"; + prefix cloam-methods; + + import ietf-interfaces { + prefix if; + } + import ietf-connectionless-oam { + prefix cl-oam; + } + organization + "IETF LIME Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/lime> + WG List: <mailto:lmap@ietf.org> + + Deepak Kumar <dekumar@cisco.com> + Qin Wu <bill.wu@huawei.com> + Srihari Raghavan <rihari@cisco.com> + Michael Wang <wangzitao@huawei.com> + Reshad Rahman <rrahman@cisco.com>"; + description + "This YANG module defines the RPC operations for + connectionless OAM to be used within the IETF + in a protocol-independent manner. It is + assumed that each protocol maps corresponding + abstracts to its native format. Each protocol + may extend the YANG data model defined here to + include protocol-specific extensions. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8533; see + the RFC itself for full legal notices."; + + revision 2019-04-16 { + description + "Initial revision."; + reference + "RFC 8533: Retrieval Methods YANG Data Model for the Management + of Operations, Administration, and Maintenance (OAM) + Protocols That Use Connectionless Communications"; + } + + identity protocol-id { + description + "This is the base identity for a generic protocol + ID. The protocol registry can be found at + https://www.iana.org/protocols."; + } + identity protocol-id-internet { + base protocol-id; + description + "Identity for Internet Protocols."; + } + + identity protocol-id-proprietary { + base protocol-id; + description + "Identity for proprietary protocols (e.g., + IP SLA)."; + } + + identity protocol-id-sfc { + base protocol-id; + description + "Identity for Service Function Chaining."; + } + + identity protocol-id-mpls { + base protocol-id; + description + "The MPLS protocol."; + } + + identity protocol-id-mpls-tp { + base protocol-id; + description + "The MPLS-TP protocol."; + } + + identity protocol-id-twamp { + base protocol-id; + description + "The Two-Way Active Measurement Protocol (TWAMP) + protocol."; + } + + identity protocol-id-bier { + base protocol-id; + description + "The Bit Index Explicit Replication (BIER) + protocol."; + } + + identity status-code { + description + "This is base identity for a status code."; + } + + identity success-reach { + base status-code; + description + "Indicates that the destination being verified + is reachable (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity fail-reach { + base status-code; + description + "Indicates that the destination being verified + is not reachable (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity success-path-verification { + base status-code; + description + "Indicates that the path verification is performed + successfully (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity fail-path-verification { + base status-code; + description + "Indicates that the path verification fails + (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity status-sub-code { + description + "IdentityBase status-sub-code."; + } + + identity invalid-cc { + base status-sub-code; + description + "Indicates that the Continuity Check message is invalid + (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity invalid-pd { + base status-sub-code; + description + "Indicates that the path discovery message is invalid + (see RFC 7276)."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + + identity protocol-id-meta-data { + description + "This is the base identity for metadata that corresponds + to the protocol ID."; + } + + identity protocol-internet-number { + base protocol-id-meta-data; + description + "Internet Protocol number for standard + Internet Protocols (IANA-assigned Internet + Protocol numbers) to help in protocol processing. + The Protocol Numbers registry can be found at + https://www.iana.org/assignments/protocol-numbers."; + } + + grouping rpc-input-parameters { + container destination-tp { + uses cl-oam:tp-address; + description + "Destination test point."; + } + leaf source-interface { + type if:interface-ref; + mandatory true; + description + "Source interface."; + } + leaf outbound-interface { + type if:interface-ref; + mandatory true; + description + "Outbound interface."; + } + leaf vrf { + type cl-oam:routing-instance-ref; + description + "Virtual Routing and Forwarding (VRF) instance."; + } + description + "Grouping for RPC input parameters"; + } + + rpc continuity-check { + if-feature "cl-oam:continuity-check"; + description + "Continuity Check RPC operation as per RFC 7276."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + input { + uses rpc-input-parameters; + uses cl-oam:session-type { + description + "If session-type is specified, then session-type + must be set to on demand"; + } + leaf count { + type uint32 { + range "0..4294967295" { + description + "The overall number of packets to be transmitted + by the sender. The value of the count will be set + to zero (0) on creation and will thereafter + increase monotonically until it reaches a maximum + value of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + } + default "5"; + description + "Specifies the number of + packets that will be sent. By + default, the packet number is + set to 5."; + } + leaf ttl { + type uint8; + default "255"; + description + "Time to live (TTL) used to limit the lifetime + of data packets transmitted in the network + to prevent looping. The TTL value is decremented + for every hop that the packet traverses. If the + TTL is zero, the data packet will be discarded."; + } + leaf packet-size { + type uint32 { + range "64..10000"; + } + default "64"; + description + "Packet size of the Continuity Check message, in octets. + By default, the packet size is set to 64 octets."; + } + } + output { + container response-info { + leaf protocol-id { + type identityref { + base protocol-id; + } + mandatory true; + description + "Protocol used in the Continuity Check message. + This could be a standard protocol (e.g., + TCP/IP protocols, MPLS, etc.) or a proprietary + protocol as identified by this field."; + } + leaf protocol-id-meta-data { + type identityref { + base protocol-id-meta-data; + } + description + "An optional metadata related to the protocol ID. + For example, this could be the Internet Protocol + number for standard Internet Protocols used for + help with protocol processing."; + } + leaf status-code { + type identityref { + base status-code; + } + mandatory true; + description + "Status code for Continuity Check RPC operation. + This could be a basic status code (e.g., destination + is reachable or destination is not reachable; see RFC 7276) + or some customized status code as identified by this + field."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + } + leaf status-sub-code { + type identityref { + base status-sub-code; + } + mandatory true; + description + "An optional status-sub-code for Continuity Check + RPC operation. If the basic status code is destination + reachable, this status-sub-code doesn't need to be + specified. If the basic status code is destination + unreachable, the status-sub-code can be used to specify + the detailed reasons. This could be a basic + sub-status-code (such as an invalid Continuity Check) or + other error codes specific to the protocol under use for + the Continuity Checks. For example, if ICMP is the + protocol under use, the error codes defined in RFC 4443 + can be used to specify the reasons specific to ICMP. + This technology-specific status-sub-code can be + defined in technology-specific models."; + reference + "RFC 4443: The IETF Administrative Oversight Committee + (IAOC) Member Selection Guidelines and Process."; + } + description + "Status code and status-sub-code for Continuity Check RPC + operation."; + } + uses cl-oam:continuity-check-data; + } + } + + rpc path-discovery { + if-feature "cl-oam:path-discovery"; + description + "Path discovery RPC operation as per RFC 7276."; + reference + "RFC 7276: An Overview of Operations, Administration, and + Maintenance (OAM) Tools"; + input { + uses rpc-input-parameters; + uses cl-oam:session-type { + description + "If session-type is specified, then session-type + must be set to on demand"; + } + leaf max-ttl { + type uint8; + default "255"; + description + "Maximum TTL indicates the maximum number of hops that + a packet is permitted to travel before being discarded + by a router. By default, the maximum TTL is set to + 255."; + } + } + output { + list response-list { + key "response-index"; + description + "Path discovery response list."; + leaf response-index { + type uint32; + mandatory true; + description + "Response index."; + } + leaf protocol-id { + type identityref { + base protocol-id; + } + mandatory true; + description + "Protocol used in path discovery. This could be a + standard protocol (e.g., TCP/IP protocols, MPLS, etc.) + or a proprietary protocol as identified by + this field."; + } + leaf protocol-id-meta-data { + type identityref { + base protocol-id-meta-data; + } + description + "An optional metadata related to the protocol ID. + For example, this could be the Internet Protocol + number for standard Internet Protocols used for + help with protocol processing."; + } + leaf status-code { + type identityref { + base status-code; + } + mandatory true; + description + "Status code for Continuity Check RPC operation. + This could be a basic status code (e.g., destination + is reachable or destination is not reachable) or some + customized status code as identified by this field."; + } + leaf status-sub-code { + type identityref { + base status-sub-code; + } + mandatory true; + description + "An optional status-sub-code for Continuity Check + RPC operation. If the basic status code is destination + reachable, this status-sub-code doesn't need to be + specified. If the basic status code is destination + unreachable, the status-sub-code can be used to specify + the detailed reasons. This could be a basic + sub-status-code (such as an invalid Continuity Check) or + other error codes specific to the protocol under use for + Continuity Checks. For example, if ICMP is the protocol + under use, the error codes defined in RFC 4443 + can be used to specify the reasons specific to ICMP. + This technology-specific status-sub-code can be defined + in technology-specific models."; + reference + "RFC 4443: The IETF Administrative Oversight Committee + (IAOC) Member Selection Guidelines and Process."; + } + } + uses cl-oam:path-discovery-data; + } + } +} diff --git a/models/ietf/RFC/ietf-connectionless-oam.yang b/models/ietf/RFC/ietf-connectionless-oam.yang new file mode 100644 index 0000000000000000000000000000000000000000..3197c30e6c14d4b1fef3be1c4dd38d3a5957e86b --- /dev/null +++ b/models/ietf/RFC/ietf-connectionless-oam.yang @@ -0,0 +1,1399 @@ +module ietf-connectionless-oam { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-connectionless-oam"; + prefix cl-oam; + + import ietf-yang-schema-mount { + prefix yangmnt; + } + import ietf-network { + prefix nd; + } + import ietf-yang-types { + prefix yang; + } + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + } + import ietf-network-instance { + prefix ni; + } + import ietf-routing-types { + prefix rt; + } + import ietf-lime-time-types { + prefix lime; + } + + organization + "IETF LIME Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/lime> + WG List: <mailto:lmap@ietf.org> + + Deepak Kumar <dekumar@cisco.com> + Qin Wu <bill.wu@huawei.com> + Srihari Raghavan <srihari@cisco.com> + Michael Wang <wangzitao@huawei.com> + Reshad Rahman <rrahman@cisco.com>"; + description + "This YANG module defines the generic configuration, + data model, and statistics for OAM protocols using + connectionless communications, described in a + protocol independent manner. It is assumed that each + protocol maps corresponding abstracts to its native + format. Each protocol may extend the YANG data model defined + here to include protocol specific extensions. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8532; see + the RFC itself for full legal notices."; + + revision 2019-04-16 { + description + "Base model for Connectionless Operations, Administration, + and Maintenance (OAM)."; + reference + "RFC 8532: Generic YANG Data Model for the Management of + Operations, Administration, and Maintenance (OAM) Protocols + That Use Connectionless Communications"; + } + + feature connectionless { + description + "This feature indicates that the OAM solution is connectionless."; + } + + feature continuity-check { + description + "This feature indicates that the server supports + executing a Continuity Check OAM command and + returning a response. Servers that do not advertise + this feature will not support executing + Continuity Check commands or the RPC operation model for + Continuity Check commands."; + } + + feature path-discovery { + description + "This feature indicates that the server supports + executing a path discovery OAM command and + returning a response. Servers that do not advertise + this feature will not support executing + path discovery commands or the RPC operation model for + path discovery commands."; + } + + feature ptp-long-format { + description + "This feature indicates that the timestamp is PTP long format."; + } + + feature ntp-short-format { + description + "This feature indicates that the timestamp is NTP short format."; + } + + feature icmp-timestamp { + description + "This feature indicates that the timestamp is ICMP timestamp."; + } + + identity traffic-type { + description + "This is the base identity of the traffic type, + which includes IPv4, IPv6, etc."; + } + + identity ipv4 { + base traffic-type; + description + "identity for IPv4 traffic type."; + } + + identity ipv6 { + base traffic-type; + description + "identity for IPv6 traffic type."; + } + + identity address-attribute-types { + description + "This is the base identity of the address attribute types, which + are Generic IPv4/IPv6 Prefix, BGP Labeled IPv4/IPv6 Prefix, + Tunnel ID, PW ID, VPLS VE ID, etc. (See RFC 8029 for details.)"; + } + + typedef address-attribute-type { + type identityref { + base address-attribute-types; + } + description + "Target address attribute type."; + } + + typedef percentage { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + description + "Percentage."; + } + + typedef routing-instance-ref { + type leafref { + path "/ni:network-instances/ni:network-instance/ni:name"; + } + description + "This type is used for leafs that reference a routing instance + configuration."; + } + + grouping cc-session-statistics { + description + "Grouping for session statistics."; + container cc-session-statistics { + description + "CC session counters."; + leaf session-count { + type uint32; + default "0"; + description + "Number of Continuity Check sessions. + A value of zero indicates that no session + count is sent."; + } + leaf session-up-count { + type uint32; + default "0"; + description + "Number of sessions that are up. + A value of zero indicates that no up + session count is sent."; + } + leaf session-down-count { + type uint32; + default "0"; + description + "Number of sessions that are down. + A value of zero indicates that no down + session count is sent."; + } + leaf session-admin-down-count { + type uint32; + default "0"; + description + "Number of sessions that are admin-down. + A value of zero indicates that no admin- + down session count is sent."; + } + } + } + + grouping session-packet-statistics { + description + "Grouping for statistics per session packet."; + container session-packet-statistics { + description + "Statistics per session packet."; + leaf rx-packet-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of received OAM packets. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf tx-packet-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of transmitted OAM packets. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf rx-bad-packet { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total number of received bad OAM packets. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf tx-packet-failed { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total number of OAM packets that failed when sent. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + } + } + + grouping cc-per-session-statistics { + description + "Grouping for per-session statistics."; + container cc-per-session-statistics { + description + "Per-session statistics."; + leaf create-time { + type yang:date-and-time; + description + "Time and date when session is created."; + } + leaf last-down-time { + type yang:date-and-time; + description + "Time and date of the last time session was down."; + } + leaf last-up-time { + type yang:date-and-time; + description + "Time and date of the last time session was up."; + } + leaf down-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of Continuity Check sessions down. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf admin-down-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of Continuity Check sessions admin down. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + uses session-packet-statistics; + } + } + + grouping session-error-statistics { + description + "Grouping for per-session error statistics."; + container session-error-statistics { + description + "Per-session error statistics."; + leaf packet-loss-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of received packet drops. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf loss-ratio { + type percentage; + description + "Loss ratio of the packets. Expressed as percentage + of packets lost with respect to packets sent."; + } + leaf packet-reorder-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of received packets that were reordered. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf packets-out-of-seq-count { + type uint32 { + range "0..4294967295"; + } + description + "Total count of packets received out of sequence. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf packets-dup-count { + type uint32 { + range "0..4294967295"; + } + description + "Total count of received packet duplicates. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + } + } + + grouping session-delay-statistics { + description + "Grouping for delay statistics per session."; + container session-delay-statistics { + description + "Session delay summarized information. By default, a + one-way measurement protocol (e.g., OWAMP) is used + to measure delay. When a two-way measurement protocol + (e.g., TWAMP) is used instead, it can be indicated + using the protocol-id defined in RPC operation of + retrieval methods for connectionless OAM (RFC 8533), + i.e., set protocol-id as OWAMP. Note that only one + measurement protocol for delay is specified for + interoperability reasons."; + leaf time-unit-value { + type identityref { + base lime:time-unit-type; + } + default "lime:milliseconds"; + description + "Time units, where the options are s, ms, ns, etc."; + } + leaf min-delay-value { + type uint32; + description + "Minimum delay value observed."; + } + leaf max-delay-value { + type uint32; + description + "Maximum delay value observed."; + } + leaf average-delay-value { + type uint32; + description + "Average delay value observed."; + } + } + } + + grouping session-jitter-statistics { + description + "Grouping for per session jitter statistics."; + container session-jitter-statistics { + description + "Summarized information about session jitter. By default, + jitter is measured using IP Packet Delay Variation + (IPDV) as defined in RFC 3393. When the other measurement + method is used instead (e.g., Packet Delay Variation used + in ITU-T Recommendation Y.1540, it can be indicated using + protocol-id-meta-data defined in RPC operation of + retrieval methods for connectionless OAM (RFC 8533). + Note that only one measurement method for jitter is + specified for interoperability reasons."; + leaf unit-value { + type identityref { + base lime:time-unit-type; + } + default "lime:milliseconds"; + description + "Time units, where the options are s, ms, ns, etc."; + } + leaf min-jitter-value { + type uint32; + description + "Minimum jitter value observed."; + } + leaf max-jitter-value { + type uint32; + description + "Maximum jitter value observed."; + } + leaf average-jitter-value { + type uint32; + description + "Average jitter value observed."; + } + } + } + + grouping session-path-verification-statistics { + description + "Grouping for path verification statistics per session."; + container session-path-verification-statistics { + description + "OAM path verification statistics per session."; + leaf verified-count { + type uint32 { + range "0..4294967295"; + } + description + "Total number of OAM packets that + went through a path as intended. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf failed-count { + type uint32 { + range "0..4294967295"; + } + description + "Total number of OAM packets that + went through an unintended path. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + } + } + + grouping session-type { + description + "This object indicates which kind of activation will + be used by the current session."; + leaf session-type { + type enumeration { + enum proactive { + description + "The current session is a proactive session."; + } + enum on-demand { + description + "The current session is an on-demand session."; + } + } + default "on-demand"; + description + "Indicate which kind of activation will be used + by the current session."; + } + } + + identity tp-address-technology-type { + description + "Test point address type."; + } + + identity mac-address-type { + base tp-address-technology-type; + description + "MAC address type."; + } + + identity ipv4-address-type { + base tp-address-technology-type; + description + "IPv4 address type."; + } + + identity ipv6-address-type { + base tp-address-technology-type; + description + "IPv6 address type."; + } + + identity tp-attribute-type { + base tp-address-technology-type; + description + "Test point attribute type."; + } + + identity router-id-address-type { + base tp-address-technology-type; + description + "System ID address type."; + } + + identity as-number-address-type { + base tp-address-technology-type; + description + "AS number address type."; + } + + identity route-distinguisher-address-type { + base tp-address-technology-type; + description + "Route Distinguisher address type."; + } + + grouping tp-address { + leaf tp-location-type { + type identityref { + base tp-address-technology-type; + } + mandatory true; + description + "Test point address type."; + } + container mac-address { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:mac-address-type')" { + description + "MAC address type."; + } + leaf mac-address { + type yang:mac-address; + mandatory true; + description + "MAC address."; + } + description + "MAC address based TP addressing."; + } + container ipv4-address { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:ipv4-address-type')" { + description + "IPv4 address type."; + } + leaf ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "IPv4 address."; + } + description + "IP address based TP addressing."; + } + container ipv6-address { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:ipv6-address-type')" { + description + "IPv6 address type."; + } + leaf ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "IPv6 address."; + } + description + "IPv6 address based TP addressing."; + } + container tp-attribute { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:tp-attribute-type')" { + description + "Test point attribute type."; + } + leaf tp-attribute-type { + type address-attribute-type; + description + "Test point type."; + } + choice tp-attribute-value { + description + "Test point value."; + case ip-prefix { + leaf ip-prefix { + type inet:ip-prefix; + description + "Generic IPv4/IPv6 prefix. See Sections 3.2.13 and + 3.2.14 of RFC 8029."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + case bgp { + leaf bgp { + type inet:ip-prefix; + description + "BGP Labeled IPv4/IPv6 Prefix. See Sections + 3.2.11 and 3.2.12 of RFC 8029 for details."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + case tunnel { + leaf tunnel-interface { + type uint32; + description + "Basic IPv4/IPv6 Tunnel ID. See Sections 3.2.3 + and 3.2.4 of RFC 8029 for details."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures."; + } + } + case pw { + leaf remote-pe-address { + type inet:ip-address; + description + "Remote PE address. See Section 3.2.8 + of RFC 8029 for details."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + leaf pw-id { + type uint32; + description + "Pseudowire ID is a non-zero 32-bit ID. See Sections + 3.2.8 and 3.2.9 of RFC 8029 for details."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + case vpls { + leaf route-distinguisher { + type rt:route-distinguisher; + description + "Route Distinguisher is an 8-octet identifier + used to distinguish information about various + L2VPNs advertised by a node."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + leaf sender-ve-id { + type uint16; + description + "Sender's VE ID. The VE ID (VPLS Edge Identifier) + is a 2-octet identifier."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + leaf receiver-ve-id { + type uint16; + description + "Receiver's VE ID. The VE ID (VPLS Edge Identifier) + is a 2-octet identifier."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + case mpls-mldp { + choice root-address { + description + "Root address choice."; + case ip-address { + leaf source-address { + type inet:ip-address; + description + "IP address."; + } + leaf group-ip-address { + type inet:ip-address; + description + "Group IP address."; + } + } + case vpn { + leaf as-number { + type inet:as-number; + description + "The AS number that identifies an Autonomous + System."; + } + } + case global-id { + leaf lsp-id { + type string; + description + "LSP ID is an identifier of a LSP + within a MPLS network."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + } + } + } + description + "Test Point Attribute Container."; + } + container system-info { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:router-id-address-type')" { + description + "System ID address type."; + } + leaf router-id { + type rt:router-id; + description + "Router ID assigned to this node."; + } + description + "Router ID container."; + } + description + "TP Address."; + } + + grouping tp-address-ni { + description + "Test point address with VRF."; + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe virtual resource partitioning + that may be present on a network device. An example of a + common industry term for virtual resource partitioning is + 'VRF instance'."; + } + uses tp-address; + } + + grouping connectionless-oam-tps { + list oam-neighboring-tps { + key "index"; + leaf index { + type uint16 { + range "0..65535"; + } + description + "Index of a list of neighboring test points + in layers up and down the stack for + the same interface that are related to the + current test point."; + } + leaf position { + type int8 { + range "-1..1"; + } + default "0"; + description + "The position of the neighboring test point relative to + the current test point. Level 0 indicates a test point + corresponding to a specific index in the same layer as + the current test point. -1 means there is a test point + corresponding to a specific index in the test point down + the stack, and +1 means there is a test point corresponding + to a specific index in the test point up the stack."; + } + choice tp-location { + case mac-address { + leaf mac-address-location { + type yang:mac-address; + description + "MAC address."; + } + description + "MAC address based TP addressing."; + } + case ipv4-address { + leaf ipv4-address-location { + type inet:ipv4-address; + description + "IPv4 address."; + } + description + "IP address based TP addressing."; + } + case ipv6-address { + leaf ipv6-address-location { + type inet:ipv6-address; + description + "IPv6 address."; + } + description + "IPv6 address based TP addressing."; + } + case as-number { + leaf as-number-location { + type inet:as-number; + description + "AS number location."; + } + description + "AS number for point-to-multipoint OAM."; + } + case router-id { + leaf router-id-location { + type rt:router-id; + description + "System ID location."; + } + description + "System ID."; + } + description + "TP location."; + } + description + "List of neighboring test points in the same layer that are + related to current test point. If the neighboring test point + is placed after the current test point, the position is + specified as +1. If the neighboring test point is placed + before the current test point, the position is specified + as -1; if no neighboring test points are placed before or + after the current test point in the same layer, the + position is specified as 0."; + } + description + "List of neighboring test points related to connectionless OAM."; + } + + grouping tp-technology { + choice technology { + default "technology-null"; + case technology-null { + description + "This is a placeholder when no technology is needed."; + leaf tech-null { + type empty; + description + "There is no technology to be defined."; + } + } + description + "Technology choice."; + } + description + "OAM technology."; + } + + grouping tp-tools { + description + "Test point OAM toolset."; + container tp-tools { + leaf continuity-check { + type boolean; + mandatory true; + description + "A flag indicating whether or not the + Continuity Check function is supported."; + reference + "RFC 792: INTERNET CONTROL MESSAGE PROTOCOL + RFC 4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification + RFC 5880: Bidirectional Forwarding Detection + RFC 5881: BFD for IPv4 and IPv6 + RFC 5883: BFD for Multihop Paths + RFC 5884: BFD for MPLS Label Switched Paths + RFC 5885: BFD for PW VCCV + RFC 6450: Multicast Ping Protocol + RFC 8029: Detecting Multiprotocol Label Switched (MPLS) + Data-Plane Failures"; + } + leaf path-discovery { + type boolean; + mandatory true; + description + "A flag indicating whether or not the + path discovery function is supported."; + reference + "RFC 792: INTERNET CONTROL MESSAGE PROTOCOL + RFC 4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification + RFC 4884: Extended ICMP to Support Multi-Part Messages + RFC 5837: Extending ICMP for Interface and Next-Hop + Identification + RFC 8029: Detecting Multiprotocol Label Switched (MPLS) + Data-Plane Failures"; + } + description + "Container for test point OAM toolset."; + } + } + + grouping test-point-location-info { + uses tp-technology; + uses tp-tools; + anydata root { + yangmnt:mount-point "root"; + description + "Root for models supported per test point."; + } + uses connectionless-oam-tps; + description + "Test point location."; + } + + grouping test-point-locations { + description + "Group of test point locations."; + leaf tp-location-type { + type identityref { + base tp-address-technology-type; + } + description + "Test point location type."; + } + container ipv4-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:ipv4-address-type')" { + description + "When test point location type is equal to IPv4 address."; + } + container test-point-ipv4-location-list { + list test-point-locations { + key "ipv4-location ni"; + leaf ipv4-location { + type inet:ipv4-address; + description + "IPv4 address."; + } + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe the + corresponding network instance"; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container + for test point location list."; + } + description + "Container for IPv4 location types."; + } + container ipv6-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:ipv6-address-type')" { + description + "When test point location is equal to IPv6 address."; + } + container test-point-ipv6-location-list { + list test-point-locations { + key "ipv6-location ni"; + leaf ipv6-location { + type inet:ipv6-address; + description + "IPv6 address."; + } + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe the + corresponding network instance."; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container + for test point location list."; + } + description + "ipv6 location type container."; + } + container mac-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:mac-address-type')" { + description + "When test point location type is equal to MAC address."; + } + container test-point-mac-address-location-list { + list test-point-locations { + key "mac-address-location"; + leaf mac-address-location { + type yang:mac-address; + description + "MAC address."; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container + for test point location list."; + } + description + "Container for MAC address location types."; + } + container group-as-number-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:as-number-address-type')" { + description + "When test point location type is equal to AS number."; + } + container test-point-as-number-location-list { + list test-point-locations { + key "as-number-location"; + leaf as-number-location { + type inet:as-number; + description + "AS number for point-to-multipoint OAM."; + } + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe the + corresponding network instance."; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container + for test point location list."; + } + description + "Container for AS number location types."; + } + container group-router-id-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:router-id-address-type')" { + description + "When test point location type is equal to system-info."; + } + container test-point-system-info-location-list { + list test-point-locations { + key "router-id-location"; + leaf router-id-location { + type rt:router-id; + description + "System ID."; + } + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe the + corresponding network instance."; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container for + test point location list."; + } + description + "Container for system ID location types."; + } + } + + augment "/nd:networks/nd:network/nd:node" { + description + "Augments the /networks/network/node path defined in the + ietf-network module (RFC 8345) with test-point-locations + grouping."; + uses test-point-locations; + } + + grouping timestamp { + description + "Grouping for timestamp."; + leaf timestamp-type { + type identityref { + base lime:timestamp-type; + } + description + "Type of timestamp, such as Truncated PTP or NTP."; + } + container timestamp-64bit { + when "derived-from-or-self(../timestamp-type," + + "'lime:truncated-ptp')" + + "or derived-from-or-self(../timestamp-type," + + "'lime:ntp64')" { + description + "Only applies when PTP truncated or 64-bit NTP timestamp."; + } + leaf timestamp-sec { + type uint32; + description + "Absolute timestamp in seconds as per IEEE 1588v2 + or seconds part in 64-bit NTP timestamp."; + } + leaf timestamp-nanosec { + type uint32; + description + "Fractional part in nanoseconds as per IEEE 1588v2 + or fractional part in 64-bit NTP timestamp."; + } + description + "Container for 64-bit timestamp. The Network Time Protocol + (NTP) 64-bit timestamp format is defined in RFC 5905. The + PTP truncated timestamp format is defined in IEEE 1588v1."; + reference + "RFC 5905: Network Time Protocol Version 4: Protocol and + Algorithms Specification + IEEE 1588v1: IEEE Standard for a Precision Clock + Synchronization Protocol for Networked Measurement and + Control Systems Version 1"; + } + container timestamp-80bit { + when "derived-from-or-self(../timestamp-type, 'lime:ptp80')" { + description + "Only applies when 80-bit PTP timestamp."; + } + if-feature "ptp-long-format"; + leaf timestamp-sec { + type uint64 { + range "0..281474976710655"; + } + description + "48-bit timestamp in seconds as per IEEE 1588v2."; + } + leaf timestamp-nanosec { + type uint32; + description + "Fractional part in nanoseconds as per IEEE 1588v2."; + } + description + "Container for 80-bit timestamp."; + } + container ntp-timestamp-32bit { + when "derived-from-or-self(../timestamp-type," + + "'lime:truncated-ntp')" { + description + "Only applies when 32-bit NTP short-format timestamp."; + } + if-feature "ntp-short-format"; + leaf timestamp-sec { + type uint16; + description + "Timestamp in seconds as per short-format NTP."; + } + leaf timestamp-nanosec { + type uint16; + description + "Truncated fractional part in 16-bit NTP timestamp."; + } + description + "Container for 32-bit timestamp RFC5905."; + reference + "RFC 5905: Network Time Protocol Version 4: Protocol and + Algorithms Specification."; + } + container icmp-timestamp-32bit { + when "derived-from-or-self(../timestamp-type, 'lime:icmp')" { + description + "Only applies when ICMP timestamp."; + } + if-feature "icmp-timestamp"; + leaf timestamp-millisec { + type uint32; + description + "Timestamp in milliseconds for ICMP timestamp."; + } + description + "Container for 32-bit timestamp. See RFC 792 for ICMP + timestamp format."; + } + } + grouping path-discovery-data { + description + "Data output from nodes related to path discovery."; + container src-test-point { + description + "Source test point."; + uses tp-address-ni; + } + container dest-test-point { + description + "Destination test point."; + uses tp-address-ni; + } + leaf sequence-number { + type uint64; + default "0"; + description + "Sequence number in data packets. A value of + zero indicates that no sequence number is sent."; + } + leaf hop-cnt { + type uint8; + default "0"; + description + "Hop count. A value of zero indicates + that no hop count is sent."; + } + uses session-packet-statistics; + uses session-error-statistics; + uses session-delay-statistics; + uses session-jitter-statistics; + container path-verification { + description + "Optional information related to path verification."; + leaf flow-info { + type string; + description + "Information that refers to the flow."; + } + uses session-path-verification-statistics; + } + container path-trace-info { + description + "Optional per-hop path trace information about test points. + The path trace information list typically has a single + element for per-hop cases such as path-discovery RPC operation + but allows a list of hop-related information for other types of + data retrieval methods."; + list path-trace-info-list { + key "index"; + description + "Path trace information list."; + leaf index { + type uint32; + description + "Trace information index."; + } + uses tp-address-ni; + uses timestamp; + leaf ingress-intf-name { + type if:interface-ref; + description + "Ingress interface name."; + } + leaf egress-intf-name { + type if:interface-ref; + description + "Egress interface name."; + } + leaf queue-depth { + type uint32; + description + "Length of the queue of the interface from where + the packet is forwarded out. The queue depth could + be the current number of memory buffers used by the + queue, and a packet can consume one or more memory buffers, + thus constituting device-level information."; + } + leaf transit-delay { + type uint32; + description + "Time in nanoseconds that the packet spent transiting a + node."; + } + leaf app-meta-data { + type uint64; + description + "Application-specific data added by node."; + } + } + } + } + + grouping continuity-check-data { + description + "Continuity Check data output from nodes."; + container src-test-point { + description + "Source test point."; + uses tp-address-ni; + leaf egress-intf-name { + type if:interface-ref; + description + "Egress interface name."; + } + } + container dest-test-point { + description + "Destination test point."; + uses tp-address-ni; + leaf ingress-intf-name { + type if:interface-ref; + description + "Ingress interface name."; + } + } + leaf sequence-number { + type uint64; + default "0"; + description + "Sequence number in data packets. A value of + zero indicates that no sequence number is sent."; + } + leaf hop-cnt { + type uint8; + default "0"; + description + "Hop count. A value of zero indicates + that no hop count is sent."; + } + uses session-packet-statistics; + uses session-error-statistics; + uses session-delay-statistics; + uses session-jitter-statistics; + } + + container cc-session-statistics-data { + if-feature "continuity-check"; + config false; + list cc-session-statistics { + key "type"; + leaf type { + type identityref { + base traffic-type; + } + description + "Type of traffic."; + } + container cc-ipv4-sessions-statistics { + when "../type = 'ipv4'" { + description + "Only applies when traffic type is IPv4."; + } + description + "CC ipv4 sessions."; + uses cc-session-statistics; + } + container cc-ipv6-sessions-statistics { + when "../type = 'ipv6'" { + description + "Only applies when traffic type is IPv6."; + } + description + "CC IPv6 sessions."; + uses cc-session-statistics; + } + description + "List of CC session statistics data."; + } + description + "CC operational information."; + } +} diff --git a/models/ietf/RFC/ietf-connectionless-oam@2019-04-16.yang b/models/ietf/RFC/ietf-connectionless-oam@2019-04-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..3197c30e6c14d4b1fef3be1c4dd38d3a5957e86b --- /dev/null +++ b/models/ietf/RFC/ietf-connectionless-oam@2019-04-16.yang @@ -0,0 +1,1399 @@ +module ietf-connectionless-oam { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-connectionless-oam"; + prefix cl-oam; + + import ietf-yang-schema-mount { + prefix yangmnt; + } + import ietf-network { + prefix nd; + } + import ietf-yang-types { + prefix yang; + } + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + } + import ietf-network-instance { + prefix ni; + } + import ietf-routing-types { + prefix rt; + } + import ietf-lime-time-types { + prefix lime; + } + + organization + "IETF LIME Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/lime> + WG List: <mailto:lmap@ietf.org> + + Deepak Kumar <dekumar@cisco.com> + Qin Wu <bill.wu@huawei.com> + Srihari Raghavan <srihari@cisco.com> + Michael Wang <wangzitao@huawei.com> + Reshad Rahman <rrahman@cisco.com>"; + description + "This YANG module defines the generic configuration, + data model, and statistics for OAM protocols using + connectionless communications, described in a + protocol independent manner. It is assumed that each + protocol maps corresponding abstracts to its native + format. Each protocol may extend the YANG data model defined + here to include protocol specific extensions. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8532; see + the RFC itself for full legal notices."; + + revision 2019-04-16 { + description + "Base model for Connectionless Operations, Administration, + and Maintenance (OAM)."; + reference + "RFC 8532: Generic YANG Data Model for the Management of + Operations, Administration, and Maintenance (OAM) Protocols + That Use Connectionless Communications"; + } + + feature connectionless { + description + "This feature indicates that the OAM solution is connectionless."; + } + + feature continuity-check { + description + "This feature indicates that the server supports + executing a Continuity Check OAM command and + returning a response. Servers that do not advertise + this feature will not support executing + Continuity Check commands or the RPC operation model for + Continuity Check commands."; + } + + feature path-discovery { + description + "This feature indicates that the server supports + executing a path discovery OAM command and + returning a response. Servers that do not advertise + this feature will not support executing + path discovery commands or the RPC operation model for + path discovery commands."; + } + + feature ptp-long-format { + description + "This feature indicates that the timestamp is PTP long format."; + } + + feature ntp-short-format { + description + "This feature indicates that the timestamp is NTP short format."; + } + + feature icmp-timestamp { + description + "This feature indicates that the timestamp is ICMP timestamp."; + } + + identity traffic-type { + description + "This is the base identity of the traffic type, + which includes IPv4, IPv6, etc."; + } + + identity ipv4 { + base traffic-type; + description + "identity for IPv4 traffic type."; + } + + identity ipv6 { + base traffic-type; + description + "identity for IPv6 traffic type."; + } + + identity address-attribute-types { + description + "This is the base identity of the address attribute types, which + are Generic IPv4/IPv6 Prefix, BGP Labeled IPv4/IPv6 Prefix, + Tunnel ID, PW ID, VPLS VE ID, etc. (See RFC 8029 for details.)"; + } + + typedef address-attribute-type { + type identityref { + base address-attribute-types; + } + description + "Target address attribute type."; + } + + typedef percentage { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + description + "Percentage."; + } + + typedef routing-instance-ref { + type leafref { + path "/ni:network-instances/ni:network-instance/ni:name"; + } + description + "This type is used for leafs that reference a routing instance + configuration."; + } + + grouping cc-session-statistics { + description + "Grouping for session statistics."; + container cc-session-statistics { + description + "CC session counters."; + leaf session-count { + type uint32; + default "0"; + description + "Number of Continuity Check sessions. + A value of zero indicates that no session + count is sent."; + } + leaf session-up-count { + type uint32; + default "0"; + description + "Number of sessions that are up. + A value of zero indicates that no up + session count is sent."; + } + leaf session-down-count { + type uint32; + default "0"; + description + "Number of sessions that are down. + A value of zero indicates that no down + session count is sent."; + } + leaf session-admin-down-count { + type uint32; + default "0"; + description + "Number of sessions that are admin-down. + A value of zero indicates that no admin- + down session count is sent."; + } + } + } + + grouping session-packet-statistics { + description + "Grouping for statistics per session packet."; + container session-packet-statistics { + description + "Statistics per session packet."; + leaf rx-packet-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of received OAM packets. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf tx-packet-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of transmitted OAM packets. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf rx-bad-packet { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total number of received bad OAM packets. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf tx-packet-failed { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total number of OAM packets that failed when sent. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + } + } + + grouping cc-per-session-statistics { + description + "Grouping for per-session statistics."; + container cc-per-session-statistics { + description + "Per-session statistics."; + leaf create-time { + type yang:date-and-time; + description + "Time and date when session is created."; + } + leaf last-down-time { + type yang:date-and-time; + description + "Time and date of the last time session was down."; + } + leaf last-up-time { + type yang:date-and-time; + description + "Time and date of the last time session was up."; + } + leaf down-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of Continuity Check sessions down. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf admin-down-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of Continuity Check sessions admin down. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + uses session-packet-statistics; + } + } + + grouping session-error-statistics { + description + "Grouping for per-session error statistics."; + container session-error-statistics { + description + "Per-session error statistics."; + leaf packet-loss-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of received packet drops. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf loss-ratio { + type percentage; + description + "Loss ratio of the packets. Expressed as percentage + of packets lost with respect to packets sent."; + } + leaf packet-reorder-count { + type uint32 { + range "0..4294967295"; + } + default "0"; + description + "Total count of received packets that were reordered. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf packets-out-of-seq-count { + type uint32 { + range "0..4294967295"; + } + description + "Total count of packets received out of sequence. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf packets-dup-count { + type uint32 { + range "0..4294967295"; + } + description + "Total count of received packet duplicates. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + } + } + + grouping session-delay-statistics { + description + "Grouping for delay statistics per session."; + container session-delay-statistics { + description + "Session delay summarized information. By default, a + one-way measurement protocol (e.g., OWAMP) is used + to measure delay. When a two-way measurement protocol + (e.g., TWAMP) is used instead, it can be indicated + using the protocol-id defined in RPC operation of + retrieval methods for connectionless OAM (RFC 8533), + i.e., set protocol-id as OWAMP. Note that only one + measurement protocol for delay is specified for + interoperability reasons."; + leaf time-unit-value { + type identityref { + base lime:time-unit-type; + } + default "lime:milliseconds"; + description + "Time units, where the options are s, ms, ns, etc."; + } + leaf min-delay-value { + type uint32; + description + "Minimum delay value observed."; + } + leaf max-delay-value { + type uint32; + description + "Maximum delay value observed."; + } + leaf average-delay-value { + type uint32; + description + "Average delay value observed."; + } + } + } + + grouping session-jitter-statistics { + description + "Grouping for per session jitter statistics."; + container session-jitter-statistics { + description + "Summarized information about session jitter. By default, + jitter is measured using IP Packet Delay Variation + (IPDV) as defined in RFC 3393. When the other measurement + method is used instead (e.g., Packet Delay Variation used + in ITU-T Recommendation Y.1540, it can be indicated using + protocol-id-meta-data defined in RPC operation of + retrieval methods for connectionless OAM (RFC 8533). + Note that only one measurement method for jitter is + specified for interoperability reasons."; + leaf unit-value { + type identityref { + base lime:time-unit-type; + } + default "lime:milliseconds"; + description + "Time units, where the options are s, ms, ns, etc."; + } + leaf min-jitter-value { + type uint32; + description + "Minimum jitter value observed."; + } + leaf max-jitter-value { + type uint32; + description + "Maximum jitter value observed."; + } + leaf average-jitter-value { + type uint32; + description + "Average jitter value observed."; + } + } + } + + grouping session-path-verification-statistics { + description + "Grouping for path verification statistics per session."; + container session-path-verification-statistics { + description + "OAM path verification statistics per session."; + leaf verified-count { + type uint32 { + range "0..4294967295"; + } + description + "Total number of OAM packets that + went through a path as intended. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + leaf failed-count { + type uint32 { + range "0..4294967295"; + } + description + "Total number of OAM packets that + went through an unintended path. + The value of count will be set to zero (0) + on creation and will thereafter increase + monotonically until it reaches a maximum value + of 2^32-1 (4294967295 decimal), when it wraps + around and starts increasing again from zero."; + } + } + } + + grouping session-type { + description + "This object indicates which kind of activation will + be used by the current session."; + leaf session-type { + type enumeration { + enum proactive { + description + "The current session is a proactive session."; + } + enum on-demand { + description + "The current session is an on-demand session."; + } + } + default "on-demand"; + description + "Indicate which kind of activation will be used + by the current session."; + } + } + + identity tp-address-technology-type { + description + "Test point address type."; + } + + identity mac-address-type { + base tp-address-technology-type; + description + "MAC address type."; + } + + identity ipv4-address-type { + base tp-address-technology-type; + description + "IPv4 address type."; + } + + identity ipv6-address-type { + base tp-address-technology-type; + description + "IPv6 address type."; + } + + identity tp-attribute-type { + base tp-address-technology-type; + description + "Test point attribute type."; + } + + identity router-id-address-type { + base tp-address-technology-type; + description + "System ID address type."; + } + + identity as-number-address-type { + base tp-address-technology-type; + description + "AS number address type."; + } + + identity route-distinguisher-address-type { + base tp-address-technology-type; + description + "Route Distinguisher address type."; + } + + grouping tp-address { + leaf tp-location-type { + type identityref { + base tp-address-technology-type; + } + mandatory true; + description + "Test point address type."; + } + container mac-address { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:mac-address-type')" { + description + "MAC address type."; + } + leaf mac-address { + type yang:mac-address; + mandatory true; + description + "MAC address."; + } + description + "MAC address based TP addressing."; + } + container ipv4-address { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:ipv4-address-type')" { + description + "IPv4 address type."; + } + leaf ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "IPv4 address."; + } + description + "IP address based TP addressing."; + } + container ipv6-address { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:ipv6-address-type')" { + description + "IPv6 address type."; + } + leaf ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "IPv6 address."; + } + description + "IPv6 address based TP addressing."; + } + container tp-attribute { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:tp-attribute-type')" { + description + "Test point attribute type."; + } + leaf tp-attribute-type { + type address-attribute-type; + description + "Test point type."; + } + choice tp-attribute-value { + description + "Test point value."; + case ip-prefix { + leaf ip-prefix { + type inet:ip-prefix; + description + "Generic IPv4/IPv6 prefix. See Sections 3.2.13 and + 3.2.14 of RFC 8029."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + case bgp { + leaf bgp { + type inet:ip-prefix; + description + "BGP Labeled IPv4/IPv6 Prefix. See Sections + 3.2.11 and 3.2.12 of RFC 8029 for details."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + case tunnel { + leaf tunnel-interface { + type uint32; + description + "Basic IPv4/IPv6 Tunnel ID. See Sections 3.2.3 + and 3.2.4 of RFC 8029 for details."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures."; + } + } + case pw { + leaf remote-pe-address { + type inet:ip-address; + description + "Remote PE address. See Section 3.2.8 + of RFC 8029 for details."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + leaf pw-id { + type uint32; + description + "Pseudowire ID is a non-zero 32-bit ID. See Sections + 3.2.8 and 3.2.9 of RFC 8029 for details."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + case vpls { + leaf route-distinguisher { + type rt:route-distinguisher; + description + "Route Distinguisher is an 8-octet identifier + used to distinguish information about various + L2VPNs advertised by a node."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + leaf sender-ve-id { + type uint16; + description + "Sender's VE ID. The VE ID (VPLS Edge Identifier) + is a 2-octet identifier."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + leaf receiver-ve-id { + type uint16; + description + "Receiver's VE ID. The VE ID (VPLS Edge Identifier) + is a 2-octet identifier."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + case mpls-mldp { + choice root-address { + description + "Root address choice."; + case ip-address { + leaf source-address { + type inet:ip-address; + description + "IP address."; + } + leaf group-ip-address { + type inet:ip-address; + description + "Group IP address."; + } + } + case vpn { + leaf as-number { + type inet:as-number; + description + "The AS number that identifies an Autonomous + System."; + } + } + case global-id { + leaf lsp-id { + type string; + description + "LSP ID is an identifier of a LSP + within a MPLS network."; + reference + "RFC 8029: Detecting Multiprotocol Label + Switched (MPLS) Data-Plane Failures"; + } + } + } + } + } + description + "Test Point Attribute Container."; + } + container system-info { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:router-id-address-type')" { + description + "System ID address type."; + } + leaf router-id { + type rt:router-id; + description + "Router ID assigned to this node."; + } + description + "Router ID container."; + } + description + "TP Address."; + } + + grouping tp-address-ni { + description + "Test point address with VRF."; + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe virtual resource partitioning + that may be present on a network device. An example of a + common industry term for virtual resource partitioning is + 'VRF instance'."; + } + uses tp-address; + } + + grouping connectionless-oam-tps { + list oam-neighboring-tps { + key "index"; + leaf index { + type uint16 { + range "0..65535"; + } + description + "Index of a list of neighboring test points + in layers up and down the stack for + the same interface that are related to the + current test point."; + } + leaf position { + type int8 { + range "-1..1"; + } + default "0"; + description + "The position of the neighboring test point relative to + the current test point. Level 0 indicates a test point + corresponding to a specific index in the same layer as + the current test point. -1 means there is a test point + corresponding to a specific index in the test point down + the stack, and +1 means there is a test point corresponding + to a specific index in the test point up the stack."; + } + choice tp-location { + case mac-address { + leaf mac-address-location { + type yang:mac-address; + description + "MAC address."; + } + description + "MAC address based TP addressing."; + } + case ipv4-address { + leaf ipv4-address-location { + type inet:ipv4-address; + description + "IPv4 address."; + } + description + "IP address based TP addressing."; + } + case ipv6-address { + leaf ipv6-address-location { + type inet:ipv6-address; + description + "IPv6 address."; + } + description + "IPv6 address based TP addressing."; + } + case as-number { + leaf as-number-location { + type inet:as-number; + description + "AS number location."; + } + description + "AS number for point-to-multipoint OAM."; + } + case router-id { + leaf router-id-location { + type rt:router-id; + description + "System ID location."; + } + description + "System ID."; + } + description + "TP location."; + } + description + "List of neighboring test points in the same layer that are + related to current test point. If the neighboring test point + is placed after the current test point, the position is + specified as +1. If the neighboring test point is placed + before the current test point, the position is specified + as -1; if no neighboring test points are placed before or + after the current test point in the same layer, the + position is specified as 0."; + } + description + "List of neighboring test points related to connectionless OAM."; + } + + grouping tp-technology { + choice technology { + default "technology-null"; + case technology-null { + description + "This is a placeholder when no technology is needed."; + leaf tech-null { + type empty; + description + "There is no technology to be defined."; + } + } + description + "Technology choice."; + } + description + "OAM technology."; + } + + grouping tp-tools { + description + "Test point OAM toolset."; + container tp-tools { + leaf continuity-check { + type boolean; + mandatory true; + description + "A flag indicating whether or not the + Continuity Check function is supported."; + reference + "RFC 792: INTERNET CONTROL MESSAGE PROTOCOL + RFC 4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification + RFC 5880: Bidirectional Forwarding Detection + RFC 5881: BFD for IPv4 and IPv6 + RFC 5883: BFD for Multihop Paths + RFC 5884: BFD for MPLS Label Switched Paths + RFC 5885: BFD for PW VCCV + RFC 6450: Multicast Ping Protocol + RFC 8029: Detecting Multiprotocol Label Switched (MPLS) + Data-Plane Failures"; + } + leaf path-discovery { + type boolean; + mandatory true; + description + "A flag indicating whether or not the + path discovery function is supported."; + reference + "RFC 792: INTERNET CONTROL MESSAGE PROTOCOL + RFC 4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification + RFC 4884: Extended ICMP to Support Multi-Part Messages + RFC 5837: Extending ICMP for Interface and Next-Hop + Identification + RFC 8029: Detecting Multiprotocol Label Switched (MPLS) + Data-Plane Failures"; + } + description + "Container for test point OAM toolset."; + } + } + + grouping test-point-location-info { + uses tp-technology; + uses tp-tools; + anydata root { + yangmnt:mount-point "root"; + description + "Root for models supported per test point."; + } + uses connectionless-oam-tps; + description + "Test point location."; + } + + grouping test-point-locations { + description + "Group of test point locations."; + leaf tp-location-type { + type identityref { + base tp-address-technology-type; + } + description + "Test point location type."; + } + container ipv4-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:ipv4-address-type')" { + description + "When test point location type is equal to IPv4 address."; + } + container test-point-ipv4-location-list { + list test-point-locations { + key "ipv4-location ni"; + leaf ipv4-location { + type inet:ipv4-address; + description + "IPv4 address."; + } + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe the + corresponding network instance"; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container + for test point location list."; + } + description + "Container for IPv4 location types."; + } + container ipv6-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:ipv6-address-type')" { + description + "When test point location is equal to IPv6 address."; + } + container test-point-ipv6-location-list { + list test-point-locations { + key "ipv6-location ni"; + leaf ipv6-location { + type inet:ipv6-address; + description + "IPv6 address."; + } + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe the + corresponding network instance."; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container + for test point location list."; + } + description + "ipv6 location type container."; + } + container mac-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:mac-address-type')" { + description + "When test point location type is equal to MAC address."; + } + container test-point-mac-address-location-list { + list test-point-locations { + key "mac-address-location"; + leaf mac-address-location { + type yang:mac-address; + description + "MAC address."; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container + for test point location list."; + } + description + "Container for MAC address location types."; + } + container group-as-number-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:as-number-address-type')" { + description + "When test point location type is equal to AS number."; + } + container test-point-as-number-location-list { + list test-point-locations { + key "as-number-location"; + leaf as-number-location { + type inet:as-number; + description + "AS number for point-to-multipoint OAM."; + } + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe the + corresponding network instance."; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container + for test point location list."; + } + description + "Container for AS number location types."; + } + container group-router-id-location-type { + when "derived-from-or-self(../tp-location-type," + + "'cl-oam:router-id-address-type')" { + description + "When test point location type is equal to system-info."; + } + container test-point-system-info-location-list { + list test-point-locations { + key "router-id-location"; + leaf router-id-location { + type rt:router-id; + description + "System ID."; + } + leaf ni { + type routing-instance-ref; + description + "The ni is used to describe the + corresponding network instance."; + } + uses test-point-location-info; + description + "List of test point locations."; + } + description + "Serves as top-level container for + test point location list."; + } + description + "Container for system ID location types."; + } + } + + augment "/nd:networks/nd:network/nd:node" { + description + "Augments the /networks/network/node path defined in the + ietf-network module (RFC 8345) with test-point-locations + grouping."; + uses test-point-locations; + } + + grouping timestamp { + description + "Grouping for timestamp."; + leaf timestamp-type { + type identityref { + base lime:timestamp-type; + } + description + "Type of timestamp, such as Truncated PTP or NTP."; + } + container timestamp-64bit { + when "derived-from-or-self(../timestamp-type," + + "'lime:truncated-ptp')" + + "or derived-from-or-self(../timestamp-type," + + "'lime:ntp64')" { + description + "Only applies when PTP truncated or 64-bit NTP timestamp."; + } + leaf timestamp-sec { + type uint32; + description + "Absolute timestamp in seconds as per IEEE 1588v2 + or seconds part in 64-bit NTP timestamp."; + } + leaf timestamp-nanosec { + type uint32; + description + "Fractional part in nanoseconds as per IEEE 1588v2 + or fractional part in 64-bit NTP timestamp."; + } + description + "Container for 64-bit timestamp. The Network Time Protocol + (NTP) 64-bit timestamp format is defined in RFC 5905. The + PTP truncated timestamp format is defined in IEEE 1588v1."; + reference + "RFC 5905: Network Time Protocol Version 4: Protocol and + Algorithms Specification + IEEE 1588v1: IEEE Standard for a Precision Clock + Synchronization Protocol for Networked Measurement and + Control Systems Version 1"; + } + container timestamp-80bit { + when "derived-from-or-self(../timestamp-type, 'lime:ptp80')" { + description + "Only applies when 80-bit PTP timestamp."; + } + if-feature "ptp-long-format"; + leaf timestamp-sec { + type uint64 { + range "0..281474976710655"; + } + description + "48-bit timestamp in seconds as per IEEE 1588v2."; + } + leaf timestamp-nanosec { + type uint32; + description + "Fractional part in nanoseconds as per IEEE 1588v2."; + } + description + "Container for 80-bit timestamp."; + } + container ntp-timestamp-32bit { + when "derived-from-or-self(../timestamp-type," + + "'lime:truncated-ntp')" { + description + "Only applies when 32-bit NTP short-format timestamp."; + } + if-feature "ntp-short-format"; + leaf timestamp-sec { + type uint16; + description + "Timestamp in seconds as per short-format NTP."; + } + leaf timestamp-nanosec { + type uint16; + description + "Truncated fractional part in 16-bit NTP timestamp."; + } + description + "Container for 32-bit timestamp RFC5905."; + reference + "RFC 5905: Network Time Protocol Version 4: Protocol and + Algorithms Specification."; + } + container icmp-timestamp-32bit { + when "derived-from-or-self(../timestamp-type, 'lime:icmp')" { + description + "Only applies when ICMP timestamp."; + } + if-feature "icmp-timestamp"; + leaf timestamp-millisec { + type uint32; + description + "Timestamp in milliseconds for ICMP timestamp."; + } + description + "Container for 32-bit timestamp. See RFC 792 for ICMP + timestamp format."; + } + } + grouping path-discovery-data { + description + "Data output from nodes related to path discovery."; + container src-test-point { + description + "Source test point."; + uses tp-address-ni; + } + container dest-test-point { + description + "Destination test point."; + uses tp-address-ni; + } + leaf sequence-number { + type uint64; + default "0"; + description + "Sequence number in data packets. A value of + zero indicates that no sequence number is sent."; + } + leaf hop-cnt { + type uint8; + default "0"; + description + "Hop count. A value of zero indicates + that no hop count is sent."; + } + uses session-packet-statistics; + uses session-error-statistics; + uses session-delay-statistics; + uses session-jitter-statistics; + container path-verification { + description + "Optional information related to path verification."; + leaf flow-info { + type string; + description + "Information that refers to the flow."; + } + uses session-path-verification-statistics; + } + container path-trace-info { + description + "Optional per-hop path trace information about test points. + The path trace information list typically has a single + element for per-hop cases such as path-discovery RPC operation + but allows a list of hop-related information for other types of + data retrieval methods."; + list path-trace-info-list { + key "index"; + description + "Path trace information list."; + leaf index { + type uint32; + description + "Trace information index."; + } + uses tp-address-ni; + uses timestamp; + leaf ingress-intf-name { + type if:interface-ref; + description + "Ingress interface name."; + } + leaf egress-intf-name { + type if:interface-ref; + description + "Egress interface name."; + } + leaf queue-depth { + type uint32; + description + "Length of the queue of the interface from where + the packet is forwarded out. The queue depth could + be the current number of memory buffers used by the + queue, and a packet can consume one or more memory buffers, + thus constituting device-level information."; + } + leaf transit-delay { + type uint32; + description + "Time in nanoseconds that the packet spent transiting a + node."; + } + leaf app-meta-data { + type uint64; + description + "Application-specific data added by node."; + } + } + } + } + + grouping continuity-check-data { + description + "Continuity Check data output from nodes."; + container src-test-point { + description + "Source test point."; + uses tp-address-ni; + leaf egress-intf-name { + type if:interface-ref; + description + "Egress interface name."; + } + } + container dest-test-point { + description + "Destination test point."; + uses tp-address-ni; + leaf ingress-intf-name { + type if:interface-ref; + description + "Ingress interface name."; + } + } + leaf sequence-number { + type uint64; + default "0"; + description + "Sequence number in data packets. A value of + zero indicates that no sequence number is sent."; + } + leaf hop-cnt { + type uint8; + default "0"; + description + "Hop count. A value of zero indicates + that no hop count is sent."; + } + uses session-packet-statistics; + uses session-error-statistics; + uses session-delay-statistics; + uses session-jitter-statistics; + } + + container cc-session-statistics-data { + if-feature "continuity-check"; + config false; + list cc-session-statistics { + key "type"; + leaf type { + type identityref { + base traffic-type; + } + description + "Type of traffic."; + } + container cc-ipv4-sessions-statistics { + when "../type = 'ipv4'" { + description + "Only applies when traffic type is IPv4."; + } + description + "CC ipv4 sessions."; + uses cc-session-statistics; + } + container cc-ipv6-sessions-statistics { + when "../type = 'ipv6'" { + description + "Only applies when traffic type is IPv6."; + } + description + "CC IPv6 sessions."; + uses cc-session-statistics; + } + description + "List of CC session statistics data."; + } + description + "CC operational information."; + } +} diff --git a/models/ietf/RFC/ietf-datastores.yang b/models/ietf/RFC/ietf-datastores.yang new file mode 100644 index 0000000000000000000000000000000000000000..9e875ab6a19cb6688313e8a76871ef3e8dd41381 --- /dev/null +++ b/models/ietf/RFC/ietf-datastores.yang @@ -0,0 +1,117 @@ +module ietf-datastores { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-datastores"; + prefix ds; + + organization + "IETF Network Modeling (NETMOD) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + + WG List: <mailto:netmod@ietf.org> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Phil Shafer + <mailto:phil@juniper.net> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net> + + Author: Rob Wilton + <rwilton@cisco.com>"; + + description + "This YANG module defines a set of identities for identifying + datastores. + + Copyright (c) 2018 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 Simplified 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 8342 + (https://www.rfc-editor.org/info/rfc8342); see the RFC itself + for full legal notices."; + + revision 2018-02-14 { + description + "Initial revision."; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + + /* + * Identities + */ + + identity datastore { + description + "Abstract base identity for datastore identities."; + } + + identity conventional { + base datastore; + description + "Abstract base identity for conventional configuration + datastores."; + } + + identity running { + base conventional; + description + "The running configuration datastore."; + } + + identity candidate { + base conventional; + description + "The candidate configuration datastore."; + } + + identity startup { + base conventional; + description + "The startup configuration datastore."; + } + + identity intended { + base conventional; + description + "The intended configuration datastore."; + } + + identity dynamic { + base datastore; + description + "Abstract base identity for dynamic configuration datastores."; + } + + identity operational { + base datastore; + description + "The operational state datastore."; + } + + /* + * Type definitions + */ + + typedef datastore-ref { + type identityref { + base datastore; + } + description + "A datastore identity reference."; + } +} diff --git a/models/ietf/RFC/ietf-datastores@2018-02-14.yang b/models/ietf/RFC/ietf-datastores@2018-02-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..9e875ab6a19cb6688313e8a76871ef3e8dd41381 --- /dev/null +++ b/models/ietf/RFC/ietf-datastores@2018-02-14.yang @@ -0,0 +1,117 @@ +module ietf-datastores { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-datastores"; + prefix ds; + + organization + "IETF Network Modeling (NETMOD) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + + WG List: <mailto:netmod@ietf.org> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Phil Shafer + <mailto:phil@juniper.net> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net> + + Author: Rob Wilton + <rwilton@cisco.com>"; + + description + "This YANG module defines a set of identities for identifying + datastores. + + Copyright (c) 2018 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 Simplified 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 8342 + (https://www.rfc-editor.org/info/rfc8342); see the RFC itself + for full legal notices."; + + revision 2018-02-14 { + description + "Initial revision."; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + + /* + * Identities + */ + + identity datastore { + description + "Abstract base identity for datastore identities."; + } + + identity conventional { + base datastore; + description + "Abstract base identity for conventional configuration + datastores."; + } + + identity running { + base conventional; + description + "The running configuration datastore."; + } + + identity candidate { + base conventional; + description + "The candidate configuration datastore."; + } + + identity startup { + base conventional; + description + "The startup configuration datastore."; + } + + identity intended { + base conventional; + description + "The intended configuration datastore."; + } + + identity dynamic { + base datastore; + description + "Abstract base identity for dynamic configuration datastores."; + } + + identity operational { + base datastore; + description + "The operational state datastore."; + } + + /* + * Type definitions + */ + + typedef datastore-ref { + type identityref { + base datastore; + } + description + "A datastore identity reference."; + } +} diff --git a/models/ietf/RFC/ietf-dc-fabric-topology-state.yang b/models/ietf/RFC/ietf-dc-fabric-topology-state.yang new file mode 100644 index 0000000000000000000000000000000000000000..e16f99a388d84a7d1e39a9013ac0ec771054df22 --- /dev/null +++ b/models/ietf/RFC/ietf-dc-fabric-topology-state.yang @@ -0,0 +1,274 @@ +module ietf-dc-fabric-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state"; + prefix sfabric; + + import ietf-network-state { + prefix nws; + reference + "RFC 8345: A Data Model for Network Topologies"; + } + import ietf-dc-fabric-types { + prefix fabrictypes; + reference + "RFC 8542: A YANG Data Model for Fabric Topology in + Data-Center Networks"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Yan Zhuang + <mailto:zhuangyan.zhuang@huawei.com> + + Editor: Danian Shi + <mailto:shidanian@huawei.com>"; + description + "This module contains a collection of YANG definitions for + fabric state, representing topology that either is learned + or results from applying topology that has been + configured per the ietf-dc-fabric-topology model, mirroring + the corresponding data nodes in this model. + + This model mirrors the configuration tree of ietf-dc-fabric + -topology but contains only read-only state data. The model + is not needed when the implementation infrastructure supports + the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2019 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 Simplified 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 8542; + see the RFC itself for full legal notices."; + + revision 2019-02-25 { + description + "Initial revision."; + reference + "RFC 8542: A YANG Data Model for Fabric Topology in + Data-Center Networks"; + } + + //grouping statements + + grouping fabric-network-type { + description + "Identify the topology type to be fabric."; + container fabric-network { + presence "indicates fabric Network"; + description + "The presence of the container node indicates + fabric topology"; + } + } + + grouping fabric-options { + description + "Options for a fabric"; + leaf gateway-mode { + type enumeration { + enum centralized { + description + "The fabric uses centralized + gateway, in which gateway is deployed on SPINE + node."; + } + enum distributed { + description + "The fabric uses distributed + gateway, in which gateway is deployed on LEAF + node."; + } + } + default "distributed"; + description + "Gateway mode of the fabric"; + } + leaf traffic-behavior { + type enumeration { + enum normal { + description + "Normal means no policy is needed + for all traffic"; + } + enum policy-driven { + description + "Policy driven means policy is + needed for the traffic; otherwise, the traffic + will be discarded."; + } + } + default "normal"; + description + "Traffic behavior of the fabric"; + } + leaf-list capability-supported { + type fabrictypes:service-capabilities; + description + "It provides a list of supported services of the + fabric. The service-capabilities is defined as + identity-ref. Users can define more services + by defining new identities."; + } + } + + grouping device-attributes { + description + "device attributes"; + leaf device-ref { + type fabrictypes:node-ref; + description + "The device that the fabric includes that refers + to a node in another topology."; + } + leaf-list role { + type fabrictypes:device-role; + default "fabrictypes:leaf"; + description + "It is a list of device roles to represent the roles + that a device plays within a POD, such as SPINE, + LEAF, Border, or Border-Leaf. + The device role is defined as identity-ref. If more + than 2 stages are used for a POD, users can + define new identities for the device role."; + } + } + + grouping link-attributes { + description + "Link attributes"; + leaf link-ref { + type fabrictypes:link-ref; + description + "The link that the fabric includes that refers to + a link in another topology."; + } + } + + grouping port-attributes { + description + "Port attributes"; + leaf port-ref { + type fabrictypes:tp-ref; + description + "The port that the fabric includes that refers to + a termination-point in another topology."; + } + leaf port-type { + type fabrictypes:port-type; + description + "Port type is defined as identity-ref. The current + types include ethernet or serial. If more types + are needed, developers can define new identities."; + } + leaf bandwidth { + type fabrictypes:bandwidth; + description + "Bandwidth of the port. It is defined as + identity-ref. If more speeds are introduced, + developers can define new identities for them. Current + speeds include 1M, 10M, 100M, 1G, 10G, + 25G, 40G, 100G, and 400G."; + } + } + + grouping fabric-attributes { + description + "Attributes of a fabric"; + leaf fabric-id { + type fabrictypes:fabric-id; + description + "Fabric ID"; + } + leaf name { + type string; + description + "Name of the fabric"; + } + leaf type { + type fabrictypes:underlay-network-type; + description + "The type of physical network that implements this + fabric. Examples are VLAN and TRILL."; + } + container vni-capacity { + description + "The range of the VXLAN Network + Identifier (VNI) defined in RFC 7348 that the POD uses."; + leaf min { + type int32; + description + "The lower-limit VNI."; + } + leaf max { + type int32; + description + "The upper-limit VNI."; + } + } + + leaf description { + type string; + description + "Description of the fabric"; + } + container options { + description + "Options of the fabric"; + uses fabric-options; + } + list device-nodes { + key "device-ref"; + description + "Device nodes that are included in a fabric."; + uses device-attributes; + } + list device-links { + key "link-ref"; + description + "Links that are included within a fabric."; + uses link-attributes; + } + list device-ports { + key "port-ref"; + description + "Ports that are included in the fabric."; + uses port-attributes; + } + } + + // augment statements + + augment "/nws:networks/nws:network/nws:network-types" { + description + "Introduce a new network type for fabric-based logical + topology"; + uses fabric-network-type; + } + + augment "/nws:networks/nws:network/nws:node" { + when '/nws:networks/nws:network/nws:network-types' + + '/sfabric:fabric-network' { + description + "Augmentation parameters apply only for + networks with fabric topology."; + } + description + "Augmentation for fabric nodes."; + container fabric-attributes-state { + description + "Attributes for a fabric network"; + uses fabric-attributes; + } + } +} diff --git a/models/ietf/RFC/ietf-dc-fabric-topology-state@2019-02-25.yang b/models/ietf/RFC/ietf-dc-fabric-topology-state@2019-02-25.yang new file mode 100644 index 0000000000000000000000000000000000000000..e16f99a388d84a7d1e39a9013ac0ec771054df22 --- /dev/null +++ b/models/ietf/RFC/ietf-dc-fabric-topology-state@2019-02-25.yang @@ -0,0 +1,274 @@ +module ietf-dc-fabric-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state"; + prefix sfabric; + + import ietf-network-state { + prefix nws; + reference + "RFC 8345: A Data Model for Network Topologies"; + } + import ietf-dc-fabric-types { + prefix fabrictypes; + reference + "RFC 8542: A YANG Data Model for Fabric Topology in + Data-Center Networks"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Yan Zhuang + <mailto:zhuangyan.zhuang@huawei.com> + + Editor: Danian Shi + <mailto:shidanian@huawei.com>"; + description + "This module contains a collection of YANG definitions for + fabric state, representing topology that either is learned + or results from applying topology that has been + configured per the ietf-dc-fabric-topology model, mirroring + the corresponding data nodes in this model. + + This model mirrors the configuration tree of ietf-dc-fabric + -topology but contains only read-only state data. The model + is not needed when the implementation infrastructure supports + the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2019 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 Simplified 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 8542; + see the RFC itself for full legal notices."; + + revision 2019-02-25 { + description + "Initial revision."; + reference + "RFC 8542: A YANG Data Model for Fabric Topology in + Data-Center Networks"; + } + + //grouping statements + + grouping fabric-network-type { + description + "Identify the topology type to be fabric."; + container fabric-network { + presence "indicates fabric Network"; + description + "The presence of the container node indicates + fabric topology"; + } + } + + grouping fabric-options { + description + "Options for a fabric"; + leaf gateway-mode { + type enumeration { + enum centralized { + description + "The fabric uses centralized + gateway, in which gateway is deployed on SPINE + node."; + } + enum distributed { + description + "The fabric uses distributed + gateway, in which gateway is deployed on LEAF + node."; + } + } + default "distributed"; + description + "Gateway mode of the fabric"; + } + leaf traffic-behavior { + type enumeration { + enum normal { + description + "Normal means no policy is needed + for all traffic"; + } + enum policy-driven { + description + "Policy driven means policy is + needed for the traffic; otherwise, the traffic + will be discarded."; + } + } + default "normal"; + description + "Traffic behavior of the fabric"; + } + leaf-list capability-supported { + type fabrictypes:service-capabilities; + description + "It provides a list of supported services of the + fabric. The service-capabilities is defined as + identity-ref. Users can define more services + by defining new identities."; + } + } + + grouping device-attributes { + description + "device attributes"; + leaf device-ref { + type fabrictypes:node-ref; + description + "The device that the fabric includes that refers + to a node in another topology."; + } + leaf-list role { + type fabrictypes:device-role; + default "fabrictypes:leaf"; + description + "It is a list of device roles to represent the roles + that a device plays within a POD, such as SPINE, + LEAF, Border, or Border-Leaf. + The device role is defined as identity-ref. If more + than 2 stages are used for a POD, users can + define new identities for the device role."; + } + } + + grouping link-attributes { + description + "Link attributes"; + leaf link-ref { + type fabrictypes:link-ref; + description + "The link that the fabric includes that refers to + a link in another topology."; + } + } + + grouping port-attributes { + description + "Port attributes"; + leaf port-ref { + type fabrictypes:tp-ref; + description + "The port that the fabric includes that refers to + a termination-point in another topology."; + } + leaf port-type { + type fabrictypes:port-type; + description + "Port type is defined as identity-ref. The current + types include ethernet or serial. If more types + are needed, developers can define new identities."; + } + leaf bandwidth { + type fabrictypes:bandwidth; + description + "Bandwidth of the port. It is defined as + identity-ref. If more speeds are introduced, + developers can define new identities for them. Current + speeds include 1M, 10M, 100M, 1G, 10G, + 25G, 40G, 100G, and 400G."; + } + } + + grouping fabric-attributes { + description + "Attributes of a fabric"; + leaf fabric-id { + type fabrictypes:fabric-id; + description + "Fabric ID"; + } + leaf name { + type string; + description + "Name of the fabric"; + } + leaf type { + type fabrictypes:underlay-network-type; + description + "The type of physical network that implements this + fabric. Examples are VLAN and TRILL."; + } + container vni-capacity { + description + "The range of the VXLAN Network + Identifier (VNI) defined in RFC 7348 that the POD uses."; + leaf min { + type int32; + description + "The lower-limit VNI."; + } + leaf max { + type int32; + description + "The upper-limit VNI."; + } + } + + leaf description { + type string; + description + "Description of the fabric"; + } + container options { + description + "Options of the fabric"; + uses fabric-options; + } + list device-nodes { + key "device-ref"; + description + "Device nodes that are included in a fabric."; + uses device-attributes; + } + list device-links { + key "link-ref"; + description + "Links that are included within a fabric."; + uses link-attributes; + } + list device-ports { + key "port-ref"; + description + "Ports that are included in the fabric."; + uses port-attributes; + } + } + + // augment statements + + augment "/nws:networks/nws:network/nws:network-types" { + description + "Introduce a new network type for fabric-based logical + topology"; + uses fabric-network-type; + } + + augment "/nws:networks/nws:network/nws:node" { + when '/nws:networks/nws:network/nws:network-types' + + '/sfabric:fabric-network' { + description + "Augmentation parameters apply only for + networks with fabric topology."; + } + description + "Augmentation for fabric nodes."; + container fabric-attributes-state { + description + "Attributes for a fabric network"; + uses fabric-attributes; + } + } +} diff --git a/models/ietf/RFC/ietf-dc-fabric-topology.yang b/models/ietf/RFC/ietf-dc-fabric-topology.yang new file mode 100644 index 0000000000000000000000000000000000000000..29741ca1b355d62be764b5c7b3fb99052f7b24c0 --- /dev/null +++ b/models/ietf/RFC/ietf-dc-fabric-topology.yang @@ -0,0 +1,288 @@ +module ietf-dc-fabric-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology"; + prefix fabric; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-dc-fabric-types { + prefix fabrictypes; + reference + "RFC 8542: A YANG Data Model for Fabric Topology in + Data-Center Networks"; + } + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Yan Zhuang + <mailto:zhuangyan.zhuang@huawei.com> + + Editor: Danian Shi + <mailto:shidanian@huawei.com>"; + description + "This module contains a collection of YANG definitions for + fabric. + + Copyright (c) 2019 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 Simplified + 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 8542; + see the RFC itself for full legal notices."; + + revision 2019-02-25 { + description + "Initial revision."; + reference + "RFC 8542: A YANG Data Model for Fabric Topology + in Data-Center Networks"; + } + + //grouping statements + + grouping fabric-network-type { + description + "Identify the topology type to be fabric."; + container fabric-network { + presence "indicates fabric Network"; + description + "The presence of the container node indicates + fabric topology"; + } + } + grouping fabric-options { + description + "Options for a fabric"; + leaf gateway-mode { + type enumeration { + enum centralized { + description + "The Fabric uses centralized + gateway, in which gateway is deployed on SPINE + node."; + } + enum distributed { + description + "The Fabric uses distributed + gateway, in which gateway is deployed on LEAF + node."; + } + } + default "distributed"; + description + "Gateway mode of the fabric"; + } + leaf traffic-behavior { + type enumeration { + enum normal { + description + "Normal means no policy is needed + for all traffic"; + } + enum policy-driven { + description + "Policy driven means policy is + needed for the traffic; otherwise, the traffic + will be discarded."; + } + } + default "normal"; + description + "Traffic behavior of the fabric"; + } + leaf-list capability-supported { + type fabrictypes:service-capabilities; + description + "It provides a list of supported services of the + fabric. The service-capabilities is defined as + identity-ref. Users can define more services + by defining new identities."; + } + } + + grouping device-attributes { + description + "device attributes"; + leaf device-ref { + type fabrictypes:node-ref; + description + "The device that the fabric includes that refers + to a node in another topology."; + } + leaf-list role { + type fabrictypes:device-role; + default "fabrictypes:leaf"; + description + "It is a list of device roles to represent the roles + that a device plays within a POD, such as SPINE, + LEAF, Border, or Border-Leaf. + The device role is defined as identity-ref. If more + than 2 stages are used for a POD, users can + define new identities for the device role."; + } + } + + grouping link-attributes { + description + "Link attributes"; + leaf link-ref { + type fabrictypes:link-ref; + description + "The link that the fabric includes that refers to + a link in another topology."; + } + } + + grouping port-attributes { + description + "Port attributes"; + leaf port-ref { + type fabrictypes:tp-ref; + description + "The port that the fabric includes that refers to + a termination-point in another topology."; + } + leaf port-type { + type fabrictypes:port-type; + description + "Port type is defined as identity-ref. The current + types include ethernet or serial. If more types + are needed, developers can define new identities."; + } + leaf bandwidth { + type fabrictypes:bandwidth; + description + "Bandwidth of the port. It is defined as identity-ref. + If more speeds are introduced, developers can define + new identities for them. Current speeds include 1M, 10M, + 100M, 1G, 10G, 25G, 40G, 100G, and 400G."; + } + } + + grouping fabric-attributes { + description + "Attributes of a fabric"; + leaf fabric-id { + type fabrictypes:fabric-id; + description + "An identifier for a fabric in a topology. + This identifier can be generated when composing a fabric. + The composition of a fabric can be achieved by defining an + RPC, which is left for vendor-specific implementation and + not provided in this model."; + } + leaf name { + type string; + description + "Name of the fabric"; + } + leaf type { + type fabrictypes:underlay-network-type; + description + "The type of physical network that implements this + fabric. Examples are VLAN and TRILL."; + } + container vni-capacity { + description + "The range of the VXLAN Network Identifier + (VNI) defined in RFC 7348 that the POD uses."; + leaf min { + type int32; + description + "The lower-limit VNI."; + } + leaf max { + type int32; + description + "The upper-limit VNI."; + } + } + leaf description { + type string; + description + "Description of the fabric"; + } + container options { + description + "Options of the fabric"; + uses fabric-options; + } + list device-nodes { + key "device-ref"; + description + "Device nodes that are included in a fabric."; + uses device-attributes; + } + list device-links { + key "link-ref"; + description + "Links that are included within a fabric."; + uses link-attributes; + } + list device-ports { + key "port-ref"; + description + "Ports that are included in the fabric."; + uses port-attributes; + } + } + + // augment statements + + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduce a new network type for fabric-based topology"; + uses fabric-network-type; + } + + augment "/nw:networks/nw:network/nw:node" { + when '/nw:networks/nw:network/nw:network-types/' + + 'fabric:fabric-network' { + description + "Augmentation parameters apply only for networks + with fabric topology"; + } + description + "Augmentation for fabric nodes created by + fabric topology."; + container fabric-attributes { + description + "Attributes for a fabric network"; + uses fabric-attributes; + } + } + + augment "/nw:networks/nw:network/nw:node/nt:termination-point" { + when '/nw:networks/nw:network/nw:network-types/' + + 'fabric:fabric-network' { + description + "Augmentation parameters apply only for networks + with fabric topology"; + } + description + "Augmentation for port on fabric."; + container fport-attributes { + config false; + description + "Attributes for fabric ports"; + uses fabrictypes:fabric-port; + } + } +} diff --git a/models/ietf/RFC/ietf-dc-fabric-topology@2019-02-25.yang b/models/ietf/RFC/ietf-dc-fabric-topology@2019-02-25.yang new file mode 100644 index 0000000000000000000000000000000000000000..29741ca1b355d62be764b5c7b3fb99052f7b24c0 --- /dev/null +++ b/models/ietf/RFC/ietf-dc-fabric-topology@2019-02-25.yang @@ -0,0 +1,288 @@ +module ietf-dc-fabric-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology"; + prefix fabric; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-dc-fabric-types { + prefix fabrictypes; + reference + "RFC 8542: A YANG Data Model for Fabric Topology in + Data-Center Networks"; + } + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Yan Zhuang + <mailto:zhuangyan.zhuang@huawei.com> + + Editor: Danian Shi + <mailto:shidanian@huawei.com>"; + description + "This module contains a collection of YANG definitions for + fabric. + + Copyright (c) 2019 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 Simplified + 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 8542; + see the RFC itself for full legal notices."; + + revision 2019-02-25 { + description + "Initial revision."; + reference + "RFC 8542: A YANG Data Model for Fabric Topology + in Data-Center Networks"; + } + + //grouping statements + + grouping fabric-network-type { + description + "Identify the topology type to be fabric."; + container fabric-network { + presence "indicates fabric Network"; + description + "The presence of the container node indicates + fabric topology"; + } + } + grouping fabric-options { + description + "Options for a fabric"; + leaf gateway-mode { + type enumeration { + enum centralized { + description + "The Fabric uses centralized + gateway, in which gateway is deployed on SPINE + node."; + } + enum distributed { + description + "The Fabric uses distributed + gateway, in which gateway is deployed on LEAF + node."; + } + } + default "distributed"; + description + "Gateway mode of the fabric"; + } + leaf traffic-behavior { + type enumeration { + enum normal { + description + "Normal means no policy is needed + for all traffic"; + } + enum policy-driven { + description + "Policy driven means policy is + needed for the traffic; otherwise, the traffic + will be discarded."; + } + } + default "normal"; + description + "Traffic behavior of the fabric"; + } + leaf-list capability-supported { + type fabrictypes:service-capabilities; + description + "It provides a list of supported services of the + fabric. The service-capabilities is defined as + identity-ref. Users can define more services + by defining new identities."; + } + } + + grouping device-attributes { + description + "device attributes"; + leaf device-ref { + type fabrictypes:node-ref; + description + "The device that the fabric includes that refers + to a node in another topology."; + } + leaf-list role { + type fabrictypes:device-role; + default "fabrictypes:leaf"; + description + "It is a list of device roles to represent the roles + that a device plays within a POD, such as SPINE, + LEAF, Border, or Border-Leaf. + The device role is defined as identity-ref. If more + than 2 stages are used for a POD, users can + define new identities for the device role."; + } + } + + grouping link-attributes { + description + "Link attributes"; + leaf link-ref { + type fabrictypes:link-ref; + description + "The link that the fabric includes that refers to + a link in another topology."; + } + } + + grouping port-attributes { + description + "Port attributes"; + leaf port-ref { + type fabrictypes:tp-ref; + description + "The port that the fabric includes that refers to + a termination-point in another topology."; + } + leaf port-type { + type fabrictypes:port-type; + description + "Port type is defined as identity-ref. The current + types include ethernet or serial. If more types + are needed, developers can define new identities."; + } + leaf bandwidth { + type fabrictypes:bandwidth; + description + "Bandwidth of the port. It is defined as identity-ref. + If more speeds are introduced, developers can define + new identities for them. Current speeds include 1M, 10M, + 100M, 1G, 10G, 25G, 40G, 100G, and 400G."; + } + } + + grouping fabric-attributes { + description + "Attributes of a fabric"; + leaf fabric-id { + type fabrictypes:fabric-id; + description + "An identifier for a fabric in a topology. + This identifier can be generated when composing a fabric. + The composition of a fabric can be achieved by defining an + RPC, which is left for vendor-specific implementation and + not provided in this model."; + } + leaf name { + type string; + description + "Name of the fabric"; + } + leaf type { + type fabrictypes:underlay-network-type; + description + "The type of physical network that implements this + fabric. Examples are VLAN and TRILL."; + } + container vni-capacity { + description + "The range of the VXLAN Network Identifier + (VNI) defined in RFC 7348 that the POD uses."; + leaf min { + type int32; + description + "The lower-limit VNI."; + } + leaf max { + type int32; + description + "The upper-limit VNI."; + } + } + leaf description { + type string; + description + "Description of the fabric"; + } + container options { + description + "Options of the fabric"; + uses fabric-options; + } + list device-nodes { + key "device-ref"; + description + "Device nodes that are included in a fabric."; + uses device-attributes; + } + list device-links { + key "link-ref"; + description + "Links that are included within a fabric."; + uses link-attributes; + } + list device-ports { + key "port-ref"; + description + "Ports that are included in the fabric."; + uses port-attributes; + } + } + + // augment statements + + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduce a new network type for fabric-based topology"; + uses fabric-network-type; + } + + augment "/nw:networks/nw:network/nw:node" { + when '/nw:networks/nw:network/nw:network-types/' + + 'fabric:fabric-network' { + description + "Augmentation parameters apply only for networks + with fabric topology"; + } + description + "Augmentation for fabric nodes created by + fabric topology."; + container fabric-attributes { + description + "Attributes for a fabric network"; + uses fabric-attributes; + } + } + + augment "/nw:networks/nw:network/nw:node/nt:termination-point" { + when '/nw:networks/nw:network/nw:network-types/' + + 'fabric:fabric-network' { + description + "Augmentation parameters apply only for networks + with fabric topology"; + } + description + "Augmentation for port on fabric."; + container fport-attributes { + config false; + description + "Attributes for fabric ports"; + uses fabrictypes:fabric-port; + } + } +} diff --git a/models/ietf/RFC/ietf-dc-fabric-types.yang b/models/ietf/RFC/ietf-dc-fabric-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..58b7122a8438bf04fca241b5a52eb56164bd544e --- /dev/null +++ b/models/ietf/RFC/ietf-dc-fabric-types.yang @@ -0,0 +1,353 @@ +module ietf-dc-fabric-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types"; + prefix fabrictypes; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Yan Zhuang + <mailto:zhuangyan.zhuang@huawei.com> + + Editor: Danian Shi + <mailto:shidanian@huawei.com>"; + description + "This module contains a collection of YANG definitions for + fabric. + + Copyright (c) 2019 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 Simplified + 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 8542; + see the RFC itself for full legal notices."; + + revision 2019-02-25 { + description + "Initial revision."; + reference + "RFC 8542: A YANG Data Model for Fabric Topology + in Data-Center Networks"; + } + + identity fabric-type { + description + "Base type for fabric networks"; + } + + identity vxlan-fabric { + base fabric-type; + description + "VXLAN fabric"; + } + + identity vlan-fabric { + base fabric-type; + description + "VLAN fabric"; + } + + identity trill-fabric { + base fabric-type; + description + "TRILL fabric"; + } + + identity port-type { + description + "Base type for fabric port"; + } + + identity eth { + base port-type; + description + "Ethernet"; + } + + identity serial { + base port-type; + description + "Serial"; + } + + identity bandwidth { + description + "Base for bandwidth"; + } + + identity bw-1M { + base bandwidth; + description + "1M"; + } + + identity bw-10M { + base bandwidth; + description + "10Mbps"; + } + + identity bw-100M { + base bandwidth; + description + "100Mbps"; + } + + identity bw-1G { + base bandwidth; + description + "1Gbps"; + } + + identity bw-10G { + base bandwidth; + description + "10Gbps"; + } + + identity bw-25G { + base bandwidth; + description + "25Gbps"; + } + + identity bw-40G { + base bandwidth; + description + "40Gbps"; + } + + identity bw-100G { + base bandwidth; + description + "100Gbps"; + } + + identity bw-400G { + base bandwidth; + description + "400Gbps"; + } + + identity device-role { + description + "Base for the device role in a fabric."; + } + + identity spine { + base device-role; + description + "This is a spine node in a fabric."; + } + + identity leaf { + base device-role; + description + "This is a leaf node in a fabric."; + } + + identity border { + base device-role; + description + "This is a border node to connect to other + fabric/network."; + } + + identity fabric-port-role { + description + "Base for the port's role in a fabric."; + } + + identity internal { + base fabric-port-role; + description + "The port is used for devices to access each + other within a fabric."; + } + + identity external { + base fabric-port-role; + description + "The port is used for a fabric to connect to + outside network."; + } + + identity access { + base fabric-port-role; + description + "The port is used for an endpoint to connect + to a fabric."; + } + + identity service-capability { + description + "Base for the service of the fabric "; + } + + identity ip-mapping { + base service-capability; + description + "NAT."; + } + + identity acl-redirect { + base service-capability; + description + "ACL redirect, which can provide a Service Function Chain (SFC)."; + } + + identity dynamic-route-exchange { + base service-capability; + description + "Dynamic route exchange."; + } + + /* + * Typedefs + */ + + typedef fabric-id { + type nw:node-id; + description + "An identifier for a fabric in a topology. + This identifier can be generated when composing a fabric. + The composition of a fabric can be achieved by defining an + RPC, which is left for vendor specific implementation + and not provided in this model."; + } + + typedef service-capabilities { + type identityref { + base service-capability; + } + description + "Service capability of the fabric"; + } + + typedef port-type { + type identityref { + base port-type; + } + description + "Port type: ethernet or serial or others."; + } + + typedef bandwidth { + type identityref { + base bandwidth; + } + description + "Bandwidth of the port."; + } + + typedef node-ref { + type instance-identifier; + description + "A reference to a node in topology"; + } + + typedef tp-ref { + type instance-identifier; + description + "A reference to a termination point in topology"; + } + + typedef link-ref { + type instance-identifier; + description + "A reference to a link in topology"; + } + + typedef underlay-network-type { + type identityref { + base fabric-type; + } + description + "The type of physical network that implements + this fabric. Examples are VLAN and TRILL."; + } + + typedef device-role { + type identityref { + base device-role; + } + description + "Role of the device node."; + } + + typedef fabric-port-role { + type identityref { + base fabric-port-role; + } + description + "Role of the port in a fabric."; + } + + typedef fabric-port-type { + type enumeration { + enum layer2interface { + description + "L2 interface"; + } + enum layer3interface { + description + "L3 interface"; + } + enum layer2Tunnel { + description + "L2 tunnel"; + } + enum layer3Tunnel { + description + "L3 tunnel"; + } + } + description + "Fabric port type"; + } + + grouping fabric-port { + description + "Attributes of a fabric port."; + leaf name { + type string; + description + "Name of the port."; + } + leaf role { + type fabric-port-role; + description + "Role of the port in a fabric."; + } + leaf type { + type fabric-port-type; + description + "Type of the port"; + } + leaf device-port { + type tp-ref; + description + "The device port it mapped to."; + } + choice tunnel-option { + description + "Tunnel options to connect two fabrics. + It could be L2 Tunnel or L3 Tunnel."; + } + } +} diff --git a/models/ietf/RFC/ietf-dc-fabric-types@2019-02-25.yang b/models/ietf/RFC/ietf-dc-fabric-types@2019-02-25.yang new file mode 100644 index 0000000000000000000000000000000000000000..58b7122a8438bf04fca241b5a52eb56164bd544e --- /dev/null +++ b/models/ietf/RFC/ietf-dc-fabric-types@2019-02-25.yang @@ -0,0 +1,353 @@ +module ietf-dc-fabric-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types"; + prefix fabrictypes; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Yan Zhuang + <mailto:zhuangyan.zhuang@huawei.com> + + Editor: Danian Shi + <mailto:shidanian@huawei.com>"; + description + "This module contains a collection of YANG definitions for + fabric. + + Copyright (c) 2019 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 Simplified + 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 8542; + see the RFC itself for full legal notices."; + + revision 2019-02-25 { + description + "Initial revision."; + reference + "RFC 8542: A YANG Data Model for Fabric Topology + in Data-Center Networks"; + } + + identity fabric-type { + description + "Base type for fabric networks"; + } + + identity vxlan-fabric { + base fabric-type; + description + "VXLAN fabric"; + } + + identity vlan-fabric { + base fabric-type; + description + "VLAN fabric"; + } + + identity trill-fabric { + base fabric-type; + description + "TRILL fabric"; + } + + identity port-type { + description + "Base type for fabric port"; + } + + identity eth { + base port-type; + description + "Ethernet"; + } + + identity serial { + base port-type; + description + "Serial"; + } + + identity bandwidth { + description + "Base for bandwidth"; + } + + identity bw-1M { + base bandwidth; + description + "1M"; + } + + identity bw-10M { + base bandwidth; + description + "10Mbps"; + } + + identity bw-100M { + base bandwidth; + description + "100Mbps"; + } + + identity bw-1G { + base bandwidth; + description + "1Gbps"; + } + + identity bw-10G { + base bandwidth; + description + "10Gbps"; + } + + identity bw-25G { + base bandwidth; + description + "25Gbps"; + } + + identity bw-40G { + base bandwidth; + description + "40Gbps"; + } + + identity bw-100G { + base bandwidth; + description + "100Gbps"; + } + + identity bw-400G { + base bandwidth; + description + "400Gbps"; + } + + identity device-role { + description + "Base for the device role in a fabric."; + } + + identity spine { + base device-role; + description + "This is a spine node in a fabric."; + } + + identity leaf { + base device-role; + description + "This is a leaf node in a fabric."; + } + + identity border { + base device-role; + description + "This is a border node to connect to other + fabric/network."; + } + + identity fabric-port-role { + description + "Base for the port's role in a fabric."; + } + + identity internal { + base fabric-port-role; + description + "The port is used for devices to access each + other within a fabric."; + } + + identity external { + base fabric-port-role; + description + "The port is used for a fabric to connect to + outside network."; + } + + identity access { + base fabric-port-role; + description + "The port is used for an endpoint to connect + to a fabric."; + } + + identity service-capability { + description + "Base for the service of the fabric "; + } + + identity ip-mapping { + base service-capability; + description + "NAT."; + } + + identity acl-redirect { + base service-capability; + description + "ACL redirect, which can provide a Service Function Chain (SFC)."; + } + + identity dynamic-route-exchange { + base service-capability; + description + "Dynamic route exchange."; + } + + /* + * Typedefs + */ + + typedef fabric-id { + type nw:node-id; + description + "An identifier for a fabric in a topology. + This identifier can be generated when composing a fabric. + The composition of a fabric can be achieved by defining an + RPC, which is left for vendor specific implementation + and not provided in this model."; + } + + typedef service-capabilities { + type identityref { + base service-capability; + } + description + "Service capability of the fabric"; + } + + typedef port-type { + type identityref { + base port-type; + } + description + "Port type: ethernet or serial or others."; + } + + typedef bandwidth { + type identityref { + base bandwidth; + } + description + "Bandwidth of the port."; + } + + typedef node-ref { + type instance-identifier; + description + "A reference to a node in topology"; + } + + typedef tp-ref { + type instance-identifier; + description + "A reference to a termination point in topology"; + } + + typedef link-ref { + type instance-identifier; + description + "A reference to a link in topology"; + } + + typedef underlay-network-type { + type identityref { + base fabric-type; + } + description + "The type of physical network that implements + this fabric. Examples are VLAN and TRILL."; + } + + typedef device-role { + type identityref { + base device-role; + } + description + "Role of the device node."; + } + + typedef fabric-port-role { + type identityref { + base fabric-port-role; + } + description + "Role of the port in a fabric."; + } + + typedef fabric-port-type { + type enumeration { + enum layer2interface { + description + "L2 interface"; + } + enum layer3interface { + description + "L3 interface"; + } + enum layer2Tunnel { + description + "L2 tunnel"; + } + enum layer3Tunnel { + description + "L3 tunnel"; + } + } + description + "Fabric port type"; + } + + grouping fabric-port { + description + "Attributes of a fabric port."; + leaf name { + type string; + description + "Name of the port."; + } + leaf role { + type fabric-port-role; + description + "Role of the port in a fabric."; + } + leaf type { + type fabric-port-type; + description + "Type of the port"; + } + leaf device-port { + type tp-ref; + description + "The device port it mapped to."; + } + choice tunnel-option { + description + "Tunnel options to connect two fabrics. + It could be L2 Tunnel or L3 Tunnel."; + } + } +} diff --git a/models/ietf/RFC/ietf-dots-data-channel.yang b/models/ietf/RFC/ietf-dots-data-channel.yang new file mode 100644 index 0000000000000000000000000000000000000000..a780859c0e9b5f253eb056de9143cddd5f761d84 --- /dev/null +++ b/models/ietf/RFC/ietf-dots-data-channel.yang @@ -0,0 +1,807 @@ +module ietf-dots-data-channel { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dots-data-channel"; + prefix data-channel; + + import ietf-inet-types { + prefix inet; + reference + "Section 4 of RFC 6991"; + } + import ietf-access-control-list { + prefix ietf-acl; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + import ietf-packet-fields { + prefix packet-fields; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + + organization + "IETF DDoS Open Threat Signaling (DOTS) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/dots/> + WG List: <mailto:dots@ietf.org> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Editor: Konda, Tirumaleswar Reddy.K + <mailto:TirumaleswarReddy_Konda@McAfee.com> + + Author: Jon Shallow + <mailto:jon.shallow@nccgroup.com> + + Author: Kaname Nishizuka + <mailto:kaname@nttv6.jp> + + Author: Liang Xia + <mailto:frank.xialiang@huawei.com> + + Author: Prashanth Patil + <mailto:praspati@cisco.com> + + Author: Andrew Mortensen + <mailto:amortensen@arbor.net> + + Author: Nik Teague + <mailto:nteague@ironmountain.co.uk>"; + description + "This module contains YANG definition for configuring + aliases for resources and filtering rules using DOTS + data channel. + + Copyright (c) 2020 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8783; see + the RFC itself for full legal notices."; + + revision 2020-05-28 { + description + "Initial revision."; + reference + "RFC 8783: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Data Channel Specification"; + } + + typedef activation-type { + type enumeration { + enum activate-when-mitigating { + value 1; + description + "The Access Control List (ACL) is installed only when + a mitigation is active for the DOTS client."; + } + enum immediate { + value 2; + description + "The ACL is immediately activated."; + } + enum deactivate { + value 3; + description + "The ACL is maintained by the DOTS server, but it is + deactivated."; + } + } + description + "Indicates the activation type of an ACL."; + } + + typedef operator { + type bits { + bit not { + position 0; + description + "If set, logical negation of operation."; + } + bit match { + position 1; + description + "Match bit. This is a bitwise match operation + defined as '(data & value) == value'."; + } + bit any { + position 3; + description + "Any bit. This is a match on any of the bits in + bitmask. It evaluates to 'true' if any of the bits + in the value mask are set in the data, + i.e., '(data & value) != 0'."; + } + } + description + "Specifies how to apply the defined bitmask. + 'any' and 'match' bits must not be set simultaneously."; + } + + grouping tcp-flags { + leaf operator { + type operator; + default "match"; + description + "Specifies how to interpret the TCP flags."; + } + leaf bitmask { + type uint16; + mandatory true; + description + "The bitmask matches the last 4 bits of byte 12 + and byte 13 of the TCP header. For clarity, the 4 bits + of byte 12 corresponding to the TCP data offset field + are not included in any matching."; + } + description + "Operations on TCP flags."; + } + + typedef fragment-type { + type bits { + bit df { + position 0; + description + "Don't fragment bit for IPv4. + Must be set to 0 when it appears in an IPv6 filter."; + } + bit isf { + position 1; + description + "Is a fragment."; + } + bit ff { + position 2; + description + "First fragment."; + } + bit lf { + position 3; + description + "Last fragment."; + } + } + description + "Different fragment types to match against."; + } + + grouping target { + description + "Specifies the targets of the mitigation request."; + leaf-list target-prefix { + type inet:ip-prefix; + description + "IPv4 or IPv6 prefix identifying the target."; + } + list target-port-range { + key "lower-port"; + description + "Port range. When only lower-port is + present, it represents a single port number."; + leaf lower-port { + type inet:port-number; + mandatory true; + description + "Lower port number of the port range."; + } + leaf upper-port { + type inet:port-number; + must '. >= ../lower-port' { + error-message + "The upper-port number must be greater than + or equal to the lower-port number."; + } + description + "Upper port number of the port range."; + } + } + leaf-list target-protocol { + type uint8; + description + "Identifies the target protocol number. + + Values are taken from the IANA protocol registry: + https://www.iana.org/assignments/protocol-numbers/ + + For example, 6 for TCP or 17 for UDP."; + } + leaf-list target-fqdn { + type inet:domain-name; + description + "FQDN identifying the target."; + } + leaf-list target-uri { + type inet:uri; + description + "URI identifying the target."; + } + } + + grouping fragment-fields { + leaf operator { + type operator; + default "match"; + description + "Specifies how to interpret the fragment type."; + } + leaf type { + type fragment-type; + mandatory true; + description + "Indicates what fragment type to look for."; + } + description + "Operations on fragment types."; + } + + grouping aliases { + description + "Top-level container for aliases."; + list alias { + key "name"; + description + "List of aliases."; + leaf name { + type string; + description + "The name of the alias."; + } + uses target; + leaf pending-lifetime { + type int32; + units "minutes"; + config false; + description + "Indicates the pending validity lifetime of the alias + entry."; + } + } + } + + grouping ports { + choice source-port { + container source-port-range-or-operator { + uses packet-fields:port-range-or-operator; + description + "Source port definition."; + } + description + "Choice of specifying the source port or referring to + a group of source port numbers."; + } + choice destination-port { + container destination-port-range-or-operator { + uses packet-fields:port-range-or-operator; + description + "Destination port definition."; + } + description + "Choice of specifying a destination port or referring + to a group of destination port numbers."; + } + description + "Choice of specifying a source or destination port numbers."; + } + + grouping access-lists { + description + "Specifies the ordered set of Access Control Lists."; + list acl { + key "name"; + ordered-by user; + description + "An ACL is an ordered list of Access Control Entries (ACE). + Each ACE has a list of match criteria and a list of + actions."; + leaf name { + type string { + length "1..64"; + } + description + "The name of the access list."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + leaf type { + type ietf-acl:acl-type; + description + "Type of access control list. Indicates the primary + intended type of match criteria (e.g., IPv4, IPv6) + used in the list instance."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + leaf activation-type { + type activation-type; + default "activate-when-mitigating"; + description + "Indicates the activation type of an ACL. An ACL can be + deactivated, installed immediately, or installed when + a mitigation is active."; + } + leaf pending-lifetime { + type int32; + units "minutes"; + config false; + description + "Indicates the pending validity lifetime of the ACL + entry."; + } + container aces { + description + "The Access Control Entries container contains + a list of ACEs."; + list ace { + key "name"; + ordered-by user; + description + "List of access list entries."; + leaf name { + type string { + length "1..64"; + } + description + "A unique name identifying this ACE."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + container matches { + description + "The rules in this set determine what fields will be + matched upon before any action is taken on them. + + If no matches are defined in a particular container, + then any packet will match that container. + + If no matches are specified at all in an ACE, then any + packet will match the ACE."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + choice l3 { + container ipv4 { + when "derived-from(../../../../type, " + + "'ietf-acl:ipv4-acl-type')"; + uses packet-fields:acl-ip-header-fields; + uses packet-fields:acl-ipv4-header-fields; + container fragment { + description + "Indicates how to handle IPv4 fragments."; + uses fragment-fields; + } + description + "Rule set that matches IPv4 header."; + } + container ipv6 { + when "derived-from(../../../../type, " + + "'ietf-acl:ipv6-acl-type')"; + uses packet-fields:acl-ip-header-fields; + uses packet-fields:acl-ipv6-header-fields; + container fragment { + description + "Indicates how to handle IPv6 fragments."; + uses fragment-fields; + } + description + "Rule set that matches IPv6 header."; + } + description + "Either IPv4 or IPv6."; + } + choice l4 { + container tcp { + uses packet-fields:acl-tcp-header-fields; + container flags-bitmask { + description + "Indicates how to handle TCP flags."; + uses tcp-flags; + } + uses ports; + description + "Rule set that matches TCP header."; + } + container udp { + uses packet-fields:acl-udp-header-fields; + uses ports; + description + "Rule set that matches UDP header."; + } + container icmp { + uses packet-fields:acl-icmp-header-fields; + description + "Rule set that matches ICMP/ICMPv6 header."; + } + description + "Can be TCP, UDP, or ICMP/ICMPv6"; + } + } + container actions { + description + "Definitions of action for this ACE."; + leaf forwarding { + type identityref { + base ietf-acl:forwarding-action; + } + mandatory true; + description + "Specifies the forwarding action per ACE."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + leaf rate-limit { + when "../forwarding = 'ietf-acl:accept'" { + description + "Rate-limit is valid only when accept action is + used."; + } + type decimal64 { + fraction-digits 2; + } + units "bytes per second"; + description + "Specifies how to rate-limit the traffic."; + } + } + container statistics { + config false; + description + "Aggregate statistics."; + uses ietf-acl:acl-counters; + } + } + } + } + } + + container dots-data { + description + "Main container for DOTS data channel."; + list dots-client { + key "cuid"; + description + "List of DOTS clients."; + leaf cuid { + type string; + description + "A unique identifier that is generated by a DOTS client + to prevent request collisions."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + leaf cdid { + type string; + description + "A client domain identifier conveyed by a + server-domain DOTS gateway to a remote DOTS server."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + container aliases { + description + "Set of aliases that are bound to a DOTS client."; + uses aliases; + } + container acls { + description + "Access lists that are bound to a DOTS client."; + uses access-lists; + } + } + container capabilities { + config false; + description + "Match capabilities"; + leaf-list address-family { + type enumeration { + enum ipv4 { + description + "IPv4 is supported."; + } + enum ipv6 { + description + "IPv6 is supported."; + } + } + description + "Indicates the IP address families supported by + the DOTS server."; + } + leaf-list forwarding-actions { + type identityref { + base ietf-acl:forwarding-action; + } + description + "Supported forwarding action(s)."; + } + leaf rate-limit { + type boolean; + description + "Support of rate-limit action."; + } + leaf-list transport-protocols { + type uint8; + description + "Upper-layer protocol associated with a filtering rule. + + Values are taken from the IANA protocol registry: + https://www.iana.org/assignments/protocol-numbers/ + + For example, this field contains 1 for ICMP, 6 for TCP + 17 for UDP, or 58 for ICMPv6."; + } + container ipv4 { + description + "Indicates IPv4 header fields that are supported to enforce + ACLs."; + leaf dscp { + type boolean; + description + "Support of filtering based on Differentiated Services + Code Point (DSCP)."; + } + leaf ecn { + type boolean; + description + "Support of filtering based on Explicit Congestion + Notification (ECN)."; + } + leaf length { + type boolean; + description + "Support of filtering based on the Total Length."; + } + leaf ttl { + type boolean; + description + "Support of filtering based on the Time to Live (TTL)."; + } + leaf protocol { + type boolean; + description + "Support of filtering based on protocol field."; + } + leaf ihl { + type boolean; + description + "Support of filtering based on the Internet Header + Length (IHL)."; + } + leaf flags { + type boolean; + description + "Support of filtering based on the 'flags'."; + } + leaf offset { + type boolean; + description + "Support of filtering based on the 'offset'."; + } + leaf identification { + type boolean; + description + "Support of filtering based on the 'identification'."; + } + leaf source-prefix { + type boolean; + description + "Support of filtering based on the source prefix."; + } + leaf destination-prefix { + type boolean; + description + "Support of filtering based on the destination prefix."; + } + leaf fragment { + type boolean; + description + "Indicates the capability of a DOTS server to + enforce filters on IPv4 fragments. That is, the match + functionality based on the Layer 3 'fragment' clause + is supported."; + } + } + container ipv6 { + description + "Indicates IPv6 header fields that are supported to enforce + ACLs."; + leaf dscp { + type boolean; + description + "Support of filtering based on DSCP."; + } + leaf ecn { + type boolean; + description + "Support of filtering based on ECN."; + } + leaf length { + type boolean; + description + "Support of filtering based on the Payload Length."; + } + leaf hoplimit { + type boolean; + description + "Support of filtering based on the Hop Limit."; + } + leaf protocol { + type boolean; + description + "Support of filtering based on the Next Header field."; + } + leaf destination-prefix { + type boolean; + description + "Support of filtering based on the destination prefix."; + } + leaf source-prefix { + type boolean; + description + "Support of filtering based on the source prefix."; + } + leaf flow-label { + type boolean; + description + "Support of filtering based on the Flow Label."; + } + leaf fragment { + type boolean; + description + "Indicates the capability of a DOTS server to + enforce filters on IPv6 fragments."; + } + } + container tcp { + description + "Set of TCP fields that are supported by the DOTS server + to enforce filters."; + leaf sequence-number { + type boolean; + description + "Support of filtering based on the TCP sequence number."; + } + leaf acknowledgement-number { + type boolean; + description + "Support of filtering based on the TCP acknowledgement + number."; + } + leaf data-offset { + type boolean; + description + "Support of filtering based on the TCP data-offset."; + } + leaf reserved { + type boolean; + description + "Support of filtering based on the TCP reserved field."; + } + leaf flags { + type boolean; + description + "Support of filtering, as defined in RFC 8519, based + on the TCP flags."; + } + leaf window-size { + type boolean; + description + "Support of filtering based on the TCP window size."; + } + leaf urgent-pointer { + type boolean; + description + "Support of filtering based on the TCP urgent pointer."; + } + leaf options { + type boolean; + description + "Support of filtering based on the TCP options."; + } + leaf flags-bitmask { + type boolean; + description + "Support of filtering based on the TCP flags bitmask."; + } + leaf source-port { + type boolean; + description + "Support of filtering based on the source port number."; + } + leaf destination-port { + type boolean; + description + "Support of filtering based on the destination port + number."; + } + leaf port-range { + type boolean; + description + "Support of filtering based on a port range. + + This includes filtering based on a source port range, + destination port range, or both. All operators + (i.e, less than or equal to, greater than or equal to, + equal to, and not equal to) are supported. + + In particular, this means that the implementation + supports filtering based on + source-port-range-or-operator and + destination-port-range-or-operator."; + } + } + container udp { + description + "Set of UDP fields that are supported by the DOTS server + to enforce filters."; + leaf length { + type boolean; + description + "Support of filtering based on the UDP length."; + } + leaf source-port { + type boolean; + description + "Support of filtering based on the source port number."; + } + leaf destination-port { + type boolean; + description + "Support of filtering based on the destination port + number."; + } + leaf port-range { + type boolean; + description + "Support of filtering based on a port range. + + This includes filtering based on a source port range, + destination port range, or both. All operators + (i.e, less than or equal, greater than or equal, + equal to, and not equal to) are supported. + + In particular, this means that the implementation + supports filtering based on + source-port-range-or-operator and + destination-port-range-or-operator."; + } + } + container icmp { + description + "Set of ICMP/ICMPv6 fields that are supported by the DOTS + server to enforce filters."; + leaf type { + type boolean; + description + "Support of filtering based on the ICMP/ICMPv6 type."; + } + leaf code { + type boolean; + description + "Support of filtering based on the ICMP/ICMPv6 code."; + } + leaf rest-of-header { + type boolean; + description + "Support of filtering based on the ICMP four-byte + field / the ICMPv6 message body."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-dots-data-channel@2020-05-28.yang b/models/ietf/RFC/ietf-dots-data-channel@2020-05-28.yang new file mode 100644 index 0000000000000000000000000000000000000000..a780859c0e9b5f253eb056de9143cddd5f761d84 --- /dev/null +++ b/models/ietf/RFC/ietf-dots-data-channel@2020-05-28.yang @@ -0,0 +1,807 @@ +module ietf-dots-data-channel { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dots-data-channel"; + prefix data-channel; + + import ietf-inet-types { + prefix inet; + reference + "Section 4 of RFC 6991"; + } + import ietf-access-control-list { + prefix ietf-acl; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + import ietf-packet-fields { + prefix packet-fields; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + + organization + "IETF DDoS Open Threat Signaling (DOTS) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/dots/> + WG List: <mailto:dots@ietf.org> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Editor: Konda, Tirumaleswar Reddy.K + <mailto:TirumaleswarReddy_Konda@McAfee.com> + + Author: Jon Shallow + <mailto:jon.shallow@nccgroup.com> + + Author: Kaname Nishizuka + <mailto:kaname@nttv6.jp> + + Author: Liang Xia + <mailto:frank.xialiang@huawei.com> + + Author: Prashanth Patil + <mailto:praspati@cisco.com> + + Author: Andrew Mortensen + <mailto:amortensen@arbor.net> + + Author: Nik Teague + <mailto:nteague@ironmountain.co.uk>"; + description + "This module contains YANG definition for configuring + aliases for resources and filtering rules using DOTS + data channel. + + Copyright (c) 2020 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8783; see + the RFC itself for full legal notices."; + + revision 2020-05-28 { + description + "Initial revision."; + reference + "RFC 8783: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Data Channel Specification"; + } + + typedef activation-type { + type enumeration { + enum activate-when-mitigating { + value 1; + description + "The Access Control List (ACL) is installed only when + a mitigation is active for the DOTS client."; + } + enum immediate { + value 2; + description + "The ACL is immediately activated."; + } + enum deactivate { + value 3; + description + "The ACL is maintained by the DOTS server, but it is + deactivated."; + } + } + description + "Indicates the activation type of an ACL."; + } + + typedef operator { + type bits { + bit not { + position 0; + description + "If set, logical negation of operation."; + } + bit match { + position 1; + description + "Match bit. This is a bitwise match operation + defined as '(data & value) == value'."; + } + bit any { + position 3; + description + "Any bit. This is a match on any of the bits in + bitmask. It evaluates to 'true' if any of the bits + in the value mask are set in the data, + i.e., '(data & value) != 0'."; + } + } + description + "Specifies how to apply the defined bitmask. + 'any' and 'match' bits must not be set simultaneously."; + } + + grouping tcp-flags { + leaf operator { + type operator; + default "match"; + description + "Specifies how to interpret the TCP flags."; + } + leaf bitmask { + type uint16; + mandatory true; + description + "The bitmask matches the last 4 bits of byte 12 + and byte 13 of the TCP header. For clarity, the 4 bits + of byte 12 corresponding to the TCP data offset field + are not included in any matching."; + } + description + "Operations on TCP flags."; + } + + typedef fragment-type { + type bits { + bit df { + position 0; + description + "Don't fragment bit for IPv4. + Must be set to 0 when it appears in an IPv6 filter."; + } + bit isf { + position 1; + description + "Is a fragment."; + } + bit ff { + position 2; + description + "First fragment."; + } + bit lf { + position 3; + description + "Last fragment."; + } + } + description + "Different fragment types to match against."; + } + + grouping target { + description + "Specifies the targets of the mitigation request."; + leaf-list target-prefix { + type inet:ip-prefix; + description + "IPv4 or IPv6 prefix identifying the target."; + } + list target-port-range { + key "lower-port"; + description + "Port range. When only lower-port is + present, it represents a single port number."; + leaf lower-port { + type inet:port-number; + mandatory true; + description + "Lower port number of the port range."; + } + leaf upper-port { + type inet:port-number; + must '. >= ../lower-port' { + error-message + "The upper-port number must be greater than + or equal to the lower-port number."; + } + description + "Upper port number of the port range."; + } + } + leaf-list target-protocol { + type uint8; + description + "Identifies the target protocol number. + + Values are taken from the IANA protocol registry: + https://www.iana.org/assignments/protocol-numbers/ + + For example, 6 for TCP or 17 for UDP."; + } + leaf-list target-fqdn { + type inet:domain-name; + description + "FQDN identifying the target."; + } + leaf-list target-uri { + type inet:uri; + description + "URI identifying the target."; + } + } + + grouping fragment-fields { + leaf operator { + type operator; + default "match"; + description + "Specifies how to interpret the fragment type."; + } + leaf type { + type fragment-type; + mandatory true; + description + "Indicates what fragment type to look for."; + } + description + "Operations on fragment types."; + } + + grouping aliases { + description + "Top-level container for aliases."; + list alias { + key "name"; + description + "List of aliases."; + leaf name { + type string; + description + "The name of the alias."; + } + uses target; + leaf pending-lifetime { + type int32; + units "minutes"; + config false; + description + "Indicates the pending validity lifetime of the alias + entry."; + } + } + } + + grouping ports { + choice source-port { + container source-port-range-or-operator { + uses packet-fields:port-range-or-operator; + description + "Source port definition."; + } + description + "Choice of specifying the source port or referring to + a group of source port numbers."; + } + choice destination-port { + container destination-port-range-or-operator { + uses packet-fields:port-range-or-operator; + description + "Destination port definition."; + } + description + "Choice of specifying a destination port or referring + to a group of destination port numbers."; + } + description + "Choice of specifying a source or destination port numbers."; + } + + grouping access-lists { + description + "Specifies the ordered set of Access Control Lists."; + list acl { + key "name"; + ordered-by user; + description + "An ACL is an ordered list of Access Control Entries (ACE). + Each ACE has a list of match criteria and a list of + actions."; + leaf name { + type string { + length "1..64"; + } + description + "The name of the access list."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + leaf type { + type ietf-acl:acl-type; + description + "Type of access control list. Indicates the primary + intended type of match criteria (e.g., IPv4, IPv6) + used in the list instance."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + leaf activation-type { + type activation-type; + default "activate-when-mitigating"; + description + "Indicates the activation type of an ACL. An ACL can be + deactivated, installed immediately, or installed when + a mitigation is active."; + } + leaf pending-lifetime { + type int32; + units "minutes"; + config false; + description + "Indicates the pending validity lifetime of the ACL + entry."; + } + container aces { + description + "The Access Control Entries container contains + a list of ACEs."; + list ace { + key "name"; + ordered-by user; + description + "List of access list entries."; + leaf name { + type string { + length "1..64"; + } + description + "A unique name identifying this ACE."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + container matches { + description + "The rules in this set determine what fields will be + matched upon before any action is taken on them. + + If no matches are defined in a particular container, + then any packet will match that container. + + If no matches are specified at all in an ACE, then any + packet will match the ACE."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + choice l3 { + container ipv4 { + when "derived-from(../../../../type, " + + "'ietf-acl:ipv4-acl-type')"; + uses packet-fields:acl-ip-header-fields; + uses packet-fields:acl-ipv4-header-fields; + container fragment { + description + "Indicates how to handle IPv4 fragments."; + uses fragment-fields; + } + description + "Rule set that matches IPv4 header."; + } + container ipv6 { + when "derived-from(../../../../type, " + + "'ietf-acl:ipv6-acl-type')"; + uses packet-fields:acl-ip-header-fields; + uses packet-fields:acl-ipv6-header-fields; + container fragment { + description + "Indicates how to handle IPv6 fragments."; + uses fragment-fields; + } + description + "Rule set that matches IPv6 header."; + } + description + "Either IPv4 or IPv6."; + } + choice l4 { + container tcp { + uses packet-fields:acl-tcp-header-fields; + container flags-bitmask { + description + "Indicates how to handle TCP flags."; + uses tcp-flags; + } + uses ports; + description + "Rule set that matches TCP header."; + } + container udp { + uses packet-fields:acl-udp-header-fields; + uses ports; + description + "Rule set that matches UDP header."; + } + container icmp { + uses packet-fields:acl-icmp-header-fields; + description + "Rule set that matches ICMP/ICMPv6 header."; + } + description + "Can be TCP, UDP, or ICMP/ICMPv6"; + } + } + container actions { + description + "Definitions of action for this ACE."; + leaf forwarding { + type identityref { + base ietf-acl:forwarding-action; + } + mandatory true; + description + "Specifies the forwarding action per ACE."; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + leaf rate-limit { + when "../forwarding = 'ietf-acl:accept'" { + description + "Rate-limit is valid only when accept action is + used."; + } + type decimal64 { + fraction-digits 2; + } + units "bytes per second"; + description + "Specifies how to rate-limit the traffic."; + } + } + container statistics { + config false; + description + "Aggregate statistics."; + uses ietf-acl:acl-counters; + } + } + } + } + } + + container dots-data { + description + "Main container for DOTS data channel."; + list dots-client { + key "cuid"; + description + "List of DOTS clients."; + leaf cuid { + type string; + description + "A unique identifier that is generated by a DOTS client + to prevent request collisions."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + leaf cdid { + type string; + description + "A client domain identifier conveyed by a + server-domain DOTS gateway to a remote DOTS server."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + container aliases { + description + "Set of aliases that are bound to a DOTS client."; + uses aliases; + } + container acls { + description + "Access lists that are bound to a DOTS client."; + uses access-lists; + } + } + container capabilities { + config false; + description + "Match capabilities"; + leaf-list address-family { + type enumeration { + enum ipv4 { + description + "IPv4 is supported."; + } + enum ipv6 { + description + "IPv6 is supported."; + } + } + description + "Indicates the IP address families supported by + the DOTS server."; + } + leaf-list forwarding-actions { + type identityref { + base ietf-acl:forwarding-action; + } + description + "Supported forwarding action(s)."; + } + leaf rate-limit { + type boolean; + description + "Support of rate-limit action."; + } + leaf-list transport-protocols { + type uint8; + description + "Upper-layer protocol associated with a filtering rule. + + Values are taken from the IANA protocol registry: + https://www.iana.org/assignments/protocol-numbers/ + + For example, this field contains 1 for ICMP, 6 for TCP + 17 for UDP, or 58 for ICMPv6."; + } + container ipv4 { + description + "Indicates IPv4 header fields that are supported to enforce + ACLs."; + leaf dscp { + type boolean; + description + "Support of filtering based on Differentiated Services + Code Point (DSCP)."; + } + leaf ecn { + type boolean; + description + "Support of filtering based on Explicit Congestion + Notification (ECN)."; + } + leaf length { + type boolean; + description + "Support of filtering based on the Total Length."; + } + leaf ttl { + type boolean; + description + "Support of filtering based on the Time to Live (TTL)."; + } + leaf protocol { + type boolean; + description + "Support of filtering based on protocol field."; + } + leaf ihl { + type boolean; + description + "Support of filtering based on the Internet Header + Length (IHL)."; + } + leaf flags { + type boolean; + description + "Support of filtering based on the 'flags'."; + } + leaf offset { + type boolean; + description + "Support of filtering based on the 'offset'."; + } + leaf identification { + type boolean; + description + "Support of filtering based on the 'identification'."; + } + leaf source-prefix { + type boolean; + description + "Support of filtering based on the source prefix."; + } + leaf destination-prefix { + type boolean; + description + "Support of filtering based on the destination prefix."; + } + leaf fragment { + type boolean; + description + "Indicates the capability of a DOTS server to + enforce filters on IPv4 fragments. That is, the match + functionality based on the Layer 3 'fragment' clause + is supported."; + } + } + container ipv6 { + description + "Indicates IPv6 header fields that are supported to enforce + ACLs."; + leaf dscp { + type boolean; + description + "Support of filtering based on DSCP."; + } + leaf ecn { + type boolean; + description + "Support of filtering based on ECN."; + } + leaf length { + type boolean; + description + "Support of filtering based on the Payload Length."; + } + leaf hoplimit { + type boolean; + description + "Support of filtering based on the Hop Limit."; + } + leaf protocol { + type boolean; + description + "Support of filtering based on the Next Header field."; + } + leaf destination-prefix { + type boolean; + description + "Support of filtering based on the destination prefix."; + } + leaf source-prefix { + type boolean; + description + "Support of filtering based on the source prefix."; + } + leaf flow-label { + type boolean; + description + "Support of filtering based on the Flow Label."; + } + leaf fragment { + type boolean; + description + "Indicates the capability of a DOTS server to + enforce filters on IPv6 fragments."; + } + } + container tcp { + description + "Set of TCP fields that are supported by the DOTS server + to enforce filters."; + leaf sequence-number { + type boolean; + description + "Support of filtering based on the TCP sequence number."; + } + leaf acknowledgement-number { + type boolean; + description + "Support of filtering based on the TCP acknowledgement + number."; + } + leaf data-offset { + type boolean; + description + "Support of filtering based on the TCP data-offset."; + } + leaf reserved { + type boolean; + description + "Support of filtering based on the TCP reserved field."; + } + leaf flags { + type boolean; + description + "Support of filtering, as defined in RFC 8519, based + on the TCP flags."; + } + leaf window-size { + type boolean; + description + "Support of filtering based on the TCP window size."; + } + leaf urgent-pointer { + type boolean; + description + "Support of filtering based on the TCP urgent pointer."; + } + leaf options { + type boolean; + description + "Support of filtering based on the TCP options."; + } + leaf flags-bitmask { + type boolean; + description + "Support of filtering based on the TCP flags bitmask."; + } + leaf source-port { + type boolean; + description + "Support of filtering based on the source port number."; + } + leaf destination-port { + type boolean; + description + "Support of filtering based on the destination port + number."; + } + leaf port-range { + type boolean; + description + "Support of filtering based on a port range. + + This includes filtering based on a source port range, + destination port range, or both. All operators + (i.e, less than or equal to, greater than or equal to, + equal to, and not equal to) are supported. + + In particular, this means that the implementation + supports filtering based on + source-port-range-or-operator and + destination-port-range-or-operator."; + } + } + container udp { + description + "Set of UDP fields that are supported by the DOTS server + to enforce filters."; + leaf length { + type boolean; + description + "Support of filtering based on the UDP length."; + } + leaf source-port { + type boolean; + description + "Support of filtering based on the source port number."; + } + leaf destination-port { + type boolean; + description + "Support of filtering based on the destination port + number."; + } + leaf port-range { + type boolean; + description + "Support of filtering based on a port range. + + This includes filtering based on a source port range, + destination port range, or both. All operators + (i.e, less than or equal, greater than or equal, + equal to, and not equal to) are supported. + + In particular, this means that the implementation + supports filtering based on + source-port-range-or-operator and + destination-port-range-or-operator."; + } + } + container icmp { + description + "Set of ICMP/ICMPv6 fields that are supported by the DOTS + server to enforce filters."; + leaf type { + type boolean; + description + "Support of filtering based on the ICMP/ICMPv6 type."; + } + leaf code { + type boolean; + description + "Support of filtering based on the ICMP/ICMPv6 code."; + } + leaf rest-of-header { + type boolean; + description + "Support of filtering based on the ICMP four-byte + field / the ICMPv6 message body."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-dots-signal-channel.yang b/models/ietf/RFC/ietf-dots-signal-channel.yang new file mode 100644 index 0000000000000000000000000000000000000000..dbb9f3a8e07557274d37a586a6891a822c004533 --- /dev/null +++ b/models/ietf/RFC/ietf-dots-signal-channel.yang @@ -0,0 +1,612 @@ +module ietf-dots-signal-channel { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dots-signal-channel"; + prefix dots-signal; + + import ietf-inet-types { + prefix inet; + reference + "Section 4 of RFC 6991"; + } + import ietf-yang-types { + prefix yang; + reference + "Section 3 of RFC 6991"; + } + import ietf-dots-data-channel { + prefix data-channel; + reference + "RFC 8783: Distributed Denial-of-Service Open Threat Signaling + (DOTS) Data Channel Specification"; + } + import iana-dots-signal-channel { + prefix iana-dots-signal; + reference + "RFC 9132: Distributed Denial-of-Service Open Threat Signaling + (DOTS) Signal Channel Specification"; + } + import ietf-yang-structure-ext { + prefix sx; + reference + "RFC 8791: YANG Data Structure Extensions"; + } + + organization + "IETF DDoS Open Threat Signaling (DOTS) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/dots/> + WG List: <mailto:dots@ietf.org> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Editor: Jon Shallow + <mailto:supjps-ietf@jpshallow.com> + + Author: Konda, Tirumaleswar Reddy.K + <mailto:kondtir@gmail.com> + + Author: Prashanth Patil + <mailto:praspati@cisco.com> + + Author: Andrew Mortensen + <mailto:amortensen@arbor.net> + + Author: Nik Teague + <mailto:nteague@ironmountain.co.uk>"; + description + "This module contains YANG definition for the signaling + messages exchanged between a DOTS client and a DOTS server. + + Copyright (c) 2021 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9132; see + the RFC itself for full legal notices."; + + revision 2021-09-02 { + description + "Updated revision to comply with RFC 8791. + + This version is not backward compatible with the version + published in RFC 8782."; + reference + "RFC 9132: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + revision 2020-05-28 { + description + "Initial revision."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + /* + * Groupings + */ + + grouping mitigation-scope { + description + "Specifies the scope of the mitigation request."; + list scope { + description + "The scope of the request."; + uses data-channel:target; + leaf-list alias-name { + type string; + description + "An alias name that points to a resource."; + } + leaf lifetime { + type union { + type uint32; + type int32 { + range "-1"; + } + } + units "seconds"; + default "3600"; + description + "Indicates the lifetime of the mitigation request. + + A lifetime of '0' in a mitigation request is an + invalid value. + + A lifetime of negative one (-1) indicates indefinite + lifetime for the mitigation request. + + Lifetime is mandatory in a mitigation request. + + The DOTS server must always indicate the actual lifetime + in the response to an accepted mitigation request and the + remaining lifetime in status messages sent to the + DOTS client."; + } + leaf trigger-mitigation { + type boolean; + default "true"; + description + "If set to 'false', DDoS mitigation will not be + triggered unless the DOTS signal channel + session is lost."; + } + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf mid { + type uint32; + description + "Mitigation request identifier. + + This identifier must be unique for each mitigation + request bound to the DOTS client."; + } + leaf mitigation-start { + type uint64; + description + "Mitigation start time is represented in seconds + relative to 1970-01-01T00:00:00Z in UTC time. + + This is a mandatory attribute when an attack + mitigation is active. It must not be returned for + a mitigation with 'status' code set to 8."; + } + leaf status { + type iana-dots-signal:status; + description + "Indicates the status of a mitigation request. + It must be included in responses only. + + This is a mandatory attribute if a mitigation + request is accepted and processed by the server."; + } + container conflict-information { + description + "Indicates that a conflict is detected."; + leaf conflict-status { + type iana-dots-signal:conflict-status; + description + "Indicates the conflict status."; + } + leaf conflict-cause { + type iana-dots-signal:conflict-cause; + description + "Indicates the cause of the conflict."; + } + leaf retry-timer { + type uint32; + units "seconds"; + description + "The DOTS client must not resend the + same request that has a conflict before the expiry + of this timer."; + } + container conflict-scope { + description + "Provides more information about the conflict + scope."; + uses data-channel:target { + when "/dots-signal/scope/conflict-information/" + + "conflict-cause = 'overlapping-targets'"; + } + leaf-list alias-name { + when "../../conflict-cause = 'overlapping-targets'"; + type string; + description + "Conflicting alias-name."; + } + list acl-list { + when "../../conflict-cause =" + + " 'conflict-with-acceptlist'"; + key "acl-name"; + description + "List of conflicting ACLs, as defined in the DOTS + data channel. These ACLs are uniquely defined by + cuid and acl-name."; + leaf acl-name { + type leafref { + path "/data-channel:dots-data" + + "/data-channel:dots-client" + + "/data-channel:acls" + + "/data-channel:acl/data-channel:name"; + } + description + "Reference to the conflicting ACL name bound to + a DOTS client."; + } + leaf acl-type { + type leafref { + path "/data-channel:dots-data" + + "/data-channel:dots-client" + + "/data-channel:acls" + + "/data-channel:acl/data-channel:type"; + } + description + "Reference to the conflicting ACL type bound to + a DOTS client."; + } + } + leaf mid { + when "../../conflict-cause = 'overlapping-targets'"; + type uint32; + description + "Reference to the conflicting 'mid' bound to + the same DOTS client."; + } + } + } + leaf bytes-dropped { + type yang:zero-based-counter64; + units "bytes"; + description + "The total dropped byte count for the mitigation + request since the attack mitigation was triggered. + The count wraps around when it reaches the maximum + value of counter64 for dropped bytes."; + } + leaf bps-dropped { + type yang:gauge64; + units "bytes per second"; + description + "The average number of dropped bytes per second for + the mitigation request since the attack + mitigation was triggered. This should be over + five-minute intervals (that is, measuring bytes + into five-minute buckets and then averaging these + buckets over the time since the mitigation was + triggered)."; + } + leaf pkts-dropped { + type yang:zero-based-counter64; + description + "The total number of dropped packet count for the + mitigation request since the attack mitigation was + triggered. The count wraps around when it reaches + the maximum value of counter64 for dropped packets."; + } + leaf pps-dropped { + type yang:gauge64; + units "packets per second"; + description + "The average number of dropped packets per second + for the mitigation request since the attack + mitigation was triggered. This should be over + five-minute intervals (that is, measuring packets + into five-minute buckets and then averaging these + buckets over the time since the mitigation was + triggered)."; + } + } + case client-to-server-only { + description + "These data nodes appear only in a mitigation message + sent from the client to the server."; + leaf attack-status { + type iana-dots-signal:attack-status; + description + "Indicates the status of an attack as seen by the + DOTS client. + + This is a mandatory attribute when a client + performs an efficacy update."; + } + } + } + } + } + + grouping config-parameters { + description + "Subset of DOTS signal channel session configuration."; + container heartbeat-interval { + description + "DOTS agents regularly send heartbeats to each other + after mutual authentication is successfully + completed in order to keep the DOTS signal channel + open."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value { + type uint16; + units "seconds"; + description + "Maximum acceptable heartbeat-interval value."; + } + leaf min-value { + type uint16; + units "seconds"; + description + "Minimum acceptable heartbeat-interval value."; + } + } + } + leaf current-value { + type uint16; + units "seconds"; + default "30"; + description + "Current heartbeat-interval value. + + '0' means that heartbeat mechanism is deactivated."; + } + } + container missing-hb-allowed { + description + "Maximum number of missing heartbeats allowed."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value { + type uint16; + description + "Maximum acceptable missing-hb-allowed value."; + } + leaf min-value { + type uint16; + description + "Minimum acceptable missing-hb-allowed value."; + } + } + } + leaf current-value { + type uint16; + default "15"; + description + "Current missing-hb-allowed value."; + } + } + container probing-rate { + description + "The limit for sending Non-confirmable messages with + no response."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value { + type uint16; + units "byte/second"; + description + "Maximum acceptable probing-rate value."; + } + leaf min-value { + type uint16; + units "byte/second"; + description + "Minimum acceptable probing-rate value."; + } + } + } + leaf current-value { + type uint16; + units "byte/second"; + default "5"; + description + "Current probing-rate value."; + } + } + container max-retransmit { + description + "Maximum number of retransmissions of a Confirmable + message."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value { + type uint16; + description + "Maximum acceptable max-retransmit value."; + } + leaf min-value { + type uint16; + description + "Minimum acceptable max-retransmit value."; + } + } + } + leaf current-value { + type uint16; + default "3"; + description + "Current max-retransmit value."; + } + } + container ack-timeout { + description + "Initial retransmission timeout value."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + description + "Maximum ack-timeout value."; + } + leaf min-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + description + "Minimum ack-timeout value."; + } + } + } + leaf current-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + default "2"; + description + "Current ack-timeout value."; + } + } + container ack-random-factor { + description + "Random factor used to influence the timing of + retransmissions."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value-decimal { + type decimal64 { + fraction-digits 2; + } + description + "Maximum acceptable ack-random-factor value."; + } + leaf min-value-decimal { + type decimal64 { + fraction-digits 2; + } + description + "Minimum acceptable ack-random-factor value."; + } + } + } + leaf current-value-decimal { + type decimal64 { + fraction-digits 2; + } + default "1.5"; + description + "Current ack-random-factor value."; + } + } + } + + grouping signal-config { + description + "DOTS signal channel session configuration."; + container mitigating-config { + description + "Configuration parameters to use when a mitigation + is active."; + uses config-parameters; + } + container idle-config { + description + "Configuration parameters to use when no mitigation + is active."; + uses config-parameters; + } + } + + grouping redirected-signal { + description + "Grouping for the redirected signaling."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf alt-server { + type inet:domain-name; + mandatory true; + description + "FQDN of an alternate server."; + } + leaf-list alt-server-record { + type inet:ip-address; + description + "List of records for the alternate server."; + } + } + } + } + + /* + * DOTS Signal Channel Structure + */ + + sx:structure dots-signal { + description + "Main structure for DOTS signal message. + + A DOTS signal message can be a mitigation, a configuration, + a redirected, or a heartbeat signal message."; + choice message-type { + description + "Can be a mitigation, a configuration, a redirect, or + a heartbeat message."; + case mitigation-scope { + description + "Mitigation scope of a mitigation message."; + uses mitigation-scope; + } + case signal-config { + description + "Configuration message."; + uses signal-config; + } + case redirected-signal { + description + "Redirected signaling."; + uses redirected-signal; + } + case heartbeat { + description + "DOTS heartbeats."; + leaf peer-hb-status { + type boolean; + mandatory true; + description + "Indicates whether a DOTS agent receives heartbeats + from its peer. The value is set to 'true' if the + DOTS agent is receiving heartbeat messages + from its peer."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-dots-signal-channel@2020-05-28.yang b/models/ietf/RFC/ietf-dots-signal-channel@2020-05-28.yang new file mode 100644 index 0000000000000000000000000000000000000000..4d8eb7d0980d10a752462b0a2754bf0519b0ae12 --- /dev/null +++ b/models/ietf/RFC/ietf-dots-signal-channel@2020-05-28.yang @@ -0,0 +1,530 @@ +module ietf-dots-signal-channel { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dots-signal-channel"; + prefix signal; + + import ietf-inet-types { + prefix inet; + reference + "Section 4 of RFC 6991"; + } + import ietf-yang-types { + prefix yang; + reference + "Section 3 of RFC 6991"; + } + import ietf-dots-data-channel { + prefix ietf-data; + reference + "RFC 8783: Distributed Denial-of-Service Open Threat Signaling + (DOTS) Data Channel Specification"; + } + import iana-dots-signal-channel { + prefix iana-signal; + } + + organization + "IETF DDoS Open Threat Signaling (DOTS) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/dots/> + WG List: <mailto:dots@ietf.org> + + Editor: Konda, Tirumaleswar Reddy.K + <mailto:TirumaleswarReddy_Konda@McAfee.com> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Prashanth Patil + <mailto:praspati@cisco.com> + + Author: Andrew Mortensen + <mailto:amortensen@arbor.net> + + Author: Nik Teague + <mailto:nteague@ironmountain.co.uk>"; + description + "This module contains YANG definition for the signaling + messages exchanged between a DOTS client and a DOTS server. + + Copyright (c) 2020 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8782; see + the RFC itself for full legal notices."; + + revision 2020-05-28 { + description + "Initial revision."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + /* + * Groupings + */ + + grouping mitigation-scope { + description + "Specifies the scope of the mitigation request."; + list scope { + key "cuid mid"; + description + "The scope of the request."; + leaf cdid { + type string; + description + "The cdid should be included by a server-domain + DOTS gateway to propagate the client domain + identification information from the + gateway's client-facing side to the gateway's + server-facing side, and from the gateway's + server-facing side to the DOTS server. + + It may be used by the final DOTS server + for policy enforcement purposes."; + } + leaf cuid { + type string; + description + "A unique identifier that is + generated by a DOTS client to prevent + request collisions. It is expected that the + cuid will remain consistent throughout the + lifetime of the DOTS client."; + } + leaf mid { + type uint32; + description + "Mitigation request identifier. + + This identifier must be unique for each mitigation + request bound to the DOTS client."; + } + uses ietf-data:target; + leaf-list alias-name { + type string; + description + "An alias name that points to a resource."; + } + leaf lifetime { + type int32; + units "seconds"; + default "3600"; + description + "Indicates the lifetime of the mitigation request. + + A lifetime of '0' in a mitigation request is an + invalid value. + + A lifetime of negative one (-1) indicates indefinite + lifetime for the mitigation request."; + } + leaf trigger-mitigation { + type boolean; + default "true"; + description + "If set to 'false', DDoS mitigation will not be + triggered unless the DOTS signal channel + session is lost."; + } + leaf mitigation-start { + type uint64; + config false; + description + "Mitigation start time is represented in seconds + relative to 1970-01-01T00:00:00Z in UTC time."; + } + leaf status { + type iana-signal:status; + config false; + description + "Indicates the status of a mitigation request. + It must be included in responses only."; + } + container conflict-information { + config false; + description + "Indicates that a conflict is detected. + Must only be used for responses."; + leaf conflict-status { + type iana-signal:conflict-status; + description + "Indicates the conflict status."; + } + leaf conflict-cause { + type iana-signal:conflict-cause; + description + "Indicates the cause of the conflict."; + } + leaf retry-timer { + type uint32; + units "seconds"; + description + "The DOTS client must not resend the + same request that has a conflict before the expiry of + this timer."; + } + container conflict-scope { + description + "Provides more information about the conflict scope."; + uses ietf-data:target { + when "/dots-signal/scope/conflict-information/" + + "conflict-cause = 'overlapping-targets'"; + } + leaf-list alias-name { + when "../../conflict-cause = 'overlapping-targets'"; + type string; + description + "Conflicting alias-name."; + } + list acl-list { + when "../../conflict-cause = 'conflict-with-acceptlist'"; + key "acl-name"; + description + "List of conflicting ACLs as defined in the DOTS data + channel. These ACLs are uniquely defined by + cuid and acl-name."; + leaf acl-name { + type leafref { + path "/ietf-data:dots-data/ietf-data:dots-client/" + + "ietf-data:acls/ietf-data:acl/ietf-data:name"; + } + description + "Reference to the conflicting ACL name bound to + a DOTS client."; + } + leaf acl-type { + type leafref { + path "/ietf-data:dots-data/ietf-data:dots-client/" + + "ietf-data:acls/ietf-data:acl/ietf-data:type"; + } + description + "Reference to the conflicting ACL type bound to + a DOTS client."; + } + } + leaf mid { + when "../../conflict-cause = 'overlapping-targets'"; + type leafref { + path "../../../mid"; + } + description + "Reference to the conflicting 'mid' bound to + the same DOTS client."; + } + } + } + leaf bytes-dropped { + type yang:zero-based-counter64; + units "bytes"; + config false; + description + "The total dropped byte count for the mitigation + request since the attack mitigation was triggered. + The count wraps around when it reaches the maximum value + of counter64 for dropped bytes."; + } + leaf bps-dropped { + type yang:gauge64; + config false; + description + "The average number of dropped bits per second for + the mitigation request since the attack + mitigation was triggered. This should be over + five-minute intervals (that is, measuring bytes + into five-minute buckets and then averaging these + buckets over the time since the mitigation was + triggered)."; + } + leaf pkts-dropped { + type yang:zero-based-counter64; + config false; + description + "The total number of dropped packet count for the + mitigation request since the attack mitigation was + triggered. The count wraps around when it reaches + the maximum value of counter64 for dropped packets."; + } + leaf pps-dropped { + type yang:gauge64; + config false; + description + "The average number of dropped packets per second + for the mitigation request since the attack + mitigation was triggered. This should be over + five-minute intervals (that is, measuring packets + into five-minute buckets and then averaging these + buckets over the time since the mitigation was + triggered)."; + } + leaf attack-status { + type iana-signal:attack-status; + description + "Indicates the status of an attack as seen by the + DOTS client."; + } + } + } + + grouping config-parameters { + description + "Subset of DOTS signal channel session configuration."; + container heartbeat-interval { + description + "DOTS agents regularly send heartbeats to each other + after mutual authentication is successfully + completed in order to keep the DOTS signal channel + open."; + leaf max-value { + type uint16; + units "seconds"; + config false; + description + "Maximum acceptable heartbeat-interval value."; + } + leaf min-value { + type uint16; + units "seconds"; + config false; + description + "Minimum acceptable heartbeat-interval value."; + } + leaf current-value { + type uint16; + units "seconds"; + default "30"; + description + "Current heartbeat-interval value. + + '0' means that heartbeat mechanism is deactivated."; + } + } + container missing-hb-allowed { + description + "Maximum number of missing heartbeats allowed."; + leaf max-value { + type uint16; + config false; + description + "Maximum acceptable missing-hb-allowed value."; + } + leaf min-value { + type uint16; + config false; + description + "Minimum acceptable missing-hb-allowed value."; + } + leaf current-value { + type uint16; + default "15"; + description + "Current missing-hb-allowed value."; + } + } + container probing-rate { + description + "The limit for sending Non-confirmable messages with + no response."; + leaf max-value { + type uint16; + units "byte/second"; + config false; + description + "Maximum acceptable probing-rate value."; + } + leaf min-value { + type uint16; + units "byte/second"; + config false; + description + "Minimum acceptable probing-rate value."; + } + leaf current-value { + type uint16; + units "byte/second"; + default "5"; + description + "Current probing-rate value."; + } + } + container max-retransmit { + description + "Maximum number of retransmissions of a Confirmable + message."; + leaf max-value { + type uint16; + config false; + description + "Maximum acceptable max-retransmit value."; + } + leaf min-value { + type uint16; + config false; + description + "Minimum acceptable max-retransmit value."; + } + leaf current-value { + type uint16; + default "3"; + description + "Current max-retransmit value."; + } + } + container ack-timeout { + description + "Initial retransmission timeout value."; + leaf max-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + config false; + description + "Maximum ack-timeout value."; + } + leaf min-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + config false; + description + "Minimum ack-timeout value."; + } + leaf current-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + default "2"; + description + "Current ack-timeout value."; + } + } + container ack-random-factor { + description + "Random factor used to influence the timing of + retransmissions."; + leaf max-value-decimal { + type decimal64 { + fraction-digits 2; + } + config false; + description + "Maximum acceptable ack-random-factor value."; + } + leaf min-value-decimal { + type decimal64 { + fraction-digits 2; + } + config false; + description + "Minimum acceptable ack-random-factor value."; + } + leaf current-value-decimal { + type decimal64 { + fraction-digits 2; + } + default "1.5"; + description + "Current ack-random-factor value."; + } + } + } + + grouping signal-config { + description + "DOTS signal channel session configuration."; + leaf sid { + type uint32; + mandatory true; + description + "An identifier for the DOTS signal channel + session configuration data."; + } + container mitigating-config { + description + "Configuration parameters to use when a mitigation + is active."; + uses config-parameters; + } + container idle-config { + description + "Configuration parameters to use when no mitigation + is active."; + uses config-parameters; + } + } + + grouping redirected-signal { + description + "Grouping for the redirected signaling."; + leaf alt-server { + type string; + config false; + mandatory true; + description + "FQDN of an alternate server."; + } + leaf-list alt-server-record { + type inet:ip-address; + config false; + description + "List of records for the alternate server."; + } + } + + /* + * Main Container for DOTS Signal Channel + */ + + container dots-signal { + description + "Main container for DOTS signal message. + + A DOTS signal message can be a mitigation, a configuration, + or a redirected signal message."; + choice message-type { + description + "Can be a mitigation, a configuration, or a redirect + message."; + case mitigation-scope { + description + "Mitigation scope of a mitigation message."; + uses mitigation-scope; + } + case signal-config { + description + "Configuration message."; + uses signal-config; + } + case redirected-signal { + description + "Redirected signaling."; + uses redirected-signal; + } + case heartbeat { + description + "DOTS heartbeats."; + leaf peer-hb-status { + type boolean; + mandatory true; + description + "Indicates whether a DOTS agent receives heartbeats + from its peer. The value is set to 'true' if the + DOTS agent is receiving heartbeat messages + from its peer."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-dots-signal-channel@2021-09-02.yang b/models/ietf/RFC/ietf-dots-signal-channel@2021-09-02.yang new file mode 100644 index 0000000000000000000000000000000000000000..dbb9f3a8e07557274d37a586a6891a822c004533 --- /dev/null +++ b/models/ietf/RFC/ietf-dots-signal-channel@2021-09-02.yang @@ -0,0 +1,612 @@ +module ietf-dots-signal-channel { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dots-signal-channel"; + prefix dots-signal; + + import ietf-inet-types { + prefix inet; + reference + "Section 4 of RFC 6991"; + } + import ietf-yang-types { + prefix yang; + reference + "Section 3 of RFC 6991"; + } + import ietf-dots-data-channel { + prefix data-channel; + reference + "RFC 8783: Distributed Denial-of-Service Open Threat Signaling + (DOTS) Data Channel Specification"; + } + import iana-dots-signal-channel { + prefix iana-dots-signal; + reference + "RFC 9132: Distributed Denial-of-Service Open Threat Signaling + (DOTS) Signal Channel Specification"; + } + import ietf-yang-structure-ext { + prefix sx; + reference + "RFC 8791: YANG Data Structure Extensions"; + } + + organization + "IETF DDoS Open Threat Signaling (DOTS) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/dots/> + WG List: <mailto:dots@ietf.org> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Editor: Jon Shallow + <mailto:supjps-ietf@jpshallow.com> + + Author: Konda, Tirumaleswar Reddy.K + <mailto:kondtir@gmail.com> + + Author: Prashanth Patil + <mailto:praspati@cisco.com> + + Author: Andrew Mortensen + <mailto:amortensen@arbor.net> + + Author: Nik Teague + <mailto:nteague@ironmountain.co.uk>"; + description + "This module contains YANG definition for the signaling + messages exchanged between a DOTS client and a DOTS server. + + Copyright (c) 2021 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9132; see + the RFC itself for full legal notices."; + + revision 2021-09-02 { + description + "Updated revision to comply with RFC 8791. + + This version is not backward compatible with the version + published in RFC 8782."; + reference + "RFC 9132: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + revision 2020-05-28 { + description + "Initial revision."; + reference + "RFC 8782: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + /* + * Groupings + */ + + grouping mitigation-scope { + description + "Specifies the scope of the mitigation request."; + list scope { + description + "The scope of the request."; + uses data-channel:target; + leaf-list alias-name { + type string; + description + "An alias name that points to a resource."; + } + leaf lifetime { + type union { + type uint32; + type int32 { + range "-1"; + } + } + units "seconds"; + default "3600"; + description + "Indicates the lifetime of the mitigation request. + + A lifetime of '0' in a mitigation request is an + invalid value. + + A lifetime of negative one (-1) indicates indefinite + lifetime for the mitigation request. + + Lifetime is mandatory in a mitigation request. + + The DOTS server must always indicate the actual lifetime + in the response to an accepted mitigation request and the + remaining lifetime in status messages sent to the + DOTS client."; + } + leaf trigger-mitigation { + type boolean; + default "true"; + description + "If set to 'false', DDoS mitigation will not be + triggered unless the DOTS signal channel + session is lost."; + } + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf mid { + type uint32; + description + "Mitigation request identifier. + + This identifier must be unique for each mitigation + request bound to the DOTS client."; + } + leaf mitigation-start { + type uint64; + description + "Mitigation start time is represented in seconds + relative to 1970-01-01T00:00:00Z in UTC time. + + This is a mandatory attribute when an attack + mitigation is active. It must not be returned for + a mitigation with 'status' code set to 8."; + } + leaf status { + type iana-dots-signal:status; + description + "Indicates the status of a mitigation request. + It must be included in responses only. + + This is a mandatory attribute if a mitigation + request is accepted and processed by the server."; + } + container conflict-information { + description + "Indicates that a conflict is detected."; + leaf conflict-status { + type iana-dots-signal:conflict-status; + description + "Indicates the conflict status."; + } + leaf conflict-cause { + type iana-dots-signal:conflict-cause; + description + "Indicates the cause of the conflict."; + } + leaf retry-timer { + type uint32; + units "seconds"; + description + "The DOTS client must not resend the + same request that has a conflict before the expiry + of this timer."; + } + container conflict-scope { + description + "Provides more information about the conflict + scope."; + uses data-channel:target { + when "/dots-signal/scope/conflict-information/" + + "conflict-cause = 'overlapping-targets'"; + } + leaf-list alias-name { + when "../../conflict-cause = 'overlapping-targets'"; + type string; + description + "Conflicting alias-name."; + } + list acl-list { + when "../../conflict-cause =" + + " 'conflict-with-acceptlist'"; + key "acl-name"; + description + "List of conflicting ACLs, as defined in the DOTS + data channel. These ACLs are uniquely defined by + cuid and acl-name."; + leaf acl-name { + type leafref { + path "/data-channel:dots-data" + + "/data-channel:dots-client" + + "/data-channel:acls" + + "/data-channel:acl/data-channel:name"; + } + description + "Reference to the conflicting ACL name bound to + a DOTS client."; + } + leaf acl-type { + type leafref { + path "/data-channel:dots-data" + + "/data-channel:dots-client" + + "/data-channel:acls" + + "/data-channel:acl/data-channel:type"; + } + description + "Reference to the conflicting ACL type bound to + a DOTS client."; + } + } + leaf mid { + when "../../conflict-cause = 'overlapping-targets'"; + type uint32; + description + "Reference to the conflicting 'mid' bound to + the same DOTS client."; + } + } + } + leaf bytes-dropped { + type yang:zero-based-counter64; + units "bytes"; + description + "The total dropped byte count for the mitigation + request since the attack mitigation was triggered. + The count wraps around when it reaches the maximum + value of counter64 for dropped bytes."; + } + leaf bps-dropped { + type yang:gauge64; + units "bytes per second"; + description + "The average number of dropped bytes per second for + the mitigation request since the attack + mitigation was triggered. This should be over + five-minute intervals (that is, measuring bytes + into five-minute buckets and then averaging these + buckets over the time since the mitigation was + triggered)."; + } + leaf pkts-dropped { + type yang:zero-based-counter64; + description + "The total number of dropped packet count for the + mitigation request since the attack mitigation was + triggered. The count wraps around when it reaches + the maximum value of counter64 for dropped packets."; + } + leaf pps-dropped { + type yang:gauge64; + units "packets per second"; + description + "The average number of dropped packets per second + for the mitigation request since the attack + mitigation was triggered. This should be over + five-minute intervals (that is, measuring packets + into five-minute buckets and then averaging these + buckets over the time since the mitigation was + triggered)."; + } + } + case client-to-server-only { + description + "These data nodes appear only in a mitigation message + sent from the client to the server."; + leaf attack-status { + type iana-dots-signal:attack-status; + description + "Indicates the status of an attack as seen by the + DOTS client. + + This is a mandatory attribute when a client + performs an efficacy update."; + } + } + } + } + } + + grouping config-parameters { + description + "Subset of DOTS signal channel session configuration."; + container heartbeat-interval { + description + "DOTS agents regularly send heartbeats to each other + after mutual authentication is successfully + completed in order to keep the DOTS signal channel + open."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value { + type uint16; + units "seconds"; + description + "Maximum acceptable heartbeat-interval value."; + } + leaf min-value { + type uint16; + units "seconds"; + description + "Minimum acceptable heartbeat-interval value."; + } + } + } + leaf current-value { + type uint16; + units "seconds"; + default "30"; + description + "Current heartbeat-interval value. + + '0' means that heartbeat mechanism is deactivated."; + } + } + container missing-hb-allowed { + description + "Maximum number of missing heartbeats allowed."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value { + type uint16; + description + "Maximum acceptable missing-hb-allowed value."; + } + leaf min-value { + type uint16; + description + "Minimum acceptable missing-hb-allowed value."; + } + } + } + leaf current-value { + type uint16; + default "15"; + description + "Current missing-hb-allowed value."; + } + } + container probing-rate { + description + "The limit for sending Non-confirmable messages with + no response."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value { + type uint16; + units "byte/second"; + description + "Maximum acceptable probing-rate value."; + } + leaf min-value { + type uint16; + units "byte/second"; + description + "Minimum acceptable probing-rate value."; + } + } + } + leaf current-value { + type uint16; + units "byte/second"; + default "5"; + description + "Current probing-rate value."; + } + } + container max-retransmit { + description + "Maximum number of retransmissions of a Confirmable + message."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value { + type uint16; + description + "Maximum acceptable max-retransmit value."; + } + leaf min-value { + type uint16; + description + "Minimum acceptable max-retransmit value."; + } + } + } + leaf current-value { + type uint16; + default "3"; + description + "Current max-retransmit value."; + } + } + container ack-timeout { + description + "Initial retransmission timeout value."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + description + "Maximum ack-timeout value."; + } + leaf min-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + description + "Minimum ack-timeout value."; + } + } + } + leaf current-value-decimal { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + default "2"; + description + "Current ack-timeout value."; + } + } + container ack-random-factor { + description + "Random factor used to influence the timing of + retransmissions."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf max-value-decimal { + type decimal64 { + fraction-digits 2; + } + description + "Maximum acceptable ack-random-factor value."; + } + leaf min-value-decimal { + type decimal64 { + fraction-digits 2; + } + description + "Minimum acceptable ack-random-factor value."; + } + } + } + leaf current-value-decimal { + type decimal64 { + fraction-digits 2; + } + default "1.5"; + description + "Current ack-random-factor value."; + } + } + } + + grouping signal-config { + description + "DOTS signal channel session configuration."; + container mitigating-config { + description + "Configuration parameters to use when a mitigation + is active."; + uses config-parameters; + } + container idle-config { + description + "Configuration parameters to use when no mitigation + is active."; + uses config-parameters; + } + } + + grouping redirected-signal { + description + "Grouping for the redirected signaling."; + choice direction { + description + "Indicates the communication direction in which the + data nodes can be included."; + case server-to-client-only { + description + "These data nodes appear only in a mitigation message + sent from the server to the client."; + leaf alt-server { + type inet:domain-name; + mandatory true; + description + "FQDN of an alternate server."; + } + leaf-list alt-server-record { + type inet:ip-address; + description + "List of records for the alternate server."; + } + } + } + } + + /* + * DOTS Signal Channel Structure + */ + + sx:structure dots-signal { + description + "Main structure for DOTS signal message. + + A DOTS signal message can be a mitigation, a configuration, + a redirected, or a heartbeat signal message."; + choice message-type { + description + "Can be a mitigation, a configuration, a redirect, or + a heartbeat message."; + case mitigation-scope { + description + "Mitigation scope of a mitigation message."; + uses mitigation-scope; + } + case signal-config { + description + "Configuration message."; + uses signal-config; + } + case redirected-signal { + description + "Redirected signaling."; + uses redirected-signal; + } + case heartbeat { + description + "DOTS heartbeats."; + leaf peer-hb-status { + type boolean; + mandatory true; + description + "Indicates whether a DOTS agent receives heartbeats + from its peer. The value is set to 'true' if the + DOTS agent is receiving heartbeat messages + from its peer."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-dots-signal-control@2021-09-02.yang b/models/ietf/RFC/ietf-dots-signal-control@2021-09-02.yang new file mode 100644 index 0000000000000000000000000000000000000000..2ab1c3f00845341744413aae102b24dfa2cfc8e1 --- /dev/null +++ b/models/ietf/RFC/ietf-dots-signal-control@2021-09-02.yang @@ -0,0 +1,103 @@ +module ietf-dots-signal-control { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dots-signal-control"; + prefix dots-control; + + import ietf-dots-signal-channel { + prefix dots-signal; + reference + "RFC 9132: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Signal Channel Specification"; + } + + import ietf-yang-structure-ext { + prefix sx; + reference + "RFC 8791: YANG Data Structure Extensions"; + } + + import ietf-dots-data-channel { + prefix data-channel; + reference + "RFC 8783: Distributed Denial-of-Service Open Threat + Signaling (DOTS) Data Channel Specification"; + } + + organization + "IETF DDoS Open Threat Signaling (DOTS) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/dots/> + WG List: <mailto:dots@ietf.org> + + Author: Kaname Nishizuka + <mailto:kaname@nttv6.jp> + + Author: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Tirumaleswar Reddy.K + <mailto:kondtir@gmail.com> + + Author: Takahiko Nagata + <mailto:nagata@lepidum.co.jp>"; + + description + "This module contains YANG definition for the signaling + messages exchanged between a DOTS client and a DOTS server + to control, by means of the DOTS signal channel, filtering + rules configured using the DOTS data channel. + + Copyright (c) 2021 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 Simplified 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 9133; see + the RFC itself for full legal notices."; + + revision 2021-09-02 { + description + "Initial revision."; + reference + "RFC 9133: Controlling Filtering Rules Using Distributed + Denial-of-Service Open Threat Signaling (DOTS) + Signal Channel"; + } + + sx:augment-structure "/dots-signal:dots-signal" + + "/dots-signal:message-type" + + "/dots-signal:mitigation-scope" + + "/dots-signal:scope" { + + description + "ACL name and activation type."; + + list acl-list { + key "acl-name"; + description + "List of ACLs as defined using the DOTS data + channel. ACLs bound to a DOTS client are uniquely + identified by a name."; + leaf acl-name { + type leafref { + path "/data-channel:dots-data/data-channel:dots-client" + + "/data-channel:acls/data-channel:acl" + + "/data-channel:name"; + } + description + "Reference to the ACL name bound to a DOTS client."; + } + leaf activation-type { + type data-channel:activation-type; + default "activate-when-mitigating"; + description + "Sets the activation type of an ACL."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-dslite@2019-01-10.yang b/models/ietf/RFC/ietf-dslite@2019-01-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..bfb042fd6f69d5aeb20db4001542387ff23937ad --- /dev/null +++ b/models/ietf/RFC/ietf-dslite@2019-01-10.yang @@ -0,0 +1,354 @@ +module ietf-dslite { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dslite"; + prefix dslite; + + import ietf-inet-types { + prefix inet; + reference + "Section 4 of RFC 6991"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import iana-if-type { + prefix ianaift; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + import ietf-nat { + prefix nat; + reference + "RFC 8512: A YANG Module for Network Address Translation (NAT) + and Network Prefix Translation (NPT)"; + } + import ietf-yang-types { + prefix yang; + reference + "Section 3 of RFC 6991"; + } + + organization + "IETF Softwire Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/softwire/> + WG List: <mailto:softwires@ietf.org> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Christian Jacquenet + <mailto:christian.jacquenet@orange.com> + + Author: Senthil Sivakumar + <mailto:ssenthil@cisco.com>"; + + description + "This module is a YANG module for DS-Lite AFTR and B4 + implementations. + + Copyright (c) 2018 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8513; see + the RFC itself for full legal notices."; + + revision 2019-01-10 { + description + "Initial revision."; + reference + "RFC 8513: A YANG Data Model for Dual-Stack Lite (DS-Lite)"; + } + + identity dslite { + base ianaift:tunnel; + description + "DS-Lite tunnel."; + } + + /* + * Features + */ + + feature b4 { + description + "The B4 element is a function implemented on a dual-stack-capable + node, either a directly connected device or Customer Premises + Equipment (CPE), that creates a tunnel to an AFTR."; + reference + "Section 5 of RFC 6333"; + } + feature aftr { + description + "An AFTR element is the combination of an IPv4-in-IPv6 tunnel + endpoint and an IPv4-IPv4 NAT implemented on the same node."; + reference + "Section 6 of RFC 6333"; + } + + /* + * Augments + */ + + augment "/if:interfaces/if:interface" { + when 'derived-from(if:type, "dslite")'; + description + "Augments Interface module with DS-Lite parameters. + + IANA interface types are maintained at this registry: + <https://www.iana.org/assignments/ianaiftype-mib/>. + + tunnel (131), -- Encapsulation interface"; + leaf ipv6-address { + type inet:ipv6-address; + description + "IPv6 address of the local DS-Lite endpoint (AFTR or B4)."; + reference + "RFC 6333: Dual-Stack Lite Broadband Deployments Following + IPv4 Exhaustion"; + } + leaf ipv4-address { + type inet:ipv4-address; + description + "IPv4 address of the local DS-Lite AFTR or B4. + + 192.0.0.1 is reserved for the AFTR element, while + 192.0.0.0/29 is reserved for the B4 element. + + This address can be used to report ICMP problems and will + appear in traceroute outputs."; + reference + "RFC 6333: Dual-Stack Lite Broadband Deployments Following + IPv4 Exhaustion"; + } + leaf aftr-ipv6-addr { + if-feature "b4"; + type inet:ipv6-address; + description + "Indicates the AFTR's IPv6 address to be used by a B4 + element."; + reference + "RFC 6333: Dual-Stack Lite Broadband Deployments Following + IPv4 Exhaustion"; + } + leaf tunnel-mtu { + type uint16; + description + "Configures a tunnel MTU. + + RFC 6908 specifies that since fragmentation and reassembly + are not optimal, the operator should do everything possible + to eliminate the need for them. If the operator uses simple + IPv4-in-IPv6 softwire, it is recommended that the MTU size + of the IPv6 network between the B4 and the AFTR account + for the additional overhead (40 bytes)."; + reference + "RFC 6908: Deployment Considerations for Dual-Stack Lite"; + } + leaf v6-v4-dscp-preservation { + type boolean; + description + "Copies the DSCP value from the IPv6 header, and vice versa. + + According to Section 2.10 of RFC 6908, operators should + use the uniform model by provisioning the network such + that the AFTR/B4 copies the DSCP value in the IPv4 header + to the Traffic Class field in the IPv6 header, after the + IPv4-in-IPv6 encapsulation."; + reference + "Section 2.10 of RFC 6908"; + } + } + + augment "/nat:nat/nat:instances/nat:instance/nat:policy" { + when "derived-from-or-self(/nat:nat/nat:instances/nat:instance" + + "/nat:type, 'nat:napt44')" + + " and /nat:nat/nat:instances/nat:instance/" + + "nat:per-interface-binding='dslite'"; + if-feature "aftr"; + description + "Augments the NAPT44 module with AFTR parameters."; + leaf max-softwires-per-subscriber { + type uint8; + default "1"; + description + "Configures the maximum softwires per subscriber feature. + + A subscriber is uniquely identified by means + of a subscriber-mask (subscriber-mask-v6). + + This policy aims to prevent a misbehaving subscriber from + mounting several DS-Lite softwires that would consume + additional AFTR resources (e.g., get more external ports + if the quota was enforced on a per-softwire basis and + consume extra processing due to a large number of active + softwires)."; + reference + "Section 4 of RFC 7785"; + } + leaf state-migrate { + type boolean; + default "true"; + description + "State migration is enabled by default. + + In the event a new IPv6 address is assigned to the B4 element, + the AFTR should migrate existing state to be bound to the new + IPv6 address. This operation ensures that traffic destined to + the previous B4's IPv6 address will be redirected to the newer + B4's IPv6 address. The destination IPv6 address for tunneling + return traffic from the AFTR should be the last seen as the + B4's IPv6 source address from the user device (e.g., CPE). + + The AFTR uses the subscriber-mask-v6 to determine whether two + IPv6 addresses belong to the same CPE (e.g., if the + subscriber-mask-v6 is set to 56, the AFTR concludes that + 2001:db8:100:100::1 and 2001:db8:100:100::2 belong to the same + CPE assigned with 2001:db8:100:100::/56)."; + reference + "RFC 7785: Recommendations for Prefix Binding in the Context + of Softwire Dual-Stack Lite"; + } + leaf b4-address-change-limit { + type uint32; + units "seconds"; + default "1800"; + description + "Minimum number of seconds between a successive B4's IPv6 + address change from the same prefix. + + Changing the source B4's IPv6 address may be used as an attack + vector. Packets with a new B4's IPv6 address from the same + prefix should be rate-limited. + + It is recommended that this rate limit be set to 30 minutes; + other values can be set on a per-deployment basis."; + reference + "RFC 7785: Recommendations for Prefix Binding in the Context + of Softwire Dual-Stack Lite"; + } + container mss-clamping { + description + "MSS rewriting configuration to avoid IPv6 fragmentation."; + leaf enable { + type boolean; + description + "Enable/disable MSS rewriting feature."; + } + leaf mss-value { + type uint16; + units "octets"; + description + "Sets the MSS value to be used for MSS rewriting."; + } + } + } + + augment "/nat:nat/nat:instances/nat:instance" + + "/nat:mapping-table/nat:mapping-entry" { + when "derived-from-or-self(/nat:nat/nat:instances/nat:instance" + + "/nat:type, 'nat:napt44')" + + "and /nat:nat/nat:instances/nat:instance" + + "/nat:per-interface-binding='dslite'"; + if-feature "aftr"; + description + "Augments the NAPT44 mapping table with DS-Lite specifics."; + container b4-ipv6-address { + description + "Records the IPv6 address used by a B4 element and the last + time that address changed."; + leaf address { + type inet:ipv6-address; + description + "Corresponds to the IPv6 address used by a B4 element."; + reference + "RFC 6333: Dual-Stack Lite Broadband Deployments Following + IPv4 Exhaustion"; + } + leaf last-address-change { + type yang:date-and-time; + description + "Records the last time that the address changed."; + } + } + leaf v6-dscp { + when "/if:interfaces/if:interface" + + "/dslite:v6-v4-dscp-preservation = 'true'"; + type inet:dscp; + description + "DSCP value used at the softwire level (i.e., IPv6 header)."; + } + leaf internal-v4-dscp { + when "/if:interfaces/if:interface" + + "/dslite:v6-v4-dscp-preservation = 'true'"; + type inet:dscp; + description + "DSCP value of the encapsulated IPv4 packet."; + } + leaf external-v4-dscp { + when "/if:interfaces/if:interface" + + "/dslite:v6-v4-dscp-preservation = 'true'"; + type inet:dscp; + description + "DSCP value of the translated IPv4 packet as marked by + the AFTR."; + } + } + + augment "/nat:nat/nat:instances/nat:instance" + + "/nat:statistics/nat:mappings-statistics" { + if-feature "aftr"; + description + "Indicates the number of active softwires."; + leaf active-softwires { + type yang:gauge32; + description + "The number of currently active softwires on the AFTR + instance."; + } + } + + /* + * Notifications + */ + + notification b4-address-change-limit-policy-violation { + if-feature "aftr"; + description + "Generates notifications when a B4 unsuccessfully attempts + to change the IPv6 address in a time shorter than the value + of b4-address-change-limit. + Notifications are rate-limited (notify-interval)."; + leaf id { + type leafref { + path "/nat:nat/nat:instances/nat:instance/nat:id"; + } + mandatory true; + description + "NAT instance identifier."; + } + leaf policy-id { + type leafref { + path "/nat:nat/nat:instances/nat:instance/nat:policy/nat:id"; + } + mandatory true; + description + "Policy identifier."; + } + leaf address { + type inet:ipv6-address; + mandatory true; + description + "B4's IPv6 address."; + } + } +} diff --git a/models/ietf/RFC/ietf-ethertypes.yang b/models/ietf/RFC/ietf-ethertypes.yang new file mode 100644 index 0000000000000000000000000000000000000000..fd055074aeba5c277bbefdce0b81ebd24d0d3551 --- /dev/null +++ b/models/ietf/RFC/ietf-ethertypes.yang @@ -0,0 +1,381 @@ +module ietf-ethertypes { + namespace "urn:ietf:params:xml:ns:yang:ietf-ethertypes"; + prefix ethertypes; + + organization + "IETF NETMOD (Network Modeling) Working Group."; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Mahesh Jethanandani + <mjethanandani@gmail.com>"; + + description + "This module contains common definitions for the + Ethertype used by different modules. It is a + placeholder module, till such time that IEEE + starts a project to define these Ethertypes + and publishes a standard. + + At that time, this module can be deprecated. + + Copyright (c) 2019 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8519; see + the RFC itself for full legal notices."; + + revision 2019-03-04 { + description + "Initial revision."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + typedef ethertype { + type union { + type uint16; + type enumeration { + enum ipv4 { + value 2048; + description + "Internet Protocol version 4 (IPv4) with a + hex value of 0x0800."; + reference + "RFC 791: Internet Protocol."; + } + enum arp { + value 2054; + description + "Address Resolution Protocol (ARP) with a + hex value of 0x0806."; + reference + "RFC 826: An Ethernet Address Resolution Protocol: Or + Converting Network Protocol Addresses to 48.bit + Ethernet Address for Transmission on Ethernet + Hardware."; + } + enum wlan { + value 2114; + description + "Wake-on-LAN. Hex value of 0x0842."; + } + enum trill { + value 8947; + description + "Transparent Interconnection of Lots of Links. + Hex value of 0x22F3."; + reference + "RFC 6325: Routing Bridges (RBridges): Base Protocol + Specification."; + } + enum srp { + value 8938; + description + "Stream Reservation Protocol. Hex value of + 0x22EA."; + reference + "IEEE 801.1Q-2011."; + } + enum decnet { + value 24579; + description + "DECnet Phase IV. Hex value of 0x6003."; + } + enum rarp { + value 32821; + description + "Reverse Address Resolution Protocol. + Hex value 0x8035."; + reference + "RFC 903: A Reverse Address Resolution Protocol."; + } + enum appletalk { + value 32923; + description + "Appletalk (Ethertalk). Hex value of 0x809B."; + } + enum aarp { + value 33011; + description + "Appletalk Address Resolution Protocol. Hex value + of 0x80F3."; + } + enum vlan { + value 33024; + description + "VLAN-tagged frame (IEEE 802.1Q) and Shortest Path + Bridging IEEE 802.1aq with Network-Network + Interface (NNI) compatibility. Hex value of + 0x8100."; + reference + "IEEE 802.1Q."; + } + enum ipx { + value 33079; + description + "Internetwork Packet Exchange (IPX). Hex value + of 0x8137."; + } + enum qnx { + value 33284; + description + "QNX Qnet. Hex value of 0x8204."; + } + enum ipv6 { + value 34525; + description + "Internet Protocol Version 6 (IPv6). Hex value + of 0x86DD."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + RFC 8201: Path MTU Discovery for IP version 6."; + } + enum efc { + value 34824; + description + "Ethernet flow control using pause frames. + Hex value of 0x8808."; + reference + "IEEE 802.1Qbb."; + } + enum esp { + value 34825; + description + "Ethernet Slow Protocol. Hex value of 0x8809."; + reference + "IEEE 802.3-2015."; + } + enum cobranet { + value 34841; + description + "CobraNet. Hex value of 0x8819."; + } + enum mpls-unicast { + value 34887; + description + "Multiprotocol Label Switching (MPLS) unicast traffic. + Hex value of 0x8847."; + reference + "RFC 3031: Multiprotocol Label Switching Architecture."; + } + enum mpls-multicast { + value 34888; + description + "MPLS multicast traffic. Hex value of 0x8848."; + reference + "RFC 3031: Multiprotocol Label Switching Architecture."; + } + enum pppoe-discovery { + value 34915; + description + "Point-to-Point Protocol over Ethernet. Used during + the discovery process. Hex value of 0x8863."; + reference + "RFC 2516: A Method for Transmitting PPP Over Ethernet + (PPPoE)."; + } + enum pppoe-session { + value 34916; + description + "Point-to-Point Protocol over Ethernet. Used during + session stage. Hex value of 0x8864."; + reference + "RFC 2516: A Method for Transmitting PPP Over Ethernet + (PPPoE)."; + } + enum intel-ans { + value 34925; + description + "Intel Advanced Networking Services. Hex value of + 0x886D."; + } + enum jumbo-frames { + value 34928; + description + "Jumbo frames or Ethernet frames with more than + 1500 bytes of payload, up to 9000 bytes."; + } + enum homeplug { + value 34939; + description + "Family name for the various power line + communications. Hex value of 0x887B."; + } + enum eap { + value 34958; + description + "Ethernet Access Protocol (EAP) over LAN. Hex value + of 0x888E."; + reference + "IEEE 802.1X."; + } + enum profinet { + value 34962; + description + "PROcess FIeld Net (PROFINET). Hex value of 0x8892."; + } + enum hyperscsi { + value 34970; + description + "Small Computer System Interface (SCSI) over Ethernet. + Hex value of 0x889A."; + } + enum aoe { + value 34978; + description + "Advanced Technology Advancement (ATA) over Ethernet. + Hex value of 0x88A2."; + } + enum ethercat { + value 34980; + description + "Ethernet for Control Automation Technology (EtherCAT). + Hex value of 0x88A4."; + } + enum provider-bridging { + value 34984; + description + "Provider Bridging (802.1ad) and Shortest Path Bridging + (801.1aq). Hex value of 0x88A8."; + reference + "IEEE 802.1ad and IEEE 802.1aq)."; + } + enum ethernet-powerlink { + value 34987; + description + "Ethernet Powerlink. Hex value of 0x88AB."; + } + enum goose { + value 35000; + description + "Generic Object Oriented Substation Event (GOOSE). + Hex value of 0x88B8."; + reference + "IEC/ISO 8802-2 and 8802-3."; + } + enum gse { + value 35001; + description + "Generic Substation Events. Hex value of 88B9."; + reference + "IEC 61850."; + } + enum sv { + value 35002; + description + "Sampled Value Transmission. Hex value of 0x88BA."; + reference + "IEC 61850."; + } + enum lldp { + value 35020; + description + "Link Layer Discovery Protocol (LLDP). Hex value of + 0x88CC."; + reference + "IEEE 802.1AB."; + } + enum sercos { + value 35021; + description + "Sercos Interface. Hex value of 0x88CD."; + } + enum wsmp { + value 35036; + description + "WAVE Short Message Protocol (WSMP). Hex value of + 0x88DC."; + } + enum homeplug-av-mme { + value 35041; + description + "HomePlug AV Mobile Management Entity (MME). Hex value + of 88E1."; + } + enum mrp { + value 35043; + description + "Media Redundancy Protocol (MRP). Hex value of + 0x88E3."; + reference + "IEC 62439-2."; + } + enum macsec { + value 35045; + description + "MAC Security. Hex value of 0x88E5."; + reference + "IEEE 802.1AE."; + } + enum pbb { + value 35047; + description + "Provider Backbone Bridges (PBB). Hex value of + 0x88E7."; + reference + "IEEE 802.1ah."; + } + enum cfm { + value 35074; + description + "Connectivity Fault Management (CFM). Hex value of + 0x8902."; + reference + "IEEE 802.1ag."; + } + enum fcoe { + value 35078; + description + "Fiber Channel over Ethernet (FCoE). Hex value of + 0x8906."; + reference + "T11 FC-BB-5."; + } + enum fcoe-ip { + value 35092; + description + "FCoE Initialization Protocol. Hex value of 0x8914."; + } + enum roce { + value 35093; + description + "RDMA over Converged Ethernet (RoCE). Hex value of + 0x8915."; + } + enum tte { + value 35101; + description + "TTEthernet Protocol Control Frame (TTE). Hex value + of 0x891D."; + reference + "SAE AS6802."; + } + enum hsr { + value 35119; + description + "High-availability Seamless Redundancy (HSR). Hex + value of 0x892F."; + reference + "IEC 62439-3:2016."; + } + } + } + description + "The uint16 type placeholder is defined to enable + users to manage their own ethertypes not + covered by the module. Otherwise, the module contains + enum definitions for the more commonly used ethertypes."; + } +} diff --git a/models/ietf/RFC/ietf-ethertypes@2019-03-04.yang b/models/ietf/RFC/ietf-ethertypes@2019-03-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..fd055074aeba5c277bbefdce0b81ebd24d0d3551 --- /dev/null +++ b/models/ietf/RFC/ietf-ethertypes@2019-03-04.yang @@ -0,0 +1,381 @@ +module ietf-ethertypes { + namespace "urn:ietf:params:xml:ns:yang:ietf-ethertypes"; + prefix ethertypes; + + organization + "IETF NETMOD (Network Modeling) Working Group."; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Mahesh Jethanandani + <mjethanandani@gmail.com>"; + + description + "This module contains common definitions for the + Ethertype used by different modules. It is a + placeholder module, till such time that IEEE + starts a project to define these Ethertypes + and publishes a standard. + + At that time, this module can be deprecated. + + Copyright (c) 2019 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8519; see + the RFC itself for full legal notices."; + + revision 2019-03-04 { + description + "Initial revision."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + typedef ethertype { + type union { + type uint16; + type enumeration { + enum ipv4 { + value 2048; + description + "Internet Protocol version 4 (IPv4) with a + hex value of 0x0800."; + reference + "RFC 791: Internet Protocol."; + } + enum arp { + value 2054; + description + "Address Resolution Protocol (ARP) with a + hex value of 0x0806."; + reference + "RFC 826: An Ethernet Address Resolution Protocol: Or + Converting Network Protocol Addresses to 48.bit + Ethernet Address for Transmission on Ethernet + Hardware."; + } + enum wlan { + value 2114; + description + "Wake-on-LAN. Hex value of 0x0842."; + } + enum trill { + value 8947; + description + "Transparent Interconnection of Lots of Links. + Hex value of 0x22F3."; + reference + "RFC 6325: Routing Bridges (RBridges): Base Protocol + Specification."; + } + enum srp { + value 8938; + description + "Stream Reservation Protocol. Hex value of + 0x22EA."; + reference + "IEEE 801.1Q-2011."; + } + enum decnet { + value 24579; + description + "DECnet Phase IV. Hex value of 0x6003."; + } + enum rarp { + value 32821; + description + "Reverse Address Resolution Protocol. + Hex value 0x8035."; + reference + "RFC 903: A Reverse Address Resolution Protocol."; + } + enum appletalk { + value 32923; + description + "Appletalk (Ethertalk). Hex value of 0x809B."; + } + enum aarp { + value 33011; + description + "Appletalk Address Resolution Protocol. Hex value + of 0x80F3."; + } + enum vlan { + value 33024; + description + "VLAN-tagged frame (IEEE 802.1Q) and Shortest Path + Bridging IEEE 802.1aq with Network-Network + Interface (NNI) compatibility. Hex value of + 0x8100."; + reference + "IEEE 802.1Q."; + } + enum ipx { + value 33079; + description + "Internetwork Packet Exchange (IPX). Hex value + of 0x8137."; + } + enum qnx { + value 33284; + description + "QNX Qnet. Hex value of 0x8204."; + } + enum ipv6 { + value 34525; + description + "Internet Protocol Version 6 (IPv6). Hex value + of 0x86DD."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + RFC 8201: Path MTU Discovery for IP version 6."; + } + enum efc { + value 34824; + description + "Ethernet flow control using pause frames. + Hex value of 0x8808."; + reference + "IEEE 802.1Qbb."; + } + enum esp { + value 34825; + description + "Ethernet Slow Protocol. Hex value of 0x8809."; + reference + "IEEE 802.3-2015."; + } + enum cobranet { + value 34841; + description + "CobraNet. Hex value of 0x8819."; + } + enum mpls-unicast { + value 34887; + description + "Multiprotocol Label Switching (MPLS) unicast traffic. + Hex value of 0x8847."; + reference + "RFC 3031: Multiprotocol Label Switching Architecture."; + } + enum mpls-multicast { + value 34888; + description + "MPLS multicast traffic. Hex value of 0x8848."; + reference + "RFC 3031: Multiprotocol Label Switching Architecture."; + } + enum pppoe-discovery { + value 34915; + description + "Point-to-Point Protocol over Ethernet. Used during + the discovery process. Hex value of 0x8863."; + reference + "RFC 2516: A Method for Transmitting PPP Over Ethernet + (PPPoE)."; + } + enum pppoe-session { + value 34916; + description + "Point-to-Point Protocol over Ethernet. Used during + session stage. Hex value of 0x8864."; + reference + "RFC 2516: A Method for Transmitting PPP Over Ethernet + (PPPoE)."; + } + enum intel-ans { + value 34925; + description + "Intel Advanced Networking Services. Hex value of + 0x886D."; + } + enum jumbo-frames { + value 34928; + description + "Jumbo frames or Ethernet frames with more than + 1500 bytes of payload, up to 9000 bytes."; + } + enum homeplug { + value 34939; + description + "Family name for the various power line + communications. Hex value of 0x887B."; + } + enum eap { + value 34958; + description + "Ethernet Access Protocol (EAP) over LAN. Hex value + of 0x888E."; + reference + "IEEE 802.1X."; + } + enum profinet { + value 34962; + description + "PROcess FIeld Net (PROFINET). Hex value of 0x8892."; + } + enum hyperscsi { + value 34970; + description + "Small Computer System Interface (SCSI) over Ethernet. + Hex value of 0x889A."; + } + enum aoe { + value 34978; + description + "Advanced Technology Advancement (ATA) over Ethernet. + Hex value of 0x88A2."; + } + enum ethercat { + value 34980; + description + "Ethernet for Control Automation Technology (EtherCAT). + Hex value of 0x88A4."; + } + enum provider-bridging { + value 34984; + description + "Provider Bridging (802.1ad) and Shortest Path Bridging + (801.1aq). Hex value of 0x88A8."; + reference + "IEEE 802.1ad and IEEE 802.1aq)."; + } + enum ethernet-powerlink { + value 34987; + description + "Ethernet Powerlink. Hex value of 0x88AB."; + } + enum goose { + value 35000; + description + "Generic Object Oriented Substation Event (GOOSE). + Hex value of 0x88B8."; + reference + "IEC/ISO 8802-2 and 8802-3."; + } + enum gse { + value 35001; + description + "Generic Substation Events. Hex value of 88B9."; + reference + "IEC 61850."; + } + enum sv { + value 35002; + description + "Sampled Value Transmission. Hex value of 0x88BA."; + reference + "IEC 61850."; + } + enum lldp { + value 35020; + description + "Link Layer Discovery Protocol (LLDP). Hex value of + 0x88CC."; + reference + "IEEE 802.1AB."; + } + enum sercos { + value 35021; + description + "Sercos Interface. Hex value of 0x88CD."; + } + enum wsmp { + value 35036; + description + "WAVE Short Message Protocol (WSMP). Hex value of + 0x88DC."; + } + enum homeplug-av-mme { + value 35041; + description + "HomePlug AV Mobile Management Entity (MME). Hex value + of 88E1."; + } + enum mrp { + value 35043; + description + "Media Redundancy Protocol (MRP). Hex value of + 0x88E3."; + reference + "IEC 62439-2."; + } + enum macsec { + value 35045; + description + "MAC Security. Hex value of 0x88E5."; + reference + "IEEE 802.1AE."; + } + enum pbb { + value 35047; + description + "Provider Backbone Bridges (PBB). Hex value of + 0x88E7."; + reference + "IEEE 802.1ah."; + } + enum cfm { + value 35074; + description + "Connectivity Fault Management (CFM). Hex value of + 0x8902."; + reference + "IEEE 802.1ag."; + } + enum fcoe { + value 35078; + description + "Fiber Channel over Ethernet (FCoE). Hex value of + 0x8906."; + reference + "T11 FC-BB-5."; + } + enum fcoe-ip { + value 35092; + description + "FCoE Initialization Protocol. Hex value of 0x8914."; + } + enum roce { + value 35093; + description + "RDMA over Converged Ethernet (RoCE). Hex value of + 0x8915."; + } + enum tte { + value 35101; + description + "TTEthernet Protocol Control Frame (TTE). Hex value + of 0x891D."; + reference + "SAE AS6802."; + } + enum hsr { + value 35119; + description + "High-availability Seamless Redundancy (HSR). Hex + value of 0x892F."; + reference + "IEC 62439-3:2016."; + } + } + } + description + "The uint16 type placeholder is defined to enable + users to manage their own ethertypes not + covered by the module. Otherwise, the module contains + enum definitions for the more commonly used ethertypes."; + } +} diff --git a/models/ietf/RFC/ietf-factory-default.yang b/models/ietf/RFC/ietf-factory-default.yang new file mode 100644 index 0000000000000000000000000000000000000000..efed9198895f1be1c6e0386dfdebbc0ea45d2888 --- /dev/null +++ b/models/ietf/RFC/ietf-factory-default.yang @@ -0,0 +1,87 @@ +module ietf-factory-default { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-factory-default"; + prefix fd; + + import ietf-datastores { + prefix ds; + reference + "RFC 8342: Network Management Datastore Architecture + (NMDA)"; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + organization + "IETF Network Modeling (netmod) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Qin Wu + <mailto:bill.wu@huawei.com> + + Editor: Balazs Lengyel + <mailto:balazs.lengyel@ericsson.com> + + Editor: Ye Niu + <mailto:niuye@huawei.com>"; + description + "This module provides functionality to reset a server to its + factory default configuration and, when supported, to + discover the factory default configuration contents + independently of resetting the server. + + Copyright (c) 2020 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 Simplified 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 8808; see the + RFC itself for full legal notices."; + + revision 2020-08-31 { + description + "Initial revision."; + reference + "RFC 8808: A YANG Data Model for Factory Default Settings"; + } + + feature factory-default-datastore { + description + "Indicates that the factory default configuration is + available as a datastore."; + } + + rpc factory-reset { + nacm:default-deny-all; + description + "The server resets all datastores to their factory + default contents and any nonvolatile storage back to + factory condition, deleting all dynamically + generated files, including those containing keys, + certificates, logs, and other temporary files. + + Depending on the factory default configuration, after + being reset, the device may become unreachable on the + network."; + } + + identity factory-default { + if-feature "factory-default-datastore"; + base ds:datastore; + description + "This read-only datastore contains the factory default + configuration for the device that will be used to replace + the contents of the read-write conventional configuration + datastores during a 'factory-reset' RPC operation."; + } +} diff --git a/models/ietf/RFC/ietf-factory-default@2020-08-31.yang b/models/ietf/RFC/ietf-factory-default@2020-08-31.yang new file mode 100644 index 0000000000000000000000000000000000000000..efed9198895f1be1c6e0386dfdebbc0ea45d2888 --- /dev/null +++ b/models/ietf/RFC/ietf-factory-default@2020-08-31.yang @@ -0,0 +1,87 @@ +module ietf-factory-default { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-factory-default"; + prefix fd; + + import ietf-datastores { + prefix ds; + reference + "RFC 8342: Network Management Datastore Architecture + (NMDA)"; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + organization + "IETF Network Modeling (netmod) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Qin Wu + <mailto:bill.wu@huawei.com> + + Editor: Balazs Lengyel + <mailto:balazs.lengyel@ericsson.com> + + Editor: Ye Niu + <mailto:niuye@huawei.com>"; + description + "This module provides functionality to reset a server to its + factory default configuration and, when supported, to + discover the factory default configuration contents + independently of resetting the server. + + Copyright (c) 2020 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 Simplified 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 8808; see the + RFC itself for full legal notices."; + + revision 2020-08-31 { + description + "Initial revision."; + reference + "RFC 8808: A YANG Data Model for Factory Default Settings"; + } + + feature factory-default-datastore { + description + "Indicates that the factory default configuration is + available as a datastore."; + } + + rpc factory-reset { + nacm:default-deny-all; + description + "The server resets all datastores to their factory + default contents and any nonvolatile storage back to + factory condition, deleting all dynamically + generated files, including those containing keys, + certificates, logs, and other temporary files. + + Depending on the factory default configuration, after + being reset, the device may become unreachable on the + network."; + } + + identity factory-default { + if-feature "factory-default-datastore"; + base ds:datastore; + description + "This read-only datastore contains the factory default + configuration for the device that will be used to replace + the contents of the read-write conventional configuration + datastores during a 'factory-reset' RPC operation."; + } +} diff --git a/models/ietf/RFC/ietf-foo.yang b/models/ietf/RFC/ietf-foo.yang new file mode 100644 index 0000000000000000000000000000000000000000..8e0e3e87164d1778525cf67a8d5f89fb8866565c --- /dev/null +++ b/models/ietf/RFC/ietf-foo.yang @@ -0,0 +1,12 @@ +module ietf-foo { + namespace "urn:ietf:params:xml:ns:yang:ietf-foo"; + prefix "foo"; + organization "..."; + contact "..."; + description "..."; + revision 2016-03-20 { + description "Latest revision"; + reference "RFC XXXX: Foo Protocol"; + } + // ... more statements +} diff --git a/models/ietf/RFC/ietf-foo@2016-03-20.yang b/models/ietf/RFC/ietf-foo@2016-03-20.yang new file mode 100644 index 0000000000000000000000000000000000000000..8e0e3e87164d1778525cf67a8d5f89fb8866565c --- /dev/null +++ b/models/ietf/RFC/ietf-foo@2016-03-20.yang @@ -0,0 +1,12 @@ +module ietf-foo { + namespace "urn:ietf:params:xml:ns:yang:ietf-foo"; + prefix "foo"; + organization "..."; + contact "..."; + description "..."; + revision 2016-03-20 { + description "Latest revision"; + reference "RFC XXXX: Foo Protocol"; + } + // ... more statements +} diff --git a/models/ietf/RFC/ietf-hardware-state.yang b/models/ietf/RFC/ietf-hardware-state.yang new file mode 100644 index 0000000000000000000000000000000000000000..ec6742e5562d16bcca93e3b6f6015d66d3e9c196 --- /dev/null +++ b/models/ietf/RFC/ietf-hardware-state.yang @@ -0,0 +1,766 @@ +module ietf-hardware-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-hardware-state"; + prefix hw-state; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import iana-hardware { + prefix ianahw; + } + import ietf-hardware { + prefix hw; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Jie Dong + <mailto:jie.dong@huawei.com> + Editor: Dan Romascanu + <mailto:dromasca@gmail.com>"; + + description + "This module contains a collection of YANG definitions for + monitoring hardware. + + This data model is designed as a temporary solution for + implementations that do not yet support the Network Management + Datastore Architecture (NMDA) defined in RFC 8342. Such an + implementation cannot implement the module 'ietf-hardware' + properly, since without NMDA support, it is not possible to + distinguish between instances of nodes in the running + configuration and operational states. + + The data model in this module is the same as the data model in + 'ietf-hardware', except all nodes are marked as 'config false'. + + If a server that implements this module but doesn't support NMDA + also supports configuration of hardware components, it SHOULD + also implement the module 'ietf-hardware' in the configuration + datastores. The corresponding state data is found in the + '/hw-state:hardware' subtree. + + Copyright (c) 2018 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 Simplified 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 8348; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Features + */ + + feature entity-mib { + status deprecated; + description + "This feature indicates that the device implements + the ENTITY-MIB."; + reference + "RFC 6933: Entity MIB (Version 4)"; + } + + feature hardware-state { + status deprecated; + description + "Indicates that ENTITY-STATE-MIB objects are supported"; + reference + "RFC 4268: Entity State MIB"; + } + + feature hardware-sensor { + status deprecated; + description + "Indicates that ENTITY-SENSOR-MIB objects are supported"; + reference + "RFC 3433: Entity Sensor Management Information Base"; + } + + /* + * Data nodes + */ + + container hardware { + config false; + status deprecated; + description + "Data nodes representing components."; + + leaf last-change { + type yang:date-and-time; + status deprecated; + description + "The time the '/hardware/component' list changed in the + operational state."; + } + + list component { + key name; + status deprecated; + description + "List of components. + When the server detects a new hardware component, it + initializes a list entry in the operational state. + + If the server does not support configuration of hardware + components, list entries in the operational state are + initialized with values for all nodes as detected by the + implementation. + + Otherwise, this procedure is followed: + + 1. If there is an entry in the '/hardware/component' list + in the intended configuration with values for the nodes + 'class', 'parent', and 'parent-rel-pos' that are equal + to the detected values, then: + + 1a. If the configured entry has a value for 'mfg-name' + that is equal to the detected value or if the + 'mfg-name' value cannot be detected, then the list + entry in the operational state is initialized with the + configured values for all configured nodes, including + the 'name'. + + Otherwise, the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. The implementation may raise an + alarm that informs about the 'mfg-name' mismatch + condition. How this is done is outside the scope of + this document. + + 1b. Otherwise (i.e., there is no matching configuration + entry), the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. + + If the '/hardware/component' list in the intended + configuration is modified, then the system MUST behave as if + it re-initializes itself and follow the procedure in (1)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry"; + + leaf name { + type string; + status deprecated; + description + "The name assigned to this component. + + This name is not required to be the same as + entPhysicalName."; + } + + leaf class { + type identityref { + base ianahw:hardware-class; + } + mandatory true; + status deprecated; + description + "An indication of the general hardware type of the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalClass"; + } + + leaf physical-index { + if-feature entity-mib; + type int32 { + range "1..2147483647"; + } + status deprecated; + description + "The entPhysicalIndex for the entPhysicalEntry represented + by this list entry."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; + } + + leaf description { + type string; + status deprecated; + description + "A textual description of the component. This node should + contain a string that identifies the manufacturer's name + for the component and should be set to a distinct value + for each version or model of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr"; + } + + leaf parent { + type leafref { + path "../../component/name"; + require-instance false; + } + status deprecated; + + description + "The name of the component that physically contains this + component. + + If this leaf is not instantiated, it indicates that this + component is not contained in any other component. + + In the event that a physical component is contained by + more than one physical component (e.g., double-wide + modules), this node contains the name of one of these + components. An implementation MUST use the same name + every time this node is instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalContainedIn"; + } + + leaf parent-rel-pos { + type int32 { + range "0 .. 2147483647"; + } + status deprecated; + description + "An indication of the relative position of this child + component among all its sibling components. Sibling + components are defined as components that: + + o share the same value of the 'parent' node and + + o share a common base identity for the 'class' node. + + Note that the last rule gives implementations flexibility + in how components are numbered. For example, some + implementations might have a single number series for all + components derived from 'ianahw:port', while some others + might have different number series for different + components with identities derived from 'ianahw:port' (for + example, one for RJ45 and one for SFP)."; + + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalParentRelPos"; + } + + leaf-list contains-child { + type leafref { + path "../../component/name"; + } + status deprecated; + description + "The name of the contained component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex"; + } + + leaf hardware-rev { + type string; + status deprecated; + description + "The vendor-specific hardware revision string for the + component. The preferred value is the hardware revision + identifier actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalHardwareRev"; + } + + leaf firmware-rev { + type string; + status deprecated; + description + "The vendor-specific firmware revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalFirmwareRev"; + } + + leaf software-rev { + type string; + status deprecated; + description + "The vendor-specific software revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalSoftwareRev"; + } + + leaf serial-num { + type string; + status deprecated; + + description + "The vendor-specific serial number string for the + component. The preferred value is the serial number + string actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum"; + } + + leaf mfg-name { + type string; + status deprecated; + description + "The name of the manufacturer of this physical component. + The preferred value is the manufacturer name string + actually printed on the component itself (if present). + + Note that comparisons between instances of the + 'model-name', 'firmware-rev', 'software-rev', and + 'serial-num' nodes are only meaningful amongst components + with the same value of 'mfg-name'. + + If the manufacturer name string associated with the + physical component is unknown to the server, then this + node is not instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName"; + } + + leaf model-name { + type string; + status deprecated; + description + "The vendor-specific model name identifier string + associated with this physical component. The preferred + value is the customer-visible part number, which may be + printed on the component itself. + + If the model name string associated with the physical + component is unknown to the server, then this node is not + instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName"; + } + + leaf alias { + type string; + status deprecated; + description + "An 'alias' name for the component, as specified by a + network manager, that provides a non-volatile 'handle' for + the component. + + If no configured value exists, the server MAY set the + value of this node to a locally unique value in the + operational state. + + A server implementation MAY map this leaf to the + entPhysicalAlias MIB object. Such an implementation needs + to use some mechanism to handle the differences in size + and characters allowed between this leaf and + entPhysicalAlias. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias"; + } + + leaf asset-id { + type string; + status deprecated; + description + "This node is a user-assigned asset tracking identifier for + the component. + + A server implementation MAY map this leaf to the + entPhysicalAssetID MIB object. Such an implementation + needs to use some mechanism to handle the differences in + size and characters allowed between this leaf and + entPhysicalAssetID. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID"; + } + + leaf is-fru { + type boolean; + status deprecated; + description + "This node indicates whether or not this component is + considered a 'field-replaceable unit' by the vendor. If + this node contains the value 'true', then this component + identifies a field-replaceable unit. For all components + that are permanently contained within a field-replaceable + unit, the value 'false' should be returned for this + node."; + + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU"; + } + + leaf mfg-date { + type yang:date-and-time; + status deprecated; + description + "The date of manufacturing of the managed component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate"; + } + + leaf-list uri { + type inet:uri; + status deprecated; + description + "This node contains identification information about the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUris"; + } + + leaf uuid { + type yang:uuid; + status deprecated; + description + "A Universally Unique Identifier of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID"; + } + + container state { + if-feature hardware-state; + status deprecated; + description + "State-related nodes"; + reference + "RFC 4268: Entity State MIB"; + + leaf state-last-changed { + type yang:date-and-time; + status deprecated; + description + "The date and time when the value of any of the + admin-state, oper-state, usage-state, alarm-state, or + standby-state changed for this component. + + If there has been no change since the last + re-initialization of the local system, this node + contains the date and time of local system + initialization. If there has been no change since the + component was added to the local system, this node + contains the date and time of the insertion."; + reference + "RFC 4268: Entity State MIB - entStateLastChanged"; + } + + leaf admin-state { + type hw:admin-state; + status deprecated; + description + "The administrative state for this component. + + This node refers to a component's administrative + permission to service both other components within its + containment hierarchy as well as other users of its + services defined by means outside the scope of this + module. + + Some components exhibit only a subset of the remaining + administrative state values. Some components cannot be + locked; hence, this node exhibits only the 'unlocked' + state. Other components cannot be shut down gracefully; + hence, this node does not exhibit the 'shutting-down' + state."; + reference + "RFC 4268: Entity State MIB - entStateAdmin"; + } + + leaf oper-state { + type hw:oper-state; + status deprecated; + description + "The operational state for this component. + + Note that this node does not follow the administrative + state. An administrative state of 'down' does not + predict an operational state of 'disabled'. + + Note that some implementations may not be able to + accurately report oper-state while the admin-state node + has a value other than 'unlocked'. In these cases, this + node MUST have a value of 'unknown'."; + reference + "RFC 4268: Entity State MIB - entStateOper"; + } + + leaf usage-state { + type hw:usage-state; + status deprecated; + description + "The usage state for this component. + + This node refers to a component's ability to service + more components in a containment hierarchy. + + Some components will exhibit only a subset of the usage + state values. Components that are unable to ever + service any components within a containment hierarchy + will always have a usage state of 'busy'. In some + cases, a component will be able to support only one + other component within its containment hierarchy and + will therefore only exhibit values of 'idle' and + 'busy'."; + reference + "RFC 4268: Entity State MIB - entStateUsage"; + } + + leaf alarm-state { + type hw:alarm-state; + status deprecated; + description + "The alarm state for this component. It does not + include the alarms raised on child components within its + containment hierarchy."; + reference + "RFC 4268: Entity State MIB - entStateAlarm"; + } + + leaf standby-state { + type hw:standby-state; + status deprecated; + description + "The standby state for this component. + + Some components will exhibit only a subset of the + remaining standby state values. If this component + cannot operate in a standby role, the value of this node + will always be 'providing-service'."; + reference + "RFC 4268: Entity State MIB - entStateStandby"; + } + } + container sensor-data { + when 'derived-from-or-self(../class, + "ianahw:sensor")' { + description + "Sensor data nodes present for any component of type + 'sensor'"; + } + if-feature hardware-sensor; + status deprecated; + + description + "Sensor-related nodes."; + reference + "RFC 3433: Entity Sensor Management Information Base"; + + leaf value { + type hw:sensor-value; + status deprecated; + description + "The most recent measurement obtained by the server + for this sensor. + + A client that periodically fetches this node should also + fetch the nodes 'value-type', 'value-scale', and + 'value-precision', since they may change when the value + is changed."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValue"; + } + + leaf value-type { + type hw:sensor-value-type; + status deprecated; + description + "The type of data units associated with the + sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorType"; + } + + leaf value-scale { + type hw:sensor-value-scale; + status deprecated; + description + "The (power of 10) scaling factor associated + with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorScale"; + } + + leaf value-precision { + type hw:sensor-value-precision; + status deprecated; + description + "The number of decimal places of precision + associated with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorPrecision"; + } + + leaf oper-status { + type hw:sensor-status; + status deprecated; + description + "The operational status of the sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorOperStatus"; + } + + leaf units-display { + type string; + status deprecated; + description + "A textual description of the data units that should be + used in the display of the sensor value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorUnitsDisplay"; + } + + leaf value-timestamp { + type yang:date-and-time; + status deprecated; + description + "The time the status and/or value of this sensor was last + obtained by the server."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueTimeStamp"; + } + + leaf value-update-rate { + type uint32; + units "milliseconds"; + status deprecated; + description + "An indication of the frequency that the server updates + the associated 'value' node, represented in + milliseconds. The value zero indicates: + + - the sensor value is updated on demand (e.g., + when polled by the server for a get-request), + + - the sensor value is updated when the sensor + value changes (event-driven), or + + - the server does not know the update rate."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueUpdateRate"; + } + } + } + } + + /* + * Notifications + */ + + notification hardware-state-change { + status deprecated; + description + "A hardware-state-change notification is generated when the + value of /hardware/last-change changes in the operational + state."; + reference + "RFC 6933: Entity MIB (Version 4) - entConfigChange"; + } + + notification hardware-state-oper-enabled { + if-feature hardware-state; + status deprecated; + description + "A hardware-state-oper-enabled notification signifies that a + component has transitioned into the 'enabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + status deprecated; + description + "The name of the component that has transitioned into the + 'enabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + status deprecated; + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + status deprecated; + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperEnabled"; + } + + notification hardware-state-oper-disabled { + if-feature hardware-state; + status deprecated; + description + "A hardware-state-oper-disabled notification signifies that a + component has transitioned into the 'disabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + status deprecated; + description + "The name of the component that has transitioned into the + 'disabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + status deprecated; + + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + status deprecated; + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperDisabled"; + } + +} diff --git a/models/ietf/RFC/ietf-hardware-state@2018-03-13.yang b/models/ietf/RFC/ietf-hardware-state@2018-03-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..ec6742e5562d16bcca93e3b6f6015d66d3e9c196 --- /dev/null +++ b/models/ietf/RFC/ietf-hardware-state@2018-03-13.yang @@ -0,0 +1,766 @@ +module ietf-hardware-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-hardware-state"; + prefix hw-state; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import iana-hardware { + prefix ianahw; + } + import ietf-hardware { + prefix hw; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Jie Dong + <mailto:jie.dong@huawei.com> + Editor: Dan Romascanu + <mailto:dromasca@gmail.com>"; + + description + "This module contains a collection of YANG definitions for + monitoring hardware. + + This data model is designed as a temporary solution for + implementations that do not yet support the Network Management + Datastore Architecture (NMDA) defined in RFC 8342. Such an + implementation cannot implement the module 'ietf-hardware' + properly, since without NMDA support, it is not possible to + distinguish between instances of nodes in the running + configuration and operational states. + + The data model in this module is the same as the data model in + 'ietf-hardware', except all nodes are marked as 'config false'. + + If a server that implements this module but doesn't support NMDA + also supports configuration of hardware components, it SHOULD + also implement the module 'ietf-hardware' in the configuration + datastores. The corresponding state data is found in the + '/hw-state:hardware' subtree. + + Copyright (c) 2018 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 Simplified 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 8348; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Features + */ + + feature entity-mib { + status deprecated; + description + "This feature indicates that the device implements + the ENTITY-MIB."; + reference + "RFC 6933: Entity MIB (Version 4)"; + } + + feature hardware-state { + status deprecated; + description + "Indicates that ENTITY-STATE-MIB objects are supported"; + reference + "RFC 4268: Entity State MIB"; + } + + feature hardware-sensor { + status deprecated; + description + "Indicates that ENTITY-SENSOR-MIB objects are supported"; + reference + "RFC 3433: Entity Sensor Management Information Base"; + } + + /* + * Data nodes + */ + + container hardware { + config false; + status deprecated; + description + "Data nodes representing components."; + + leaf last-change { + type yang:date-and-time; + status deprecated; + description + "The time the '/hardware/component' list changed in the + operational state."; + } + + list component { + key name; + status deprecated; + description + "List of components. + When the server detects a new hardware component, it + initializes a list entry in the operational state. + + If the server does not support configuration of hardware + components, list entries in the operational state are + initialized with values for all nodes as detected by the + implementation. + + Otherwise, this procedure is followed: + + 1. If there is an entry in the '/hardware/component' list + in the intended configuration with values for the nodes + 'class', 'parent', and 'parent-rel-pos' that are equal + to the detected values, then: + + 1a. If the configured entry has a value for 'mfg-name' + that is equal to the detected value or if the + 'mfg-name' value cannot be detected, then the list + entry in the operational state is initialized with the + configured values for all configured nodes, including + the 'name'. + + Otherwise, the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. The implementation may raise an + alarm that informs about the 'mfg-name' mismatch + condition. How this is done is outside the scope of + this document. + + 1b. Otherwise (i.e., there is no matching configuration + entry), the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. + + If the '/hardware/component' list in the intended + configuration is modified, then the system MUST behave as if + it re-initializes itself and follow the procedure in (1)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry"; + + leaf name { + type string; + status deprecated; + description + "The name assigned to this component. + + This name is not required to be the same as + entPhysicalName."; + } + + leaf class { + type identityref { + base ianahw:hardware-class; + } + mandatory true; + status deprecated; + description + "An indication of the general hardware type of the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalClass"; + } + + leaf physical-index { + if-feature entity-mib; + type int32 { + range "1..2147483647"; + } + status deprecated; + description + "The entPhysicalIndex for the entPhysicalEntry represented + by this list entry."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; + } + + leaf description { + type string; + status deprecated; + description + "A textual description of the component. This node should + contain a string that identifies the manufacturer's name + for the component and should be set to a distinct value + for each version or model of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr"; + } + + leaf parent { + type leafref { + path "../../component/name"; + require-instance false; + } + status deprecated; + + description + "The name of the component that physically contains this + component. + + If this leaf is not instantiated, it indicates that this + component is not contained in any other component. + + In the event that a physical component is contained by + more than one physical component (e.g., double-wide + modules), this node contains the name of one of these + components. An implementation MUST use the same name + every time this node is instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalContainedIn"; + } + + leaf parent-rel-pos { + type int32 { + range "0 .. 2147483647"; + } + status deprecated; + description + "An indication of the relative position of this child + component among all its sibling components. Sibling + components are defined as components that: + + o share the same value of the 'parent' node and + + o share a common base identity for the 'class' node. + + Note that the last rule gives implementations flexibility + in how components are numbered. For example, some + implementations might have a single number series for all + components derived from 'ianahw:port', while some others + might have different number series for different + components with identities derived from 'ianahw:port' (for + example, one for RJ45 and one for SFP)."; + + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalParentRelPos"; + } + + leaf-list contains-child { + type leafref { + path "../../component/name"; + } + status deprecated; + description + "The name of the contained component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex"; + } + + leaf hardware-rev { + type string; + status deprecated; + description + "The vendor-specific hardware revision string for the + component. The preferred value is the hardware revision + identifier actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalHardwareRev"; + } + + leaf firmware-rev { + type string; + status deprecated; + description + "The vendor-specific firmware revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalFirmwareRev"; + } + + leaf software-rev { + type string; + status deprecated; + description + "The vendor-specific software revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalSoftwareRev"; + } + + leaf serial-num { + type string; + status deprecated; + + description + "The vendor-specific serial number string for the + component. The preferred value is the serial number + string actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum"; + } + + leaf mfg-name { + type string; + status deprecated; + description + "The name of the manufacturer of this physical component. + The preferred value is the manufacturer name string + actually printed on the component itself (if present). + + Note that comparisons between instances of the + 'model-name', 'firmware-rev', 'software-rev', and + 'serial-num' nodes are only meaningful amongst components + with the same value of 'mfg-name'. + + If the manufacturer name string associated with the + physical component is unknown to the server, then this + node is not instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName"; + } + + leaf model-name { + type string; + status deprecated; + description + "The vendor-specific model name identifier string + associated with this physical component. The preferred + value is the customer-visible part number, which may be + printed on the component itself. + + If the model name string associated with the physical + component is unknown to the server, then this node is not + instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName"; + } + + leaf alias { + type string; + status deprecated; + description + "An 'alias' name for the component, as specified by a + network manager, that provides a non-volatile 'handle' for + the component. + + If no configured value exists, the server MAY set the + value of this node to a locally unique value in the + operational state. + + A server implementation MAY map this leaf to the + entPhysicalAlias MIB object. Such an implementation needs + to use some mechanism to handle the differences in size + and characters allowed between this leaf and + entPhysicalAlias. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias"; + } + + leaf asset-id { + type string; + status deprecated; + description + "This node is a user-assigned asset tracking identifier for + the component. + + A server implementation MAY map this leaf to the + entPhysicalAssetID MIB object. Such an implementation + needs to use some mechanism to handle the differences in + size and characters allowed between this leaf and + entPhysicalAssetID. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID"; + } + + leaf is-fru { + type boolean; + status deprecated; + description + "This node indicates whether or not this component is + considered a 'field-replaceable unit' by the vendor. If + this node contains the value 'true', then this component + identifies a field-replaceable unit. For all components + that are permanently contained within a field-replaceable + unit, the value 'false' should be returned for this + node."; + + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU"; + } + + leaf mfg-date { + type yang:date-and-time; + status deprecated; + description + "The date of manufacturing of the managed component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate"; + } + + leaf-list uri { + type inet:uri; + status deprecated; + description + "This node contains identification information about the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUris"; + } + + leaf uuid { + type yang:uuid; + status deprecated; + description + "A Universally Unique Identifier of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID"; + } + + container state { + if-feature hardware-state; + status deprecated; + description + "State-related nodes"; + reference + "RFC 4268: Entity State MIB"; + + leaf state-last-changed { + type yang:date-and-time; + status deprecated; + description + "The date and time when the value of any of the + admin-state, oper-state, usage-state, alarm-state, or + standby-state changed for this component. + + If there has been no change since the last + re-initialization of the local system, this node + contains the date and time of local system + initialization. If there has been no change since the + component was added to the local system, this node + contains the date and time of the insertion."; + reference + "RFC 4268: Entity State MIB - entStateLastChanged"; + } + + leaf admin-state { + type hw:admin-state; + status deprecated; + description + "The administrative state for this component. + + This node refers to a component's administrative + permission to service both other components within its + containment hierarchy as well as other users of its + services defined by means outside the scope of this + module. + + Some components exhibit only a subset of the remaining + administrative state values. Some components cannot be + locked; hence, this node exhibits only the 'unlocked' + state. Other components cannot be shut down gracefully; + hence, this node does not exhibit the 'shutting-down' + state."; + reference + "RFC 4268: Entity State MIB - entStateAdmin"; + } + + leaf oper-state { + type hw:oper-state; + status deprecated; + description + "The operational state for this component. + + Note that this node does not follow the administrative + state. An administrative state of 'down' does not + predict an operational state of 'disabled'. + + Note that some implementations may not be able to + accurately report oper-state while the admin-state node + has a value other than 'unlocked'. In these cases, this + node MUST have a value of 'unknown'."; + reference + "RFC 4268: Entity State MIB - entStateOper"; + } + + leaf usage-state { + type hw:usage-state; + status deprecated; + description + "The usage state for this component. + + This node refers to a component's ability to service + more components in a containment hierarchy. + + Some components will exhibit only a subset of the usage + state values. Components that are unable to ever + service any components within a containment hierarchy + will always have a usage state of 'busy'. In some + cases, a component will be able to support only one + other component within its containment hierarchy and + will therefore only exhibit values of 'idle' and + 'busy'."; + reference + "RFC 4268: Entity State MIB - entStateUsage"; + } + + leaf alarm-state { + type hw:alarm-state; + status deprecated; + description + "The alarm state for this component. It does not + include the alarms raised on child components within its + containment hierarchy."; + reference + "RFC 4268: Entity State MIB - entStateAlarm"; + } + + leaf standby-state { + type hw:standby-state; + status deprecated; + description + "The standby state for this component. + + Some components will exhibit only a subset of the + remaining standby state values. If this component + cannot operate in a standby role, the value of this node + will always be 'providing-service'."; + reference + "RFC 4268: Entity State MIB - entStateStandby"; + } + } + container sensor-data { + when 'derived-from-or-self(../class, + "ianahw:sensor")' { + description + "Sensor data nodes present for any component of type + 'sensor'"; + } + if-feature hardware-sensor; + status deprecated; + + description + "Sensor-related nodes."; + reference + "RFC 3433: Entity Sensor Management Information Base"; + + leaf value { + type hw:sensor-value; + status deprecated; + description + "The most recent measurement obtained by the server + for this sensor. + + A client that periodically fetches this node should also + fetch the nodes 'value-type', 'value-scale', and + 'value-precision', since they may change when the value + is changed."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValue"; + } + + leaf value-type { + type hw:sensor-value-type; + status deprecated; + description + "The type of data units associated with the + sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorType"; + } + + leaf value-scale { + type hw:sensor-value-scale; + status deprecated; + description + "The (power of 10) scaling factor associated + with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorScale"; + } + + leaf value-precision { + type hw:sensor-value-precision; + status deprecated; + description + "The number of decimal places of precision + associated with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorPrecision"; + } + + leaf oper-status { + type hw:sensor-status; + status deprecated; + description + "The operational status of the sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorOperStatus"; + } + + leaf units-display { + type string; + status deprecated; + description + "A textual description of the data units that should be + used in the display of the sensor value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorUnitsDisplay"; + } + + leaf value-timestamp { + type yang:date-and-time; + status deprecated; + description + "The time the status and/or value of this sensor was last + obtained by the server."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueTimeStamp"; + } + + leaf value-update-rate { + type uint32; + units "milliseconds"; + status deprecated; + description + "An indication of the frequency that the server updates + the associated 'value' node, represented in + milliseconds. The value zero indicates: + + - the sensor value is updated on demand (e.g., + when polled by the server for a get-request), + + - the sensor value is updated when the sensor + value changes (event-driven), or + + - the server does not know the update rate."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueUpdateRate"; + } + } + } + } + + /* + * Notifications + */ + + notification hardware-state-change { + status deprecated; + description + "A hardware-state-change notification is generated when the + value of /hardware/last-change changes in the operational + state."; + reference + "RFC 6933: Entity MIB (Version 4) - entConfigChange"; + } + + notification hardware-state-oper-enabled { + if-feature hardware-state; + status deprecated; + description + "A hardware-state-oper-enabled notification signifies that a + component has transitioned into the 'enabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + status deprecated; + description + "The name of the component that has transitioned into the + 'enabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + status deprecated; + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + status deprecated; + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperEnabled"; + } + + notification hardware-state-oper-disabled { + if-feature hardware-state; + status deprecated; + description + "A hardware-state-oper-disabled notification signifies that a + component has transitioned into the 'disabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + status deprecated; + description + "The name of the component that has transitioned into the + 'disabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + status deprecated; + + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + status deprecated; + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperDisabled"; + } + +} diff --git a/models/ietf/RFC/ietf-hardware.yang b/models/ietf/RFC/ietf-hardware.yang new file mode 100644 index 0000000000000000000000000000000000000000..4f984b616a61bb169f5ac132c3002ae1033aae7e --- /dev/null +++ b/models/ietf/RFC/ietf-hardware.yang @@ -0,0 +1,1194 @@ +module ietf-hardware { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-hardware"; + prefix hw; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import iana-hardware { + prefix ianahw; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Jie Dong + <mailto:jie.dong@huawei.com> + + Editor: Dan Romascanu + <mailto:dromasca@gmail.com>"; + + description + "This module contains a collection of YANG definitions for + managing hardware. + + This data model is designed for the Network Management Datastore + Architecture (NMDA) defined in RFC 8342. + Copyright (c) 2018 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 Simplified 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 8348; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Features + */ + + feature entity-mib { + description + "This feature indicates that the device implements + the ENTITY-MIB."; + reference + "RFC 6933: Entity MIB (Version 4)"; + } + + feature hardware-state { + description + "Indicates that ENTITY-STATE-MIB objects are supported"; + reference + "RFC 4268: Entity State MIB"; + } + + feature hardware-sensor { + description + "Indicates that ENTITY-SENSOR-MIB objects are supported"; + reference + "RFC 3433: Entity Sensor Management Information Base"; + } + + /* + * Typedefs + */ + + typedef admin-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report administrative state."; + } + enum locked { + value 2; + description + "The resource is administratively prohibited from use."; + } + enum shutting-down { + value 3; + description + "The resource usage is administratively limited to current + instances of use."; + } + enum unlocked { + value 4; + description + "The resource is not administratively prohibited from + use."; + } + } + description + "Represents the various possible administrative states."; + reference + "RFC 4268: Entity State MIB - EntityAdminState"; + } + + typedef oper-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report its operational state."; + } + enum disabled { + value 2; + description + "The resource is totally inoperable."; + } + enum enabled { + value 3; + + description + "The resource is partially or fully operable."; + } + enum testing { + value 4; + description + "The resource is currently being tested and cannot + therefore report whether or not it is operational."; + } + } + description + "Represents the possible values of operational states."; + reference + "RFC 4268: Entity State MIB - EntityOperState"; + } + + typedef usage-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report usage state."; + } + enum idle { + value 2; + description + "The resource is servicing no users."; + } + enum active { + value 3; + description + "The resource is currently in use, and it has sufficient + spare capacity to provide for additional users."; + } + enum busy { + value 4; + description + "The resource is currently in use, but it currently has no + spare capacity to provide for additional users."; + } + } + description + "Represents the possible values of usage states."; + reference + "RFC 4268: Entity State MIB - EntityUsageState"; + } + + typedef alarm-state { + type bits { + bit unknown { + position 0; + description + "The resource is unable to report alarm state."; + } + bit under-repair { + position 1; + description + "The resource is currently being repaired, which, depending + on the implementation, may make the other values in this + bit string not meaningful."; + } + bit critical { + position 2; + description + "One or more critical alarms are active against the + resource."; + } + bit major { + position 3; + description + "One or more major alarms are active against the + resource."; + } + bit minor { + position 4; + description + "One or more minor alarms are active against the + resource."; + } + bit warning { + position 5; + description + "One or more warning alarms are active against the + resource."; + } + bit indeterminate { + position 6; + description + "One or more alarms of whose perceived severity cannot be + determined are active against this resource."; + } + } + description + "Represents the possible values of alarm states. An alarm is a + persistent indication of an error or warning condition. + + When no bits of this attribute are set, then no active alarms + are known against this component and it is not under repair."; + reference + "RFC 4268: Entity State MIB - EntityAlarmStatus"; + } + + typedef standby-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report standby state."; + } + enum hot-standby { + value 2; + description + "The resource is not providing service, but it will be + immediately able to take over the role of the resource to + be backed up, without the need for initialization + activity, and will contain the same information as the + resource to be backed up."; + } + enum cold-standby { + value 3; + description + "The resource is to back up another resource, but it will + not be immediately able to take over the role of a + resource to be backed up and will require some + initialization activity."; + } + enum providing-service { + value 4; + description + "The resource is providing service."; + } + } + description + "Represents the possible values of standby states."; + reference + "RFC 4268: Entity State MIB - EntityStandbyStatus"; + } + + typedef sensor-value-type { + type enumeration { + enum other { + value 1; + description + "A measure other than those listed below."; + } + enum unknown { + value 2; + description + "An unknown measurement or arbitrary, relative numbers"; + } + enum volts-AC { + value 3; + description + "A measure of electric potential (alternating current)."; + } + enum volts-DC { + value 4; + description + "A measure of electric potential (direct current)."; + } + enum amperes { + value 5; + description + "A measure of electric current."; + } + enum watts { + value 6; + description + "A measure of power."; + } + enum hertz { + value 7; + description + "A measure of frequency."; + } + enum celsius { + value 8; + description + "A measure of temperature."; + } + enum percent-RH { + value 9; + description + "A measure of percent relative humidity."; + } + enum rpm { + value 10; + description + "A measure of shaft revolutions per minute."; + } + enum cmm { + value 11; + description + "A measure of cubic meters per minute (airflow)."; + } + enum truth-value { + value 12; + description + "Value is one of 1 (true) or 2 (false)"; + } + } + description + "A node using this data type represents the sensor measurement + data type associated with a physical sensor value. The actual + data units are determined by examining a node of this type + together with the associated sensor-value-scale node. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-scale and type sensor-value-precision. + These three types are used to identify the semantics of a node + of type sensor-value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorDataType"; + } + + typedef sensor-value-scale { + type enumeration { + enum yocto { + value 1; + description + "Data scaling factor of 10^-24."; + } + enum zepto { + value 2; + description + "Data scaling factor of 10^-21."; + } + enum atto { + value 3; + description + "Data scaling factor of 10^-18."; + } + enum femto { + value 4; + description + "Data scaling factor of 10^-15."; + } + enum pico { + value 5; + description + "Data scaling factor of 10^-12."; + } + enum nano { + value 6; + description + "Data scaling factor of 10^-9."; + } + enum micro { + value 7; + description + "Data scaling factor of 10^-6."; + } + enum milli { + value 8; + description + "Data scaling factor of 10^-3."; + } + enum units { + value 9; + description + "Data scaling factor of 10^0."; + } + enum kilo { + value 10; + description + "Data scaling factor of 10^3."; + } + enum mega { + value 11; + description + "Data scaling factor of 10^6."; + } + enum giga { + value 12; + description + "Data scaling factor of 10^9."; + } + enum tera { + value 13; + description + "Data scaling factor of 10^12."; + } + enum peta { + value 14; + description + "Data scaling factor of 10^15."; + } + enum exa { + value 15; + description + "Data scaling factor of 10^18."; + } + enum zetta { + value 16; + description + "Data scaling factor of 10^21."; + } + enum yotta { + value 17; + description + "Data scaling factor of 10^24."; + } + } + description + "A node using this data type represents a data scaling factor, + represented with an International System of Units (SI) prefix. + The actual data units are determined by examining a node of + this type together with the associated sensor-value-type. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type and type sensor-value-precision. + Together, associated nodes of these three types are used to + identify the semantics of a node of type sensor-value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorDataScale"; + } + + typedef sensor-value-precision { + type int8 { + range "-8 .. 9"; + } + description + "A node using this data type represents a sensor value + precision range. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type and type sensor-value-scale. Together, + associated nodes of these three types are used to identify the + semantics of a node of type sensor-value. + + If a node of this type contains a value in the range 1 to 9, + it represents the number of decimal places in the fractional + part of an associated sensor-value fixed-point number. + + If a node of this type contains a value in the range -8 to -1, + it represents the number of accurate digits in the associated + sensor-value fixed-point number. + + The value zero indicates the associated sensor-value node is + not a fixed-point number. + + Server implementers must choose a value for the associated + sensor-value-precision node so that the precision and accuracy + of the associated sensor-value node is correctly indicated. + + For example, a component representing a temperature sensor + that can measure 0 to 100 degrees C in 0.1 degree + increments, +/- 0.05 degrees, would have a + sensor-value-precision value of '1', a sensor-value-scale + value of 'units', and a sensor-value ranging from '0' to + '1000'. The sensor-value would be interpreted as + 'degrees C * 10'."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorPrecision"; + } + + typedef sensor-value { + type int32 { + range "-1000000000 .. 1000000000"; + } + description + "A node using this data type represents a sensor value. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type, type sensor-value-scale, and + type sensor-value-precision. Together, associated nodes of + those three types are used to identify the semantics of a node + of this data type. + + The semantics of a node using this data type are determined by + the value of the associated sensor-value-type node. + + If the associated sensor-value-type node is equal to 'voltsAC', + 'voltsDC', 'amperes', 'watts', 'hertz', 'celsius', or 'cmm', + then a node of this type MUST contain a fixed-point number + ranging from -999,999,999 to +999,999,999. The value + -1000000000 indicates an underflow error. The value + +1000000000 indicates an overflow error. The + sensor-value-precision indicates how many fractional digits + are represented in the associated sensor-value node. + + If the associated sensor-value-type node is equal to + 'percentRH', then a node of this type MUST contain a number + ranging from 0 to 100. + + If the associated sensor-value-type node is equal to 'rpm', + then a node of this type MUST contain a number ranging from + -999,999,999 to +999,999,999. + + If the associated sensor-value-type node is equal to + 'truth-value', then a node of this type MUST contain either the + value 1 (true) or the value 2 (false). + + If the associated sensor-value-type node is equal to 'other' or + 'unknown', then a node of this type MUST contain a number + ranging from -1000000000 to 1000000000."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorValue"; + } + + typedef sensor-status { + type enumeration { + enum ok { + value 1; + description + "Indicates that the server can obtain the sensor value."; + } + enum unavailable { + value 2; + description + "Indicates that the server presently cannot obtain the + sensor value."; + } + enum nonoperational { + value 3; + description + "Indicates that the server believes the sensor is broken. + The sensor could have a hard failure (disconnected wire) + or a soft failure such as out-of-range, jittery, or wildly + fluctuating readings."; + } + } + description + "A node using this data type represents the operational status + of a physical sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorStatus"; + } + + /* + * Data nodes + */ + + container hardware { + description + "Data nodes representing components. + + If the server supports configuration of hardware components, + then this data model is instantiated in the configuration + datastores supported by the server. The leaf-list 'datastore' + for the module 'ietf-hardware' in the YANG library provides + this information."; + + leaf last-change { + type yang:date-and-time; + config false; + description + "The time the '/hardware/component' list changed in the + operational state."; + } + + list component { + key name; + description + "List of components. + + When the server detects a new hardware component, it + initializes a list entry in the operational state. + + If the server does not support configuration of hardware + components, list entries in the operational state are + initialized with values for all nodes as detected by the + implementation. + + Otherwise, this procedure is followed: + + 1. If there is an entry in the '/hardware/component' list + in the intended configuration with values for the nodes + 'class', 'parent', and 'parent-rel-pos' that are equal + to the detected values, then the list entry in the + operational state is initialized with the configured + values, including the 'name'. + + 2. Otherwise (i.e., there is no matching configuration + entry), the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. + + If the '/hardware/component' list in the intended + configuration is modified, then the system MUST behave as if + it re-initializes itself and follow the procedure in (1)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry"; + + leaf name { + type string; + description + "The name assigned to this component. + + This name is not required to be the same as + entPhysicalName."; + } + + leaf class { + type identityref { + base ianahw:hardware-class; + } + mandatory true; + description + "An indication of the general hardware type of the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalClass"; + } + + leaf physical-index { + if-feature entity-mib; + type int32 { + range "1..2147483647"; + } + config false; + description + "The entPhysicalIndex for the entPhysicalEntry represented + by this list entry."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; + } + + leaf description { + type string; + config false; + description + "A textual description of the component. This node should + contain a string that identifies the manufacturer's name + for the component and should be set to a distinct value + for each version or model of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr"; + } + + leaf parent { + type leafref { + path "../../component/name"; + require-instance false; + } + description + "The name of the component that physically contains this + component. + + If this leaf is not instantiated, it indicates that this + component is not contained in any other component. + + In the event that a physical component is contained by + more than one physical component (e.g., double-wide + modules), this node contains the name of one of these + components. An implementation MUST use the same name + every time this node is instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalContainedIn"; + } + + leaf parent-rel-pos { + type int32 { + range "0 .. 2147483647"; + } + description + "An indication of the relative position of this child + component among all its sibling components. Sibling + components are defined as components that: + + o share the same value of the 'parent' node and + + o share a common base identity for the 'class' node. + + Note that the last rule gives implementations flexibility + in how components are numbered. For example, some + implementations might have a single number series for all + components derived from 'ianahw:port', while some others + might have different number series for different + components with identities derived from 'ianahw:port' (for + example, one for registered jack 45 (RJ45) and one for + small form-factor pluggable (SFP))."; + + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalParentRelPos"; + } + + leaf-list contains-child { + type leafref { + path "../../component/name"; + } + config false; + description + "The name of the contained component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex"; + } + + leaf hardware-rev { + type string; + config false; + description + "The vendor-specific hardware revision string for the + component. The preferred value is the hardware revision + identifier actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalHardwareRev"; + } + + leaf firmware-rev { + type string; + config false; + description + "The vendor-specific firmware revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalFirmwareRev"; + } + + leaf software-rev { + type string; + config false; + + description + "The vendor-specific software revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalSoftwareRev"; + } + + leaf serial-num { + type string; + config false; + description + "The vendor-specific serial number string for the + component. The preferred value is the serial number + string actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum"; + } + + leaf mfg-name { + type string; + config false; + description + "The name of the manufacturer of this physical component. + The preferred value is the manufacturer name string + actually printed on the component itself (if present). + + Note that comparisons between instances of the + 'model-name', 'firmware-rev', 'software-rev', and + 'serial-num' nodes are only meaningful amongst components + with the same value of 'mfg-name'. + + If the manufacturer name string associated with the + physical component is unknown to the server, then this + node is not instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName"; + } + + leaf model-name { + type string; + config false; + description + "The vendor-specific model name identifier string + associated with this physical component. The preferred + value is the customer-visible part number, which may be + printed on the component itself. + If the model name string associated with the physical + component is unknown to the server, then this node is not + instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName"; + } + + leaf alias { + type string; + description + "An 'alias' name for the component, as specified by a + network manager, that provides a non-volatile 'handle' for + the component. + + If no configured value exists, the server MAY set the + value of this node to a locally unique value in the + operational state. + + A server implementation MAY map this leaf to the + entPhysicalAlias MIB object. Such an implementation needs + to use some mechanism to handle the differences in size + and characters allowed between this leaf and + entPhysicalAlias. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias"; + } + + leaf asset-id { + type string; + description + "This node is a user-assigned asset tracking identifier for + the component. + + A server implementation MAY map this leaf to the + entPhysicalAssetID MIB object. Such an implementation + needs to use some mechanism to handle the differences in + size and characters allowed between this leaf and + entPhysicalAssetID. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID"; + } + + leaf is-fru { + type boolean; + config false; + + description + "This node indicates whether or not this component is + considered a 'field-replaceable unit' by the vendor. If + this node contains the value 'true', then this component + identifies a field-replaceable unit. For all components + that are permanently contained within a field-replaceable + unit, the value 'false' should be returned for this + node."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU"; + } + + leaf mfg-date { + type yang:date-and-time; + config false; + description + "The date of manufacturing of the managed component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate"; + } + + leaf-list uri { + type inet:uri; + description + "This node contains identification information about the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUris"; + } + + leaf uuid { + type yang:uuid; + config false; + description + "A Universally Unique Identifier of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID"; + } + + container state { + if-feature hardware-state; + description + "State-related nodes"; + reference + "RFC 4268: Entity State MIB"; + + leaf state-last-changed { + type yang:date-and-time; + config false; + description + "The date and time when the value of any of the + admin-state, oper-state, usage-state, alarm-state, or + standby-state changed for this component. + + If there has been no change since the last + re-initialization of the local system, this node + contains the date and time of local system + initialization. If there has been no change since the + component was added to the local system, this node + contains the date and time of the insertion."; + reference + "RFC 4268: Entity State MIB - entStateLastChanged"; + } + + leaf admin-state { + type admin-state; + description + "The administrative state for this component. + + This node refers to a component's administrative + permission to service both other components within its + containment hierarchy as well other users of its + services defined by means outside the scope of this + module. + + Some components exhibit only a subset of the remaining + administrative state values. Some components cannot be + locked; hence, this node exhibits only the 'unlocked' + state. Other components cannot be shut down gracefully; + hence, this node does not exhibit the 'shutting-down' + state."; + reference + "RFC 4268: Entity State MIB - entStateAdmin"; + } + + leaf oper-state { + type oper-state; + config false; + description + "The operational state for this component. + + Note that this node does not follow the administrative + state. An administrative state of 'down' does not + predict an operational state of 'disabled'. + + Note that some implementations may not be able to + accurately report oper-state while the admin-state node + has a value other than 'unlocked'. In these cases, this + node MUST have a value of 'unknown'."; + reference + "RFC 4268: Entity State MIB - entStateOper"; + } + + leaf usage-state { + type usage-state; + config false; + description + "The usage state for this component. + + This node refers to a component's ability to service + more components in a containment hierarchy. + + Some components will exhibit only a subset of the usage + state values. Components that are unable to ever + service any components within a containment hierarchy + will always have a usage state of 'busy'. In some + cases, a component will be able to support only one + other component within its containment hierarchy and + will therefore only exhibit values of 'idle' and + 'busy'."; + reference + "RFC 4268: Entity State MIB - entStateUsage"; + } + + leaf alarm-state { + type alarm-state; + config false; + description + "The alarm state for this component. It does not + include the alarms raised on child components within its + containment hierarchy."; + reference + "RFC 4268: Entity State MIB - entStateAlarm"; + } + + leaf standby-state { + type standby-state; + config false; + description + "The standby state for this component. + + Some components will exhibit only a subset of the + remaining standby state values. If this component + cannot operate in a standby role, the value of this node + will always be 'providing-service'."; + reference + "RFC 4268: Entity State MIB - entStateStandby"; + } + } + + container sensor-data { + when 'derived-from-or-self(../class, + "ianahw:sensor")' { + description + "Sensor data nodes present for any component of type + 'sensor'"; + } + if-feature hardware-sensor; + config false; + + description + "Sensor-related nodes."; + reference + "RFC 3433: Entity Sensor Management Information Base"; + + leaf value { + type sensor-value; + description + "The most recent measurement obtained by the server + for this sensor. + + A client that periodically fetches this node should also + fetch the nodes 'value-type', 'value-scale', and + 'value-precision', since they may change when the value + is changed."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValue"; + } + + leaf value-type { + type sensor-value-type; + description + "The type of data units associated with the + sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorType"; + } + leaf value-scale { + type sensor-value-scale; + description + "The (power of 10) scaling factor associated + with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorScale"; + } + + leaf value-precision { + type sensor-value-precision; + description + "The number of decimal places of precision + associated with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorPrecision"; + } + + leaf oper-status { + type sensor-status; + description + "The operational status of the sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorOperStatus"; + } + + leaf units-display { + type string; + description + "A textual description of the data units that should be + used in the display of the sensor value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorUnitsDisplay"; + } + + leaf value-timestamp { + type yang:date-and-time; + description + "The time the status and/or value of this sensor was last + obtained by the server."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueTimeStamp"; + } + leaf value-update-rate { + type uint32; + units "milliseconds"; + description + "An indication of the frequency that the server updates + the associated 'value' node, represented in + milliseconds. The value zero indicates: + + - the sensor value is updated on demand (e.g., + when polled by the server for a get-request), + + - the sensor value is updated when the sensor + value changes (event-driven), or + + - the server does not know the update rate."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueUpdateRate"; + } + } + } + } + + /* + * Notifications + */ + + notification hardware-state-change { + description + "A hardware-state-change notification is generated when the + value of /hardware/last-change changes in the operational + state."; + reference + "RFC 6933: Entity MIB (Version 4) - entConfigChange"; + } + + notification hardware-state-oper-enabled { + if-feature hardware-state; + description + "A hardware-state-oper-enabled notification signifies that a + component has transitioned into the 'enabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + + description + "The name of the component that has transitioned into the + 'enabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperEnabled"; + } + + notification hardware-state-oper-disabled { + if-feature hardware-state; + description + "A hardware-state-oper-disabled notification signifies that a + component has transitioned into the 'disabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + description + "The name of the component that has transitioned into the + 'disabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperDisabled"; + } + +} diff --git a/models/ietf/RFC/ietf-hardware@2018-03-13.yang b/models/ietf/RFC/ietf-hardware@2018-03-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..4f984b616a61bb169f5ac132c3002ae1033aae7e --- /dev/null +++ b/models/ietf/RFC/ietf-hardware@2018-03-13.yang @@ -0,0 +1,1194 @@ +module ietf-hardware { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-hardware"; + prefix hw; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import iana-hardware { + prefix ianahw; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Jie Dong + <mailto:jie.dong@huawei.com> + + Editor: Dan Romascanu + <mailto:dromasca@gmail.com>"; + + description + "This module contains a collection of YANG definitions for + managing hardware. + + This data model is designed for the Network Management Datastore + Architecture (NMDA) defined in RFC 8342. + Copyright (c) 2018 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 Simplified 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 8348; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Features + */ + + feature entity-mib { + description + "This feature indicates that the device implements + the ENTITY-MIB."; + reference + "RFC 6933: Entity MIB (Version 4)"; + } + + feature hardware-state { + description + "Indicates that ENTITY-STATE-MIB objects are supported"; + reference + "RFC 4268: Entity State MIB"; + } + + feature hardware-sensor { + description + "Indicates that ENTITY-SENSOR-MIB objects are supported"; + reference + "RFC 3433: Entity Sensor Management Information Base"; + } + + /* + * Typedefs + */ + + typedef admin-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report administrative state."; + } + enum locked { + value 2; + description + "The resource is administratively prohibited from use."; + } + enum shutting-down { + value 3; + description + "The resource usage is administratively limited to current + instances of use."; + } + enum unlocked { + value 4; + description + "The resource is not administratively prohibited from + use."; + } + } + description + "Represents the various possible administrative states."; + reference + "RFC 4268: Entity State MIB - EntityAdminState"; + } + + typedef oper-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report its operational state."; + } + enum disabled { + value 2; + description + "The resource is totally inoperable."; + } + enum enabled { + value 3; + + description + "The resource is partially or fully operable."; + } + enum testing { + value 4; + description + "The resource is currently being tested and cannot + therefore report whether or not it is operational."; + } + } + description + "Represents the possible values of operational states."; + reference + "RFC 4268: Entity State MIB - EntityOperState"; + } + + typedef usage-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report usage state."; + } + enum idle { + value 2; + description + "The resource is servicing no users."; + } + enum active { + value 3; + description + "The resource is currently in use, and it has sufficient + spare capacity to provide for additional users."; + } + enum busy { + value 4; + description + "The resource is currently in use, but it currently has no + spare capacity to provide for additional users."; + } + } + description + "Represents the possible values of usage states."; + reference + "RFC 4268: Entity State MIB - EntityUsageState"; + } + + typedef alarm-state { + type bits { + bit unknown { + position 0; + description + "The resource is unable to report alarm state."; + } + bit under-repair { + position 1; + description + "The resource is currently being repaired, which, depending + on the implementation, may make the other values in this + bit string not meaningful."; + } + bit critical { + position 2; + description + "One or more critical alarms are active against the + resource."; + } + bit major { + position 3; + description + "One or more major alarms are active against the + resource."; + } + bit minor { + position 4; + description + "One or more minor alarms are active against the + resource."; + } + bit warning { + position 5; + description + "One or more warning alarms are active against the + resource."; + } + bit indeterminate { + position 6; + description + "One or more alarms of whose perceived severity cannot be + determined are active against this resource."; + } + } + description + "Represents the possible values of alarm states. An alarm is a + persistent indication of an error or warning condition. + + When no bits of this attribute are set, then no active alarms + are known against this component and it is not under repair."; + reference + "RFC 4268: Entity State MIB - EntityAlarmStatus"; + } + + typedef standby-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report standby state."; + } + enum hot-standby { + value 2; + description + "The resource is not providing service, but it will be + immediately able to take over the role of the resource to + be backed up, without the need for initialization + activity, and will contain the same information as the + resource to be backed up."; + } + enum cold-standby { + value 3; + description + "The resource is to back up another resource, but it will + not be immediately able to take over the role of a + resource to be backed up and will require some + initialization activity."; + } + enum providing-service { + value 4; + description + "The resource is providing service."; + } + } + description + "Represents the possible values of standby states."; + reference + "RFC 4268: Entity State MIB - EntityStandbyStatus"; + } + + typedef sensor-value-type { + type enumeration { + enum other { + value 1; + description + "A measure other than those listed below."; + } + enum unknown { + value 2; + description + "An unknown measurement or arbitrary, relative numbers"; + } + enum volts-AC { + value 3; + description + "A measure of electric potential (alternating current)."; + } + enum volts-DC { + value 4; + description + "A measure of electric potential (direct current)."; + } + enum amperes { + value 5; + description + "A measure of electric current."; + } + enum watts { + value 6; + description + "A measure of power."; + } + enum hertz { + value 7; + description + "A measure of frequency."; + } + enum celsius { + value 8; + description + "A measure of temperature."; + } + enum percent-RH { + value 9; + description + "A measure of percent relative humidity."; + } + enum rpm { + value 10; + description + "A measure of shaft revolutions per minute."; + } + enum cmm { + value 11; + description + "A measure of cubic meters per minute (airflow)."; + } + enum truth-value { + value 12; + description + "Value is one of 1 (true) or 2 (false)"; + } + } + description + "A node using this data type represents the sensor measurement + data type associated with a physical sensor value. The actual + data units are determined by examining a node of this type + together with the associated sensor-value-scale node. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-scale and type sensor-value-precision. + These three types are used to identify the semantics of a node + of type sensor-value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorDataType"; + } + + typedef sensor-value-scale { + type enumeration { + enum yocto { + value 1; + description + "Data scaling factor of 10^-24."; + } + enum zepto { + value 2; + description + "Data scaling factor of 10^-21."; + } + enum atto { + value 3; + description + "Data scaling factor of 10^-18."; + } + enum femto { + value 4; + description + "Data scaling factor of 10^-15."; + } + enum pico { + value 5; + description + "Data scaling factor of 10^-12."; + } + enum nano { + value 6; + description + "Data scaling factor of 10^-9."; + } + enum micro { + value 7; + description + "Data scaling factor of 10^-6."; + } + enum milli { + value 8; + description + "Data scaling factor of 10^-3."; + } + enum units { + value 9; + description + "Data scaling factor of 10^0."; + } + enum kilo { + value 10; + description + "Data scaling factor of 10^3."; + } + enum mega { + value 11; + description + "Data scaling factor of 10^6."; + } + enum giga { + value 12; + description + "Data scaling factor of 10^9."; + } + enum tera { + value 13; + description + "Data scaling factor of 10^12."; + } + enum peta { + value 14; + description + "Data scaling factor of 10^15."; + } + enum exa { + value 15; + description + "Data scaling factor of 10^18."; + } + enum zetta { + value 16; + description + "Data scaling factor of 10^21."; + } + enum yotta { + value 17; + description + "Data scaling factor of 10^24."; + } + } + description + "A node using this data type represents a data scaling factor, + represented with an International System of Units (SI) prefix. + The actual data units are determined by examining a node of + this type together with the associated sensor-value-type. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type and type sensor-value-precision. + Together, associated nodes of these three types are used to + identify the semantics of a node of type sensor-value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorDataScale"; + } + + typedef sensor-value-precision { + type int8 { + range "-8 .. 9"; + } + description + "A node using this data type represents a sensor value + precision range. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type and type sensor-value-scale. Together, + associated nodes of these three types are used to identify the + semantics of a node of type sensor-value. + + If a node of this type contains a value in the range 1 to 9, + it represents the number of decimal places in the fractional + part of an associated sensor-value fixed-point number. + + If a node of this type contains a value in the range -8 to -1, + it represents the number of accurate digits in the associated + sensor-value fixed-point number. + + The value zero indicates the associated sensor-value node is + not a fixed-point number. + + Server implementers must choose a value for the associated + sensor-value-precision node so that the precision and accuracy + of the associated sensor-value node is correctly indicated. + + For example, a component representing a temperature sensor + that can measure 0 to 100 degrees C in 0.1 degree + increments, +/- 0.05 degrees, would have a + sensor-value-precision value of '1', a sensor-value-scale + value of 'units', and a sensor-value ranging from '0' to + '1000'. The sensor-value would be interpreted as + 'degrees C * 10'."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorPrecision"; + } + + typedef sensor-value { + type int32 { + range "-1000000000 .. 1000000000"; + } + description + "A node using this data type represents a sensor value. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type, type sensor-value-scale, and + type sensor-value-precision. Together, associated nodes of + those three types are used to identify the semantics of a node + of this data type. + + The semantics of a node using this data type are determined by + the value of the associated sensor-value-type node. + + If the associated sensor-value-type node is equal to 'voltsAC', + 'voltsDC', 'amperes', 'watts', 'hertz', 'celsius', or 'cmm', + then a node of this type MUST contain a fixed-point number + ranging from -999,999,999 to +999,999,999. The value + -1000000000 indicates an underflow error. The value + +1000000000 indicates an overflow error. The + sensor-value-precision indicates how many fractional digits + are represented in the associated sensor-value node. + + If the associated sensor-value-type node is equal to + 'percentRH', then a node of this type MUST contain a number + ranging from 0 to 100. + + If the associated sensor-value-type node is equal to 'rpm', + then a node of this type MUST contain a number ranging from + -999,999,999 to +999,999,999. + + If the associated sensor-value-type node is equal to + 'truth-value', then a node of this type MUST contain either the + value 1 (true) or the value 2 (false). + + If the associated sensor-value-type node is equal to 'other' or + 'unknown', then a node of this type MUST contain a number + ranging from -1000000000 to 1000000000."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorValue"; + } + + typedef sensor-status { + type enumeration { + enum ok { + value 1; + description + "Indicates that the server can obtain the sensor value."; + } + enum unavailable { + value 2; + description + "Indicates that the server presently cannot obtain the + sensor value."; + } + enum nonoperational { + value 3; + description + "Indicates that the server believes the sensor is broken. + The sensor could have a hard failure (disconnected wire) + or a soft failure such as out-of-range, jittery, or wildly + fluctuating readings."; + } + } + description + "A node using this data type represents the operational status + of a physical sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorStatus"; + } + + /* + * Data nodes + */ + + container hardware { + description + "Data nodes representing components. + + If the server supports configuration of hardware components, + then this data model is instantiated in the configuration + datastores supported by the server. The leaf-list 'datastore' + for the module 'ietf-hardware' in the YANG library provides + this information."; + + leaf last-change { + type yang:date-and-time; + config false; + description + "The time the '/hardware/component' list changed in the + operational state."; + } + + list component { + key name; + description + "List of components. + + When the server detects a new hardware component, it + initializes a list entry in the operational state. + + If the server does not support configuration of hardware + components, list entries in the operational state are + initialized with values for all nodes as detected by the + implementation. + + Otherwise, this procedure is followed: + + 1. If there is an entry in the '/hardware/component' list + in the intended configuration with values for the nodes + 'class', 'parent', and 'parent-rel-pos' that are equal + to the detected values, then the list entry in the + operational state is initialized with the configured + values, including the 'name'. + + 2. Otherwise (i.e., there is no matching configuration + entry), the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. + + If the '/hardware/component' list in the intended + configuration is modified, then the system MUST behave as if + it re-initializes itself and follow the procedure in (1)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry"; + + leaf name { + type string; + description + "The name assigned to this component. + + This name is not required to be the same as + entPhysicalName."; + } + + leaf class { + type identityref { + base ianahw:hardware-class; + } + mandatory true; + description + "An indication of the general hardware type of the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalClass"; + } + + leaf physical-index { + if-feature entity-mib; + type int32 { + range "1..2147483647"; + } + config false; + description + "The entPhysicalIndex for the entPhysicalEntry represented + by this list entry."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; + } + + leaf description { + type string; + config false; + description + "A textual description of the component. This node should + contain a string that identifies the manufacturer's name + for the component and should be set to a distinct value + for each version or model of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr"; + } + + leaf parent { + type leafref { + path "../../component/name"; + require-instance false; + } + description + "The name of the component that physically contains this + component. + + If this leaf is not instantiated, it indicates that this + component is not contained in any other component. + + In the event that a physical component is contained by + more than one physical component (e.g., double-wide + modules), this node contains the name of one of these + components. An implementation MUST use the same name + every time this node is instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalContainedIn"; + } + + leaf parent-rel-pos { + type int32 { + range "0 .. 2147483647"; + } + description + "An indication of the relative position of this child + component among all its sibling components. Sibling + components are defined as components that: + + o share the same value of the 'parent' node and + + o share a common base identity for the 'class' node. + + Note that the last rule gives implementations flexibility + in how components are numbered. For example, some + implementations might have a single number series for all + components derived from 'ianahw:port', while some others + might have different number series for different + components with identities derived from 'ianahw:port' (for + example, one for registered jack 45 (RJ45) and one for + small form-factor pluggable (SFP))."; + + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalParentRelPos"; + } + + leaf-list contains-child { + type leafref { + path "../../component/name"; + } + config false; + description + "The name of the contained component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex"; + } + + leaf hardware-rev { + type string; + config false; + description + "The vendor-specific hardware revision string for the + component. The preferred value is the hardware revision + identifier actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalHardwareRev"; + } + + leaf firmware-rev { + type string; + config false; + description + "The vendor-specific firmware revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalFirmwareRev"; + } + + leaf software-rev { + type string; + config false; + + description + "The vendor-specific software revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalSoftwareRev"; + } + + leaf serial-num { + type string; + config false; + description + "The vendor-specific serial number string for the + component. The preferred value is the serial number + string actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum"; + } + + leaf mfg-name { + type string; + config false; + description + "The name of the manufacturer of this physical component. + The preferred value is the manufacturer name string + actually printed on the component itself (if present). + + Note that comparisons between instances of the + 'model-name', 'firmware-rev', 'software-rev', and + 'serial-num' nodes are only meaningful amongst components + with the same value of 'mfg-name'. + + If the manufacturer name string associated with the + physical component is unknown to the server, then this + node is not instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName"; + } + + leaf model-name { + type string; + config false; + description + "The vendor-specific model name identifier string + associated with this physical component. The preferred + value is the customer-visible part number, which may be + printed on the component itself. + If the model name string associated with the physical + component is unknown to the server, then this node is not + instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName"; + } + + leaf alias { + type string; + description + "An 'alias' name for the component, as specified by a + network manager, that provides a non-volatile 'handle' for + the component. + + If no configured value exists, the server MAY set the + value of this node to a locally unique value in the + operational state. + + A server implementation MAY map this leaf to the + entPhysicalAlias MIB object. Such an implementation needs + to use some mechanism to handle the differences in size + and characters allowed between this leaf and + entPhysicalAlias. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias"; + } + + leaf asset-id { + type string; + description + "This node is a user-assigned asset tracking identifier for + the component. + + A server implementation MAY map this leaf to the + entPhysicalAssetID MIB object. Such an implementation + needs to use some mechanism to handle the differences in + size and characters allowed between this leaf and + entPhysicalAssetID. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID"; + } + + leaf is-fru { + type boolean; + config false; + + description + "This node indicates whether or not this component is + considered a 'field-replaceable unit' by the vendor. If + this node contains the value 'true', then this component + identifies a field-replaceable unit. For all components + that are permanently contained within a field-replaceable + unit, the value 'false' should be returned for this + node."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU"; + } + + leaf mfg-date { + type yang:date-and-time; + config false; + description + "The date of manufacturing of the managed component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate"; + } + + leaf-list uri { + type inet:uri; + description + "This node contains identification information about the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUris"; + } + + leaf uuid { + type yang:uuid; + config false; + description + "A Universally Unique Identifier of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID"; + } + + container state { + if-feature hardware-state; + description + "State-related nodes"; + reference + "RFC 4268: Entity State MIB"; + + leaf state-last-changed { + type yang:date-and-time; + config false; + description + "The date and time when the value of any of the + admin-state, oper-state, usage-state, alarm-state, or + standby-state changed for this component. + + If there has been no change since the last + re-initialization of the local system, this node + contains the date and time of local system + initialization. If there has been no change since the + component was added to the local system, this node + contains the date and time of the insertion."; + reference + "RFC 4268: Entity State MIB - entStateLastChanged"; + } + + leaf admin-state { + type admin-state; + description + "The administrative state for this component. + + This node refers to a component's administrative + permission to service both other components within its + containment hierarchy as well other users of its + services defined by means outside the scope of this + module. + + Some components exhibit only a subset of the remaining + administrative state values. Some components cannot be + locked; hence, this node exhibits only the 'unlocked' + state. Other components cannot be shut down gracefully; + hence, this node does not exhibit the 'shutting-down' + state."; + reference + "RFC 4268: Entity State MIB - entStateAdmin"; + } + + leaf oper-state { + type oper-state; + config false; + description + "The operational state for this component. + + Note that this node does not follow the administrative + state. An administrative state of 'down' does not + predict an operational state of 'disabled'. + + Note that some implementations may not be able to + accurately report oper-state while the admin-state node + has a value other than 'unlocked'. In these cases, this + node MUST have a value of 'unknown'."; + reference + "RFC 4268: Entity State MIB - entStateOper"; + } + + leaf usage-state { + type usage-state; + config false; + description + "The usage state for this component. + + This node refers to a component's ability to service + more components in a containment hierarchy. + + Some components will exhibit only a subset of the usage + state values. Components that are unable to ever + service any components within a containment hierarchy + will always have a usage state of 'busy'. In some + cases, a component will be able to support only one + other component within its containment hierarchy and + will therefore only exhibit values of 'idle' and + 'busy'."; + reference + "RFC 4268: Entity State MIB - entStateUsage"; + } + + leaf alarm-state { + type alarm-state; + config false; + description + "The alarm state for this component. It does not + include the alarms raised on child components within its + containment hierarchy."; + reference + "RFC 4268: Entity State MIB - entStateAlarm"; + } + + leaf standby-state { + type standby-state; + config false; + description + "The standby state for this component. + + Some components will exhibit only a subset of the + remaining standby state values. If this component + cannot operate in a standby role, the value of this node + will always be 'providing-service'."; + reference + "RFC 4268: Entity State MIB - entStateStandby"; + } + } + + container sensor-data { + when 'derived-from-or-self(../class, + "ianahw:sensor")' { + description + "Sensor data nodes present for any component of type + 'sensor'"; + } + if-feature hardware-sensor; + config false; + + description + "Sensor-related nodes."; + reference + "RFC 3433: Entity Sensor Management Information Base"; + + leaf value { + type sensor-value; + description + "The most recent measurement obtained by the server + for this sensor. + + A client that periodically fetches this node should also + fetch the nodes 'value-type', 'value-scale', and + 'value-precision', since they may change when the value + is changed."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValue"; + } + + leaf value-type { + type sensor-value-type; + description + "The type of data units associated with the + sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorType"; + } + leaf value-scale { + type sensor-value-scale; + description + "The (power of 10) scaling factor associated + with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorScale"; + } + + leaf value-precision { + type sensor-value-precision; + description + "The number of decimal places of precision + associated with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorPrecision"; + } + + leaf oper-status { + type sensor-status; + description + "The operational status of the sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorOperStatus"; + } + + leaf units-display { + type string; + description + "A textual description of the data units that should be + used in the display of the sensor value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorUnitsDisplay"; + } + + leaf value-timestamp { + type yang:date-and-time; + description + "The time the status and/or value of this sensor was last + obtained by the server."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueTimeStamp"; + } + leaf value-update-rate { + type uint32; + units "milliseconds"; + description + "An indication of the frequency that the server updates + the associated 'value' node, represented in + milliseconds. The value zero indicates: + + - the sensor value is updated on demand (e.g., + when polled by the server for a get-request), + + - the sensor value is updated when the sensor + value changes (event-driven), or + + - the server does not know the update rate."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueUpdateRate"; + } + } + } + } + + /* + * Notifications + */ + + notification hardware-state-change { + description + "A hardware-state-change notification is generated when the + value of /hardware/last-change changes in the operational + state."; + reference + "RFC 6933: Entity MIB (Version 4) - entConfigChange"; + } + + notification hardware-state-oper-enabled { + if-feature hardware-state; + description + "A hardware-state-oper-enabled notification signifies that a + component has transitioned into the 'enabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + + description + "The name of the component that has transitioned into the + 'enabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperEnabled"; + } + + notification hardware-state-oper-disabled { + if-feature hardware-state; + description + "A hardware-state-oper-disabled notification signifies that a + component has transitioned into the 'disabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + description + "The name of the component that has transitioned into the + 'disabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperDisabled"; + } + +} diff --git a/models/ietf/RFC/ietf-i2nsf-ike.yang b/models/ietf/RFC/ietf-i2nsf-ike.yang new file mode 100644 index 0000000000000000000000000000000000000000..c650c8ee8e73ad8f7da2c8c9aa9ab8293f9c2918 --- /dev/null +++ b/models/ietf/RFC/ietf-i2nsf-ike.yang @@ -0,0 +1,981 @@ +module ietf-i2nsf-ike { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ike"; + prefix nsfike; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + import ietf-i2nsf-ikec { + prefix nsfikec; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control + Model."; + } + + organization + "IETF I2NSF Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> + WG List: <mailto:i2nsf@ietf.org> + + Author: Rafael Marin-Lopez + <mailto:rafa@um.es> + + Author: Gabriel Lopez-Millan + <mailto:gabilm@um.es> + + Author: Fernando Pereniguez-Garcia + <mailto:fernando.pereniguez@cud.upct.es> + "; + description + "This module contains the IPsec IKE case model for the SDN-based + IPsec flow protection service. + + 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. + + Copyright (c) 2021 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9061; see + the RFC itself for full legal notices."; + + revision 2021-07-14 { + description + "Initial version."; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + + typedef ike-spi { + type uint64 { + range "0..max"; + } + description + "Security Parameter Index (SPI)'s IKE SA."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.6."; + } + + typedef autostartup-type { + type enumeration { + enum add { + description + "IKE/IPsec configuration is only loaded into + IKE implementation, but IKE/IPsec SA is not + started."; + } + enum on-demand { + description + "IKE/IPsec configuration is loaded + into IKE implementation. The IPsec policies + are transferred to the NSF, but the + IPsec SAs are not established immediately. + The IKE implementation will negotiate the + IPsec SAs when they are required + (i.e., through an ACQUIRE notification)."; + } + enum start { + description + "IKE/IPsec configuration is loaded + and transferred to the NSF's kernel, and the + IKEv2-based IPsec SAs are established + immediately without waiting for any packet."; + } + } + description + "Different policies to set IPsec SA configuration + into NSF's kernel when IKEv2 implementation has + started."; + } + + typedef fs-group { + type uint16; + description + "DH groups for IKE and IPsec SA rekey."; + reference + "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, + IKEv2 Transform Attribute Types, Transform Type 4 - + Diffie-Hellman Group Transform IDs + RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 3.3.2."; + } + + typedef auth-protocol-type { + type enumeration { + enum ikev2 { + value 2; + description + "IKEv2 authentication protocol. It is the + only one defined right now. An enum is + used for further extensibility."; + } + } + description + "IKE authentication protocol version specified in the + Peer Authorization Database (PAD). It is defined as + enumerated to allow new IKE versions in the + future."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + + typedef auth-method-type { + type enumeration { + enum pre-shared { + description + "Select pre-shared key as the + authentication method."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + enum eap { + description + "Select the Extensible Authentication Protocol (EAP) as + the authentication method."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + enum digital-signature { + description + "Select digital signature as the authentication method."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2) + RFC 7427: Signature Authentication in the Internet Key + Exchange Version 2 (IKEv2)."; + } + enum null { + description + "Null authentication."; + reference + "RFC 7619: The NULL Authentication Method in the Internet + Key Exchange Protocol Version 2 (IKEv2)."; + } + } + description + "Peer authentication method specified in the Peer + Authorization Database (PAD)."; + } + + container ipsec-ike { + description + "IKE configuration for an NSF. It includes PAD + parameters, IKE connection information, and state + data."; + container pad { + description + "Configuration of the Peer Authorization Database + (PAD). Each entry of PAD contains authentication + information of either the local peer or the remote peer. + Therefore, the I2NSF Controller stores authentication + information (and credentials) not only for the remote NSF + but also for the local NSF. The local NSF MAY use the + same identity for different types of authentication + and credentials. Pointing to the entry for a local NSF + (e.g., A) and the entry for remote NSF (e.g., B) + is possible to specify all the required information to + carry out the authentication between A and B (see + ../conn-entry/local and ../conn-entry/remote)."; + list pad-entry { + key "name"; + ordered-by user; + description + "Peer Authorization Database (PAD) entry. It + is a list of PAD entries ordered by the + I2NSF Controller, and each entry is + unequivocally identified by a name."; + leaf name { + type string; + description + "PAD-unique name to identify this + entry."; + } + choice identity { + mandatory true; + description + "A particular IKE peer will be + identified by one of these identities. + This peer can be a remote peer or local + peer (this NSF)."; + reference + "RFC 4301: Security Architecture for the Internet + Protocol, Section 4.4.3.1."; + case ipv4-address { + leaf ipv4-address { + type inet:ipv4-address; + description + "Specifies the identity as + a single 4-octet IPv4 address."; + } + } + case ipv6-address { + leaf ipv6-address { + type inet:ipv6-address; + description + "Specifies the identity as a + single 16-octet IPv6 + address. An example is + 2001:db8::8:800:200c:417a."; + } + } + case fqdn-string { + leaf fqdn-string { + type inet:domain-name; + description + "Specifies the identity as a + Fully Qualified Domain Name + (FQDN) string. An example is + example.com. The string MUST + NOT contain any terminators + (e.g., NULL, Carriage Return + (CR), etc.)."; + } + } + case rfc822-address-string { + leaf rfc822-address-string { + type string; + description + "Specifies the identity as a + fully qualified email address + string (RFC 5322). An example is + jsmith@example.com. The string + MUST NOT contain any + terminators (e.g., NULL, CR, + etc.)."; + reference + "RFC 5322: Internet Message Format."; + } + } + case dnx509 { + leaf dnx509 { + type binary; + description + "The binary + Distinguished Encoding Rules (DER) + encoding of an ASN.1 X.500 + Distinguished Name, as specified in IKEv2."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile + RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 3.5."; + } + } + case gnx509 { + leaf gnx509 { + type binary; + description + "ASN.1 X.509 GeneralName structure, + as specified in RFC 5280, encoded + using ASN.1 Distinguished Encoding Rules + (DER), as specified in ITU-T X.690."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile."; + } + } + case id-key { + leaf id-key { + type binary; + description + "Opaque octet stream that may be + used to pass vendor-specific + information for proprietary + types of identification."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 3.5."; + } + } + case id-null { + leaf id-null { + type empty; + description + "The ID_NULL identification is used + when the IKE identification payload + is not used."; + reference + "RFC 7619: The NULL Authentication Method in the + Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + } + } + leaf auth-protocol { + type auth-protocol-type; + default "ikev2"; + description + "Only IKEv2 is supported right now, but + other authentication protocols may be + supported in the future."; + } + container peer-authentication { + description + "This container allows the security + controller to configure the + authentication method (pre-shared key, + eap, digital-signature, null) that + will be used with a particular peer and + the credentials to use, which will + depend on the selected authentication + method."; + leaf auth-method { + type auth-method-type; + default "pre-shared"; + description + "Type of authentication method + (pre-shared key, eap, digital signature, + null)."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.15."; + } + container eap-method { + when "../auth-method = 'eap'"; + leaf eap-type { + type uint32 { + range "1 .. 4294967295"; + } + mandatory true; + description + "EAP method type specified with + a value extracted from the + IANA registry. This + information provides the + particular EAP method to be + used. Depending on the EAP + method, pre-shared keys or + certificates may be used."; + } + description + "EAP method description used when + authentication method is 'eap'."; + reference + "IANA: Extensible Authentication Protocol (EAP) + Registry, Method Types + RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.16."; + } + container pre-shared { + when "../auth-method[.='pre-shared' or + .='eap']"; + leaf secret { + nacm:default-deny-all; + type yang:hex-string; + description + "Pre-shared secret value. The + NSF has to prevent read access + to this value for security + reasons. This value MUST be + set if the EAP method uses a + pre-shared key or pre-shared + authentication has been chosen."; + } + description + "Shared secret value for PSK or + EAP method authentication based on + PSK."; + } + container digital-signature { + when "../auth-method[.='digital-signature' + or .='eap']"; + leaf ds-algorithm { + type uint8; + default "14"; + description + "The digital signature + algorithm is specified with a + value extracted from the IANA + registry. Default is the generic + digital signature method. Depending + on the algorithm, the following leafs + MUST contain information. For + example, if digital signature or the + EAP method involves a certificate, + then leaves 'cert-data' and 'private-key' + will contain this information."; + reference + "IANA: Internet Key Exchange Version 2 (IKEv2) + Parameters, IKEv2 Authentication Method."; + } + choice public-key { + leaf raw-public-key { + type binary; + description + "A binary that contains the + value of the public key. The + interpretation of the content + is defined by the digital + signature algorithm. For + example, an RSA key is + represented as RSAPublicKey, as + defined in RFC 8017, and an + Elliptic Curve Cryptography + (ECC) key is represented + using the 'publicKey' + described in RFC 5915."; + reference + "RFC 5915: Elliptic Curve Private Key + Structure + RFC 8017: PKCS #1: RSA Cryptography + Specifications Version 2.2."; + } + leaf cert-data { + type binary; + description + "X.509 certificate data in DER + format. If raw-public-key is + defined, this leaf is empty."; + reference + "RFC 5280: Internet X.509 Public Key + Infrastructure Certificate + and Certificate Revocation + List (CRL) Profile."; + } + description + "If the I2NSF Controller + knows that the NSF + already owns a private key + associated to this public key + (e.g., the NSF generated the pair + public key/private key out of + band), it will only configure + one of the leaves of this + choice but not the leaf + private-key. The NSF, based on + the public key value, can know + the private key to be used."; + } + leaf private-key { + nacm:default-deny-all; + type binary; + description + "A binary that contains the + value of the private key. The + interpretation of the content + is defined by the digital + signature algorithm. For + example, an RSA key is + represented as RSAPrivateKey, as + defined in RFC 8017, and an + Elliptic Curve Cryptography + (ECC) key is represented as + ECPrivateKey, as defined in RFC + 5915. This value is set + if public key is defined and the + I2NSF Controller is in charge + of configuring the + private key. Otherwise, it is + not set and the value is + kept in secret."; + reference + "RFC 5915: Elliptic Curve Private Key + Structure + RFC 8017: PKCS #1: RSA Cryptography + Specifications Version 2.2."; + } + leaf-list ca-data { + type binary; + description + "List of trusted Certification + Authorities (CAs) certificates + encoded using ASN.1 + Distinguished Encoding Rules + (DER). If it is not defined, + the default value is empty."; + } + leaf crl-data { + type binary; + description + "A CertificateList structure, as + specified in RFC 5280, + encoded using ASN.1 + Distinguished Encoding Rules + (DER), as specified in ITU-T + X.690. If it is not defined, + the default value is empty."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile."; + } + leaf crl-uri { + type inet:uri; + description + "X.509 Certificate Revocation List + (CRL) certificate URI. + If it is not defined, + the default value is empty."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile."; + } + leaf oscp-uri { + type inet:uri; + description + "Online Certificate Status Protocol + (OCSP) URI. If it is not defined, + the default value is empty."; + reference + "RFC 6960: X.509 Internet Public Key Infrastructure + Online Certificate Status Protocol - OCSP + RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile."; + } + description + "digital-signature container."; + } /*container digital-signature*/ + } /*container peer-authentication*/ + } + } + list conn-entry { + key "name"; + description + "IKE peer connection information. This list + contains the IKE connection for this peer + with other peers. This will create, in + real time, IKE Security Associations + established with these nodes."; + leaf name { + type string; + description + "Identifier for this connection + entry."; + } + leaf autostartup { + type autostartup-type; + default "add"; + description + "By default, only add configuration + without starting the security + association."; + } + leaf initial-contact { + type boolean; + default "false"; + description + "The goal of this value is to deactivate the + usage of INITIAL_CONTACT notification + (true). If this flag remains set to false, it + means the usage of the INITIAL_CONTACT + notification will depend on the IKEv2 + implementation."; + } + leaf version { + type auth-protocol-type; + default "ikev2"; + description + "IKE version. Only version 2 is supported."; + } + container fragmentation { + leaf enabled { + type boolean; + default "false"; + description + "Whether or not to enable IKEv2 + fragmentation (true or false)."; + reference + "RFC 7383: Internet Key Exchange Protocol Version 2 + (IKEv2) Message Fragmentation."; + } + leaf mtu { + when "../enabled='true'"; + type uint16 { + range "68..65535"; + } + description + "MTU that IKEv2 can use + for IKEv2 fragmentation."; + reference + "RFC 7383: Internet Key Exchange Protocol Version 2 + (IKEv2) Message Fragmentation."; + } + description + "IKEv2 fragmentation, as per RFC 7383. If the + IKEv2 fragmentation is enabled, it is possible + to specify the MTU."; + } + container ike-sa-lifetime-soft { + description + "IKE SA lifetime soft. Two lifetime values + can be configured: either rekey time of the + IKE SA or reauth time of the IKE SA. When + the rekey lifetime expires, a rekey of the + IKE SA starts. When reauth lifetime + expires, an IKE SA reauthentication starts."; + leaf rekey-time { + type uint32; + units "seconds"; + default "0"; + description + "Time in seconds between each IKE SA + rekey. The value 0 means infinite."; + } + leaf reauth-time { + type uint32; + units "seconds"; + default "0"; + description + "Time in seconds between each IKE SA + reauthentication. The value 0 means + infinite."; + } + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.8."; + } + container ike-sa-lifetime-hard { + description + "Hard IKE SA lifetime. When this + time is reached, the IKE SA is removed."; + leaf over-time { + type uint32; + units "seconds"; + default "0"; + description + "Time in seconds before the IKE SA is + removed. The value 0 means infinite."; + } + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + leaf-list ike-sa-intr-alg { + type nsfikec:intr-alg-t; + default "12"; + ordered-by user; + description + "Integrity algorithm for establishing + the IKE SA. This list is ordered following + from the higher priority to lower priority. + The first node of the list will be the + algorithm with higher priority. + Default value 12 (AUTH_HMAC_SHA2_256_128)."; + } + list ike-sa-encr-alg { + key "id"; + min-elements 1; + ordered-by user; + leaf id { + type uint16; + description + "An identifier that unequivocally + identifies each entry of the list, + i.e., an encryption algorithm and + its key length (if required)."; + } + leaf algorithm-type { + type nsfikec:encr-alg-t; + default "12"; + description + "Default value 12 (ENCR_AES_CBC)."; + } + leaf key-length { + type uint16; + default "128"; + description + "By default, key length is 128 bits."; + } + description + "Encryption or AEAD algorithm for the IKE + SAs. This list is ordered following + from the higher priority to lower priority. + The first node of the list will be the + algorithm with higher priority."; + } + leaf dh-group { + type fs-group; + default "14"; + description + "Group number for Diffie-Hellman + Exponentiation used during IKE_SA_INIT + for the IKE SA key exchange."; + } + leaf half-open-ike-sa-timer { + type uint32; + units "seconds"; + default "0"; + description + "Set the half-open IKE SA timeout + duration. The value 0 implies infinite."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2."; + } + leaf half-open-ike-sa-cookie-threshold { + type uint32; + default "0"; + description + "Number of half-open IKE SAs that activate + the cookie mechanism. The value 0 implies + infinite."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.6."; + } + container local { + leaf local-pad-entry-name { + type string; + mandatory true; + description + "Local peer authentication information. + This node points to a specific entry in + the PAD where the authorization + information about this particular local + peer is stored. It MUST match a + pad-entry-name."; + } + description + "Local peer authentication information."; + } + container remote { + leaf remote-pad-entry-name { + type string; + mandatory true; + description + "Remote peer authentication information. + This node points to a specific entry in + the PAD where the authorization + information about this particular + remote peer is stored. It MUST match a + pad-entry-name."; + } + description + "Remote peer authentication information."; + } + container encapsulation-type { + uses nsfikec:encap; + description + "This container carries configuration + information about the source and destination + ports of encapsulation that IKE should use + and the type of encapsulation that + should be used when NAT traversal is required. + However, this is just a best effort since + the IKE implementation may need to use a + different encapsulation, as described in + RFC 8229."; + reference + "RFC 8229: TCP Encapsulation of IKE and IPsec + Packets."; + } + container spd { + description + "Configuration of the Security Policy + Database (SPD). This main information is + placed in the grouping + ipsec-policy-grouping."; + list spd-entry { + key "name"; + ordered-by user; + leaf name { + type string; + description + "SPD-entry-unique name to identify + the IPsec policy."; + } + container ipsec-policy-config { + description + "This container carries the + configuration of an IPsec policy."; + uses nsfikec:ipsec-policy-grouping; + } + description + "List of entries that will constitute + the representation of the SPD. In this + case, since the NSF implements IKE, it + is only required to send an IPsec policy + from this NSF where 'local' is this NSF + and 'remote' the other NSF. The IKE + implementation will install IPsec + policies in the NSF's kernel in both + directions (inbound and outbound) and + their corresponding IPsec SAs based on + the information in this SPD entry."; + } + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.9."; + } + container child-sa-info { + leaf-list fs-groups { + type fs-group; + default "0"; + ordered-by user; + description + "If non-zero, forward secrecy is + required when a new IPsec SA is being + created, the (non-zero) value indicates + the group number to use for the key + exchange process used to achieve forward + secrecy. + This list is ordered following from the + higher priority to lower priority. The + first node of the list will be the + algorithm with higher priority."; + } + container child-sa-lifetime-soft { + description + "Soft IPsec SA lifetime. + After the lifetime, the action is + defined in this container + in the leaf action."; + uses nsfikec:lifetime; + leaf action { + type nsfikec:lifetime-action; + default "replace"; + description + "When the lifetime of an IPsec SA + expires, an action needs to be + performed over the IPsec SA that + reached the lifetime. There are + three possible options: + terminate-clear, terminate-hold, and + replace."; + reference + "RFC 4301: Security Architecture for the Internet + Protocol, Section 4.5 + RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.8."; + } + } + container child-sa-lifetime-hard { + description + "IPsec SA lifetime hard. The action will + be to terminate the IPsec SA."; + uses nsfikec:lifetime; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.8."; + } + description + "Specific information for IPsec SAs. + It includes the Perfect Forward Secrecy (PFS) + group and IPsec SAs rekey lifetimes."; + } + container state { + config false; + leaf initiator { + type boolean; + description + "It is acting as an initiator for this + connection."; + } + leaf initiator-ikesa-spi { + type ike-spi; + description + "Initiator's IKE SA SPI."; + } + leaf responder-ikesa-spi { + type ike-spi; + description + "Responder's IKE SA SPI."; + } + leaf nat-local { + type boolean; + description + "True if local endpoint is behind a + NAT."; + } + leaf nat-remote { + type boolean; + description + "True if remote endpoint is behind + a NAT."; + } + container encapsulation-type { + uses nsfikec:encap; + description + "This container provides information + about the source and destination + ports of encapsulation that IKE is + using and the type of encapsulation + when NAT traversal is required."; + reference + "RFC 8229: TCP Encapsulation of IKE and IPsec Packets."; + } + leaf established { + type uint64; + units "seconds"; + description + "Seconds since this IKE SA has been + established."; + } + leaf current-rekey-time { + type uint64; + units "seconds"; + description + "Seconds before IKE SA is rekeyed."; + } + leaf current-reauth-time { + type uint64; + units "seconds"; + description + "Seconds before IKE SA is + reauthenticated."; + } + description + "IKE state data for a particular + connection."; + } /* ike-sa-state */ + } /* ike-conn-entries */ + container number-ike-sas { + config false; + leaf total { + type yang:gauge64; + description + "Total number of active IKE SAs."; + } + leaf half-open { + type yang:gauge64; + description + "Number of half-open active IKE SAs."; + } + leaf half-open-cookies { + type yang:gauge64; + description + "Number of half-open active IKE SAs with + cookie activated."; + } + description + "General information about the IKE SAs. In + particular, it provides the current number of + IKE SAs."; + } + } /* container ipsec-ike */ +} diff --git a/models/ietf/RFC/ietf-i2nsf-ike@2021-07-14.yang b/models/ietf/RFC/ietf-i2nsf-ike@2021-07-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..c650c8ee8e73ad8f7da2c8c9aa9ab8293f9c2918 --- /dev/null +++ b/models/ietf/RFC/ietf-i2nsf-ike@2021-07-14.yang @@ -0,0 +1,981 @@ +module ietf-i2nsf-ike { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ike"; + prefix nsfike; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + import ietf-i2nsf-ikec { + prefix nsfikec; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control + Model."; + } + + organization + "IETF I2NSF Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> + WG List: <mailto:i2nsf@ietf.org> + + Author: Rafael Marin-Lopez + <mailto:rafa@um.es> + + Author: Gabriel Lopez-Millan + <mailto:gabilm@um.es> + + Author: Fernando Pereniguez-Garcia + <mailto:fernando.pereniguez@cud.upct.es> + "; + description + "This module contains the IPsec IKE case model for the SDN-based + IPsec flow protection service. + + 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. + + Copyright (c) 2021 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9061; see + the RFC itself for full legal notices."; + + revision 2021-07-14 { + description + "Initial version."; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + + typedef ike-spi { + type uint64 { + range "0..max"; + } + description + "Security Parameter Index (SPI)'s IKE SA."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.6."; + } + + typedef autostartup-type { + type enumeration { + enum add { + description + "IKE/IPsec configuration is only loaded into + IKE implementation, but IKE/IPsec SA is not + started."; + } + enum on-demand { + description + "IKE/IPsec configuration is loaded + into IKE implementation. The IPsec policies + are transferred to the NSF, but the + IPsec SAs are not established immediately. + The IKE implementation will negotiate the + IPsec SAs when they are required + (i.e., through an ACQUIRE notification)."; + } + enum start { + description + "IKE/IPsec configuration is loaded + and transferred to the NSF's kernel, and the + IKEv2-based IPsec SAs are established + immediately without waiting for any packet."; + } + } + description + "Different policies to set IPsec SA configuration + into NSF's kernel when IKEv2 implementation has + started."; + } + + typedef fs-group { + type uint16; + description + "DH groups for IKE and IPsec SA rekey."; + reference + "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, + IKEv2 Transform Attribute Types, Transform Type 4 - + Diffie-Hellman Group Transform IDs + RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 3.3.2."; + } + + typedef auth-protocol-type { + type enumeration { + enum ikev2 { + value 2; + description + "IKEv2 authentication protocol. It is the + only one defined right now. An enum is + used for further extensibility."; + } + } + description + "IKE authentication protocol version specified in the + Peer Authorization Database (PAD). It is defined as + enumerated to allow new IKE versions in the + future."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + + typedef auth-method-type { + type enumeration { + enum pre-shared { + description + "Select pre-shared key as the + authentication method."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + enum eap { + description + "Select the Extensible Authentication Protocol (EAP) as + the authentication method."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + enum digital-signature { + description + "Select digital signature as the authentication method."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2) + RFC 7427: Signature Authentication in the Internet Key + Exchange Version 2 (IKEv2)."; + } + enum null { + description + "Null authentication."; + reference + "RFC 7619: The NULL Authentication Method in the Internet + Key Exchange Protocol Version 2 (IKEv2)."; + } + } + description + "Peer authentication method specified in the Peer + Authorization Database (PAD)."; + } + + container ipsec-ike { + description + "IKE configuration for an NSF. It includes PAD + parameters, IKE connection information, and state + data."; + container pad { + description + "Configuration of the Peer Authorization Database + (PAD). Each entry of PAD contains authentication + information of either the local peer or the remote peer. + Therefore, the I2NSF Controller stores authentication + information (and credentials) not only for the remote NSF + but also for the local NSF. The local NSF MAY use the + same identity for different types of authentication + and credentials. Pointing to the entry for a local NSF + (e.g., A) and the entry for remote NSF (e.g., B) + is possible to specify all the required information to + carry out the authentication between A and B (see + ../conn-entry/local and ../conn-entry/remote)."; + list pad-entry { + key "name"; + ordered-by user; + description + "Peer Authorization Database (PAD) entry. It + is a list of PAD entries ordered by the + I2NSF Controller, and each entry is + unequivocally identified by a name."; + leaf name { + type string; + description + "PAD-unique name to identify this + entry."; + } + choice identity { + mandatory true; + description + "A particular IKE peer will be + identified by one of these identities. + This peer can be a remote peer or local + peer (this NSF)."; + reference + "RFC 4301: Security Architecture for the Internet + Protocol, Section 4.4.3.1."; + case ipv4-address { + leaf ipv4-address { + type inet:ipv4-address; + description + "Specifies the identity as + a single 4-octet IPv4 address."; + } + } + case ipv6-address { + leaf ipv6-address { + type inet:ipv6-address; + description + "Specifies the identity as a + single 16-octet IPv6 + address. An example is + 2001:db8::8:800:200c:417a."; + } + } + case fqdn-string { + leaf fqdn-string { + type inet:domain-name; + description + "Specifies the identity as a + Fully Qualified Domain Name + (FQDN) string. An example is + example.com. The string MUST + NOT contain any terminators + (e.g., NULL, Carriage Return + (CR), etc.)."; + } + } + case rfc822-address-string { + leaf rfc822-address-string { + type string; + description + "Specifies the identity as a + fully qualified email address + string (RFC 5322). An example is + jsmith@example.com. The string + MUST NOT contain any + terminators (e.g., NULL, CR, + etc.)."; + reference + "RFC 5322: Internet Message Format."; + } + } + case dnx509 { + leaf dnx509 { + type binary; + description + "The binary + Distinguished Encoding Rules (DER) + encoding of an ASN.1 X.500 + Distinguished Name, as specified in IKEv2."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile + RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 3.5."; + } + } + case gnx509 { + leaf gnx509 { + type binary; + description + "ASN.1 X.509 GeneralName structure, + as specified in RFC 5280, encoded + using ASN.1 Distinguished Encoding Rules + (DER), as specified in ITU-T X.690."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile."; + } + } + case id-key { + leaf id-key { + type binary; + description + "Opaque octet stream that may be + used to pass vendor-specific + information for proprietary + types of identification."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 3.5."; + } + } + case id-null { + leaf id-null { + type empty; + description + "The ID_NULL identification is used + when the IKE identification payload + is not used."; + reference + "RFC 7619: The NULL Authentication Method in the + Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + } + } + leaf auth-protocol { + type auth-protocol-type; + default "ikev2"; + description + "Only IKEv2 is supported right now, but + other authentication protocols may be + supported in the future."; + } + container peer-authentication { + description + "This container allows the security + controller to configure the + authentication method (pre-shared key, + eap, digital-signature, null) that + will be used with a particular peer and + the credentials to use, which will + depend on the selected authentication + method."; + leaf auth-method { + type auth-method-type; + default "pre-shared"; + description + "Type of authentication method + (pre-shared key, eap, digital signature, + null)."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.15."; + } + container eap-method { + when "../auth-method = 'eap'"; + leaf eap-type { + type uint32 { + range "1 .. 4294967295"; + } + mandatory true; + description + "EAP method type specified with + a value extracted from the + IANA registry. This + information provides the + particular EAP method to be + used. Depending on the EAP + method, pre-shared keys or + certificates may be used."; + } + description + "EAP method description used when + authentication method is 'eap'."; + reference + "IANA: Extensible Authentication Protocol (EAP) + Registry, Method Types + RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.16."; + } + container pre-shared { + when "../auth-method[.='pre-shared' or + .='eap']"; + leaf secret { + nacm:default-deny-all; + type yang:hex-string; + description + "Pre-shared secret value. The + NSF has to prevent read access + to this value for security + reasons. This value MUST be + set if the EAP method uses a + pre-shared key or pre-shared + authentication has been chosen."; + } + description + "Shared secret value for PSK or + EAP method authentication based on + PSK."; + } + container digital-signature { + when "../auth-method[.='digital-signature' + or .='eap']"; + leaf ds-algorithm { + type uint8; + default "14"; + description + "The digital signature + algorithm is specified with a + value extracted from the IANA + registry. Default is the generic + digital signature method. Depending + on the algorithm, the following leafs + MUST contain information. For + example, if digital signature or the + EAP method involves a certificate, + then leaves 'cert-data' and 'private-key' + will contain this information."; + reference + "IANA: Internet Key Exchange Version 2 (IKEv2) + Parameters, IKEv2 Authentication Method."; + } + choice public-key { + leaf raw-public-key { + type binary; + description + "A binary that contains the + value of the public key. The + interpretation of the content + is defined by the digital + signature algorithm. For + example, an RSA key is + represented as RSAPublicKey, as + defined in RFC 8017, and an + Elliptic Curve Cryptography + (ECC) key is represented + using the 'publicKey' + described in RFC 5915."; + reference + "RFC 5915: Elliptic Curve Private Key + Structure + RFC 8017: PKCS #1: RSA Cryptography + Specifications Version 2.2."; + } + leaf cert-data { + type binary; + description + "X.509 certificate data in DER + format. If raw-public-key is + defined, this leaf is empty."; + reference + "RFC 5280: Internet X.509 Public Key + Infrastructure Certificate + and Certificate Revocation + List (CRL) Profile."; + } + description + "If the I2NSF Controller + knows that the NSF + already owns a private key + associated to this public key + (e.g., the NSF generated the pair + public key/private key out of + band), it will only configure + one of the leaves of this + choice but not the leaf + private-key. The NSF, based on + the public key value, can know + the private key to be used."; + } + leaf private-key { + nacm:default-deny-all; + type binary; + description + "A binary that contains the + value of the private key. The + interpretation of the content + is defined by the digital + signature algorithm. For + example, an RSA key is + represented as RSAPrivateKey, as + defined in RFC 8017, and an + Elliptic Curve Cryptography + (ECC) key is represented as + ECPrivateKey, as defined in RFC + 5915. This value is set + if public key is defined and the + I2NSF Controller is in charge + of configuring the + private key. Otherwise, it is + not set and the value is + kept in secret."; + reference + "RFC 5915: Elliptic Curve Private Key + Structure + RFC 8017: PKCS #1: RSA Cryptography + Specifications Version 2.2."; + } + leaf-list ca-data { + type binary; + description + "List of trusted Certification + Authorities (CAs) certificates + encoded using ASN.1 + Distinguished Encoding Rules + (DER). If it is not defined, + the default value is empty."; + } + leaf crl-data { + type binary; + description + "A CertificateList structure, as + specified in RFC 5280, + encoded using ASN.1 + Distinguished Encoding Rules + (DER), as specified in ITU-T + X.690. If it is not defined, + the default value is empty."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile."; + } + leaf crl-uri { + type inet:uri; + description + "X.509 Certificate Revocation List + (CRL) certificate URI. + If it is not defined, + the default value is empty."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile."; + } + leaf oscp-uri { + type inet:uri; + description + "Online Certificate Status Protocol + (OCSP) URI. If it is not defined, + the default value is empty."; + reference + "RFC 6960: X.509 Internet Public Key Infrastructure + Online Certificate Status Protocol - OCSP + RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile."; + } + description + "digital-signature container."; + } /*container digital-signature*/ + } /*container peer-authentication*/ + } + } + list conn-entry { + key "name"; + description + "IKE peer connection information. This list + contains the IKE connection for this peer + with other peers. This will create, in + real time, IKE Security Associations + established with these nodes."; + leaf name { + type string; + description + "Identifier for this connection + entry."; + } + leaf autostartup { + type autostartup-type; + default "add"; + description + "By default, only add configuration + without starting the security + association."; + } + leaf initial-contact { + type boolean; + default "false"; + description + "The goal of this value is to deactivate the + usage of INITIAL_CONTACT notification + (true). If this flag remains set to false, it + means the usage of the INITIAL_CONTACT + notification will depend on the IKEv2 + implementation."; + } + leaf version { + type auth-protocol-type; + default "ikev2"; + description + "IKE version. Only version 2 is supported."; + } + container fragmentation { + leaf enabled { + type boolean; + default "false"; + description + "Whether or not to enable IKEv2 + fragmentation (true or false)."; + reference + "RFC 7383: Internet Key Exchange Protocol Version 2 + (IKEv2) Message Fragmentation."; + } + leaf mtu { + when "../enabled='true'"; + type uint16 { + range "68..65535"; + } + description + "MTU that IKEv2 can use + for IKEv2 fragmentation."; + reference + "RFC 7383: Internet Key Exchange Protocol Version 2 + (IKEv2) Message Fragmentation."; + } + description + "IKEv2 fragmentation, as per RFC 7383. If the + IKEv2 fragmentation is enabled, it is possible + to specify the MTU."; + } + container ike-sa-lifetime-soft { + description + "IKE SA lifetime soft. Two lifetime values + can be configured: either rekey time of the + IKE SA or reauth time of the IKE SA. When + the rekey lifetime expires, a rekey of the + IKE SA starts. When reauth lifetime + expires, an IKE SA reauthentication starts."; + leaf rekey-time { + type uint32; + units "seconds"; + default "0"; + description + "Time in seconds between each IKE SA + rekey. The value 0 means infinite."; + } + leaf reauth-time { + type uint32; + units "seconds"; + default "0"; + description + "Time in seconds between each IKE SA + reauthentication. The value 0 means + infinite."; + } + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.8."; + } + container ike-sa-lifetime-hard { + description + "Hard IKE SA lifetime. When this + time is reached, the IKE SA is removed."; + leaf over-time { + type uint32; + units "seconds"; + default "0"; + description + "Time in seconds before the IKE SA is + removed. The value 0 means infinite."; + } + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2)."; + } + leaf-list ike-sa-intr-alg { + type nsfikec:intr-alg-t; + default "12"; + ordered-by user; + description + "Integrity algorithm for establishing + the IKE SA. This list is ordered following + from the higher priority to lower priority. + The first node of the list will be the + algorithm with higher priority. + Default value 12 (AUTH_HMAC_SHA2_256_128)."; + } + list ike-sa-encr-alg { + key "id"; + min-elements 1; + ordered-by user; + leaf id { + type uint16; + description + "An identifier that unequivocally + identifies each entry of the list, + i.e., an encryption algorithm and + its key length (if required)."; + } + leaf algorithm-type { + type nsfikec:encr-alg-t; + default "12"; + description + "Default value 12 (ENCR_AES_CBC)."; + } + leaf key-length { + type uint16; + default "128"; + description + "By default, key length is 128 bits."; + } + description + "Encryption or AEAD algorithm for the IKE + SAs. This list is ordered following + from the higher priority to lower priority. + The first node of the list will be the + algorithm with higher priority."; + } + leaf dh-group { + type fs-group; + default "14"; + description + "Group number for Diffie-Hellman + Exponentiation used during IKE_SA_INIT + for the IKE SA key exchange."; + } + leaf half-open-ike-sa-timer { + type uint32; + units "seconds"; + default "0"; + description + "Set the half-open IKE SA timeout + duration. The value 0 implies infinite."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2."; + } + leaf half-open-ike-sa-cookie-threshold { + type uint32; + default "0"; + description + "Number of half-open IKE SAs that activate + the cookie mechanism. The value 0 implies + infinite."; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.6."; + } + container local { + leaf local-pad-entry-name { + type string; + mandatory true; + description + "Local peer authentication information. + This node points to a specific entry in + the PAD where the authorization + information about this particular local + peer is stored. It MUST match a + pad-entry-name."; + } + description + "Local peer authentication information."; + } + container remote { + leaf remote-pad-entry-name { + type string; + mandatory true; + description + "Remote peer authentication information. + This node points to a specific entry in + the PAD where the authorization + information about this particular + remote peer is stored. It MUST match a + pad-entry-name."; + } + description + "Remote peer authentication information."; + } + container encapsulation-type { + uses nsfikec:encap; + description + "This container carries configuration + information about the source and destination + ports of encapsulation that IKE should use + and the type of encapsulation that + should be used when NAT traversal is required. + However, this is just a best effort since + the IKE implementation may need to use a + different encapsulation, as described in + RFC 8229."; + reference + "RFC 8229: TCP Encapsulation of IKE and IPsec + Packets."; + } + container spd { + description + "Configuration of the Security Policy + Database (SPD). This main information is + placed in the grouping + ipsec-policy-grouping."; + list spd-entry { + key "name"; + ordered-by user; + leaf name { + type string; + description + "SPD-entry-unique name to identify + the IPsec policy."; + } + container ipsec-policy-config { + description + "This container carries the + configuration of an IPsec policy."; + uses nsfikec:ipsec-policy-grouping; + } + description + "List of entries that will constitute + the representation of the SPD. In this + case, since the NSF implements IKE, it + is only required to send an IPsec policy + from this NSF where 'local' is this NSF + and 'remote' the other NSF. The IKE + implementation will install IPsec + policies in the NSF's kernel in both + directions (inbound and outbound) and + their corresponding IPsec SAs based on + the information in this SPD entry."; + } + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.9."; + } + container child-sa-info { + leaf-list fs-groups { + type fs-group; + default "0"; + ordered-by user; + description + "If non-zero, forward secrecy is + required when a new IPsec SA is being + created, the (non-zero) value indicates + the group number to use for the key + exchange process used to achieve forward + secrecy. + This list is ordered following from the + higher priority to lower priority. The + first node of the list will be the + algorithm with higher priority."; + } + container child-sa-lifetime-soft { + description + "Soft IPsec SA lifetime. + After the lifetime, the action is + defined in this container + in the leaf action."; + uses nsfikec:lifetime; + leaf action { + type nsfikec:lifetime-action; + default "replace"; + description + "When the lifetime of an IPsec SA + expires, an action needs to be + performed over the IPsec SA that + reached the lifetime. There are + three possible options: + terminate-clear, terminate-hold, and + replace."; + reference + "RFC 4301: Security Architecture for the Internet + Protocol, Section 4.5 + RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.8."; + } + } + container child-sa-lifetime-hard { + description + "IPsec SA lifetime hard. The action will + be to terminate the IPsec SA."; + uses nsfikec:lifetime; + reference + "RFC 7296: Internet Key Exchange Protocol Version 2 + (IKEv2), Section 2.8."; + } + description + "Specific information for IPsec SAs. + It includes the Perfect Forward Secrecy (PFS) + group and IPsec SAs rekey lifetimes."; + } + container state { + config false; + leaf initiator { + type boolean; + description + "It is acting as an initiator for this + connection."; + } + leaf initiator-ikesa-spi { + type ike-spi; + description + "Initiator's IKE SA SPI."; + } + leaf responder-ikesa-spi { + type ike-spi; + description + "Responder's IKE SA SPI."; + } + leaf nat-local { + type boolean; + description + "True if local endpoint is behind a + NAT."; + } + leaf nat-remote { + type boolean; + description + "True if remote endpoint is behind + a NAT."; + } + container encapsulation-type { + uses nsfikec:encap; + description + "This container provides information + about the source and destination + ports of encapsulation that IKE is + using and the type of encapsulation + when NAT traversal is required."; + reference + "RFC 8229: TCP Encapsulation of IKE and IPsec Packets."; + } + leaf established { + type uint64; + units "seconds"; + description + "Seconds since this IKE SA has been + established."; + } + leaf current-rekey-time { + type uint64; + units "seconds"; + description + "Seconds before IKE SA is rekeyed."; + } + leaf current-reauth-time { + type uint64; + units "seconds"; + description + "Seconds before IKE SA is + reauthenticated."; + } + description + "IKE state data for a particular + connection."; + } /* ike-sa-state */ + } /* ike-conn-entries */ + container number-ike-sas { + config false; + leaf total { + type yang:gauge64; + description + "Total number of active IKE SAs."; + } + leaf half-open { + type yang:gauge64; + description + "Number of half-open active IKE SAs."; + } + leaf half-open-cookies { + type yang:gauge64; + description + "Number of half-open active IKE SAs with + cookie activated."; + } + description + "General information about the IKE SAs. In + particular, it provides the current number of + IKE SAs."; + } + } /* container ipsec-ike */ +} diff --git a/models/ietf/RFC/ietf-i2nsf-ikec.yang b/models/ietf/RFC/ietf-i2nsf-ikec.yang new file mode 100644 index 0000000000000000000000000000000000000000..c2e6c3b6a37f41e5fe5e43790d0bc62cf623be15 --- /dev/null +++ b/models/ietf/RFC/ietf-i2nsf-ikec.yang @@ -0,0 +1,715 @@ +module ietf-i2nsf-ikec { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikec"; + prefix nsfikec; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "IETF I2NSF Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> + WG List: <mailto:i2nsf@ietf.org> + + Author: Rafael Marin-Lopez + <mailto:rafa@um.es> + + Author: Gabriel Lopez-Millan + <mailto:gabilm@um.es> + + Author: Fernando Pereniguez-Garcia + <mailto:fernando.pereniguez@cud.upct.es> + "; + description + "Common data model for the IKE and IKE-less cases + defined by the SDN-based IPsec flow protection service. + + 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. + + Copyright (c) 2021 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 Simplified 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 9061; see + the RFC itself for full legal notices."; + + revision 2021-07-14 { + description + "Initial version."; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + + typedef encr-alg-t { + type uint16; + description + "The encryption algorithm is specified with a 16-bit + number extracted from the IANA registry. The acceptable + values MUST follow the requirement levels for + encryption algorithms for ESP and IKEv2."; + reference + "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, + IKEv2 Transform Attribute Types, Transform Type 1 - + Encryption Algorithm Transform IDs + RFC 8221: Cryptographic Algorithm Implementation + Requirements and Usage Guidance for Encapsulating + Security Payload (ESP) and Authentication Header + (AH) + RFC 8247: Algorithm Implementation Requirements and Usage + Guidance for the Internet Key Exchange Protocol + Version 2 (IKEv2)."; + } + + typedef intr-alg-t { + type uint16; + description + "The integrity algorithm is specified with a 16-bit + number extracted from the IANA registry. + The acceptable values MUST follow the requirement + levels for integrity algorithms for ESP and IKEv2."; + reference + "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, + IKEv2 Transform Attribute Types, Transform Type 3 - + Integrity Algorithm Transform IDs + RFC 8221: Cryptographic Algorithm Implementation + Requirements and Usage Guidance for Encapsulating + Security Payload (ESP) and Authentication Header + (AH) + RFC 8247: Algorithm Implementation Requirements and Usage + Guidance for the Internet Key Exchange Protocol + Version 2 (IKEv2)."; + } + + typedef ipsec-mode { + type enumeration { + enum transport { + description + "IPsec transport mode. No Network Address + Translation (NAT) support."; + } + enum tunnel { + description + "IPsec tunnel mode."; + } + } + description + "Type definition of IPsec mode: transport or + tunnel."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 3.2."; + } + + typedef esp-encap { + type enumeration { + enum espintcp { + description + "ESP in TCP encapsulation."; + reference + "RFC 8229: TCP Encapsulation of IKE and + IPsec Packets."; + } + enum espinudp { + description + "ESP in UDP encapsulation."; + reference + "RFC 3948: UDP Encapsulation of IPsec ESP + Packets."; + } + enum none { + description + "No ESP encapsulation."; + } + } + description + "Types of ESP encapsulation when Network Address + Translation (NAT) may be present between two NSFs."; + reference + "RFC 8229: TCP Encapsulation of IKE and IPsec Packets + RFC 3948: UDP Encapsulation of IPsec ESP Packets."; + } + + typedef ipsec-protocol-params { + type enumeration { + enum esp { + description + "IPsec ESP protocol."; + } + } + description + "Only the Encapsulation Security Protocol (ESP) is + supported, but it could be extended in the future."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP)."; + } + + typedef lifetime-action { + type enumeration { + enum terminate-clear { + description + "Terminates the IPsec SA and allows the + packets through."; + } + enum terminate-hold { + description + "Terminates the IPsec SA and drops the + packets."; + } + enum replace { + description + "Replaces the IPsec SA with a new one: + rekey."; + } + } + description + "When the lifetime of an IPsec SA expires, an action + needs to be performed for the IPsec SA that + reached the lifetime. There are three possible + options: terminate-clear, terminate-hold, and + replace."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.5."; + } + + typedef ipsec-traffic-direction { + type enumeration { + enum inbound { + description + "Inbound traffic."; + } + enum outbound { + description + "Outbound traffic."; + } + } + description + "IPsec traffic direction is defined in + two directions: inbound and outbound. + From an NSF perspective, inbound and + outbound are defined as mentioned + in Section 3.1 in RFC 4301."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 3.1."; + } + + typedef ipsec-spd-action { + type enumeration { + enum protect { + description + "PROTECT the traffic with IPsec."; + } + enum bypass { + description + "BYPASS the traffic. The packet is forwarded + without IPsec protection."; + } + enum discard { + description + "DISCARD the traffic. The IP packet is + discarded."; + } + } + description + "The action when traffic matches an IPsec security + policy. According to RFC 4301, there are three + possible values: BYPASS, PROTECT, and DISCARD."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1."; + } + + typedef ipsec-inner-protocol { + type union { + type uint8; + type enumeration { + enum any { + value 256; + description + "Any IP protocol number value."; + } + } + } + default "any"; + description + "IPsec protection can be applied to specific IP + traffic and Layer 4 traffic (TCP, UDP, SCTP, etc.) + or ANY protocol in the IP packet payload. + The IP protocol number is specified with a uint8 + or ANY defining an enumerate with value 256 to + indicate the protocol number. Note that in case + of IPv6, the protocol in the IP packet payload + is indicated in the Next Header field of the IPv6 + packet."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.1 + IANA: Protocol Numbers."; + } + + grouping encap { + description + "This group of nodes allows defining of the type of + encapsulation in case NAT traversal is + required and includes port information."; + leaf espencap { + type esp-encap; + default "none"; + description + "ESP in TCP, ESP in UDP, or ESP in TLS."; + } + leaf sport { + type inet:port-number; + default "4500"; + description + "Encapsulation source port."; + } + leaf dport { + type inet:port-number; + default "4500"; + description + "Encapsulation destination port."; + } + leaf-list oaddr { + type inet:ip-address; + description + "If required, this is the original address that + was used before NAT was applied over the packet."; + } + reference + "RFC 3947: Negotiation of NAT-Traversal in the IKE + RFC 8229: TCP Encapsulation of IKE and IPsec Packets."; + } + + grouping lifetime { + description + "Different lifetime values limited to an IPsec SA."; + leaf time { + type uint32; + units "seconds"; + default "0"; + description + "Time in seconds since the IPsec SA was added. + For example, if this value is 180 seconds, it + means the IPsec SA expires in 180 seconds since + it was added. The value 0 implies infinite."; + } + leaf bytes { + type uint64; + default "0"; + description + "If the IPsec SA processes the number of bytes + expressed in this leaf, the IPsec SA expires and + SHOULD be rekeyed. The value 0 implies + infinite."; + } + leaf packets { + type uint32; + default "0"; + description + "If the IPsec SA processes the number of packets + expressed in this leaf, the IPsec SA expires and + SHOULD be rekeyed. The value 0 implies + infinite."; + } + leaf idle { + type uint32; + units "seconds"; + default "0"; + description + "When an NSF stores an IPsec SA, it + consumes system resources. For an idle IPsec SA, this + is a waste of resources. If the IPsec SA is idle + during this number of seconds, the IPsec SA + SHOULD be removed. The value 0 implies + infinite."; + } + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.2.1."; + } + + grouping port-range { + description + "This grouping defines a port range, such as that + expressed in RFC 4301, for example, 1500 (Start + Port Number)-1600 (End Port Number). + A port range is used in the Traffic Selector."; + leaf start { + type inet:port-number; + description + "Start port number."; + } + leaf end { + type inet:port-number; + must '. >= ../start' { + error-message + "The end port number MUST be equal or greater + than the start port number."; + } + description + "End port number. To express a single port, set + the same value as start and end."; + } + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + } + + grouping tunnel-grouping { + description + "The parameters required to define the IP tunnel + endpoints when IPsec SA requires tunnel mode. The + tunnel is defined by two endpoints: the local IP + address and the remote IP address."; + leaf local { + type inet:ip-address; + mandatory true; + description + "Local IP address' tunnel endpoint."; + } + leaf remote { + type inet:ip-address; + mandatory true; + description + "Remote IP address' tunnel endpoint."; + } + leaf df-bit { + type enumeration { + enum clear { + description + "Disable the Don't Fragment (DF) bit + in the outer header. This is the + default value."; + } + enum set { + description + "Enable the DF bit in the outer header."; + } + enum copy { + description + "Copy the DF bit to the outer header."; + } + } + default "clear"; + description + "Allow configuring the DF bit when encapsulating + tunnel mode IPsec traffic. RFC 4301 describes + three options to handle the DF bit during + tunnel encapsulation: clear, set, and copy from + the inner IP header. This MUST be ignored or + has no meaning when the local/remote + IP addresses are IPv6 addresses."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 8.1."; + } + leaf bypass-dscp { + type boolean; + default "true"; + description + "If true, to copy the Differentiated Services Code + Point (DSCP) value from inner header to outer header. + If false, to map DSCP values + from an inner header to values in an outer header + following ../dscp-mapping."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + } + list dscp-mapping { + must '../bypass-dscp = "false"'; + key "id"; + ordered-by user; + leaf id { + type uint8; + description + "The index of list with the + different mappings."; + } + leaf inner-dscp { + type inet:dscp; + description + "The DSCP value of the inner IP packet. If this + leaf is not defined, it means ANY inner DSCP value."; + } + leaf outer-dscp { + type inet:dscp; + default "0"; + description + "The DSCP value of the outer IP packet."; + } + description + "A list that represents an array with the mapping from the + inner DSCP value to outer DSCP value when bypass-dscp is + false. To express a default mapping in the list where any + other inner dscp value is not matching a node in the list, + a new node has to be included at the end of the list where + the leaf inner-dscp is not defined (ANY) and the leaf + outer-dscp includes the value of the mapping. If there is + no value set in the leaf outer-dscp, the default value for + this leaf is 0."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2 and Appendix C."; + } + } + + grouping selector-grouping { + description + "This grouping contains the definition of a Traffic + Selector, which is used in the IPsec policies and + IPsec SAs."; + leaf local-prefix { + type inet:ip-prefix; + mandatory true; + description + "Local IP address prefix."; + } + leaf remote-prefix { + type inet:ip-prefix; + mandatory true; + description + "Remote IP address prefix."; + } + leaf inner-protocol { + type ipsec-inner-protocol; + default "any"; + description + "Inner protocol that is going to be + protected with IPsec."; + } + list local-ports { + key "start end"; + uses port-range; + description + "List of local ports. When the inner + protocol is ICMP, this 16-bit value + represents code and type. + If this list is not defined, + it is assumed that start and + end are 0 by default (any port)."; + } + list remote-ports { + key "start end"; + uses port-range; + description + "List of remote ports. When the upper layer + protocol is ICMP, this 16-bit value represents + code and type. If this list is not defined, + it is assumed that start and end are 0 by + default (any port)."; + } + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + } + + grouping ipsec-policy-grouping { + description + "Holds configuration information for an IPsec SPD + entry."; + leaf anti-replay-window-size { + type uint32; + default "64"; + description + "To set the anti-replay window size. + The default value is set + to 64, following the recommendation in RFC 4303."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 3.4.3."; + } + container traffic-selector { + description + "Packets are selected for + processing actions based on Traffic Selector + values, which refer to IP and inner protocol + header information."; + uses selector-grouping; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.4.1."; + } + container processing-info { + description + "SPD processing. If the required processing + action is protect, it contains the required + information to process the packet."; + leaf action { + type ipsec-spd-action; + default "discard"; + description + "If bypass or discard, container + ipsec-sa-cfg is empty."; + } + container ipsec-sa-cfg { + when "../action = 'protect'"; + description + "IPsec SA configuration included in the SPD + entry."; + leaf pfp-flag { + type boolean; + default "false"; + description + "Each selector has a Populate From + Packet (PFP) flag. If asserted for a + given selector X, the flag indicates + that the IPsec SA to be created should + take its value (local IP address, + remote IP address, Next Layer + Protocol, etc.) for X from the value + in the packet. Otherwise, the IPsec SA + should take its value(s) for X from + the value(s) in the SPD entry."; + } + leaf ext-seq-num { + type boolean; + default "false"; + description + "True if this IPsec SA is using extended + sequence numbers. If true, the 64-bit + extended sequence number counter is used; + if false, the normal 32-bit sequence + number counter is used."; + } + leaf seq-overflow { + type boolean; + default "false"; + description + "The flag indicating whether + overflow of the sequence number + counter should prevent transmission + of additional packets on the IPsec + SA (false) and, therefore, needs to + be rekeyed or whether rollover is + permitted (true). If Authenticated + Encryption with Associated Data + (AEAD) is used (leaf + esp-algorithms/encryption/algorithm-type), + this flag MUST be false. Setting this + flag to true is strongly discouraged."; + } + leaf stateful-frag-check { + type boolean; + default "false"; + description + "Indicates whether (true) or not (false) + stateful fragment checking applies to + the IPsec SA to be created."; + } + leaf mode { + type ipsec-mode; + default "transport"; + description + "IPsec SA has to be processed in + transport or tunnel mode."; + } + leaf protocol-parameters { + type ipsec-protocol-params; + default "esp"; + description + "Security protocol of the IPsec SA. + Only ESP is supported, but it could be + extended in the future."; + } + container esp-algorithms { + when "../protocol-parameters = 'esp'"; + description + "Configuration of Encapsulating + Security Payload (ESP) parameters and + algorithms."; + leaf-list integrity { + type intr-alg-t; + default "0"; + ordered-by user; + description + "Configuration of ESP authentication + based on the specified integrity + algorithm. With AEAD encryption + algorithms, the integrity node is + not used."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 3.2."; + } + list encryption { + key "id"; + ordered-by user; + leaf id { + type uint16; + description + "An identifier that unequivocally identifies each + entry of the list, i.e., an encryption algorithm + and its key length (if required)."; + } + leaf algorithm-type { + type encr-alg-t; + default "20"; + description + "Default value 20 (ENCR_AES_GCM_16)."; + } + leaf key-length { + type uint16; + default "128"; + description + "By default, key length is 128 + bits."; + } + description + "Encryption or AEAD algorithm for the + IPsec SAs. This list is ordered + following from the higher priority to + lower priority. First node of the + list will be the algorithm with + higher priority. In case the list + is empty, then no encryption algorithm + is applied (NULL)."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 3.2."; + } + leaf tfc-pad { + type boolean; + default "false"; + description + "If Traffic Flow Confidentiality + (TFC) padding for ESP encryption + can be used (true) or not (false)."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 2.7."; + } + reference + "RFC 4303: IP Encapsulating Security Payload (ESP)."; + } + container tunnel { + when "../mode = 'tunnel'"; + uses tunnel-grouping; + description + "IPsec tunnel endpoints definition."; + } + } + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + } + } +} diff --git a/models/ietf/RFC/ietf-i2nsf-ikec@2021-07-14.yang b/models/ietf/RFC/ietf-i2nsf-ikec@2021-07-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..c2e6c3b6a37f41e5fe5e43790d0bc62cf623be15 --- /dev/null +++ b/models/ietf/RFC/ietf-i2nsf-ikec@2021-07-14.yang @@ -0,0 +1,715 @@ +module ietf-i2nsf-ikec { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikec"; + prefix nsfikec; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "IETF I2NSF Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> + WG List: <mailto:i2nsf@ietf.org> + + Author: Rafael Marin-Lopez + <mailto:rafa@um.es> + + Author: Gabriel Lopez-Millan + <mailto:gabilm@um.es> + + Author: Fernando Pereniguez-Garcia + <mailto:fernando.pereniguez@cud.upct.es> + "; + description + "Common data model for the IKE and IKE-less cases + defined by the SDN-based IPsec flow protection service. + + 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. + + Copyright (c) 2021 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 Simplified 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 9061; see + the RFC itself for full legal notices."; + + revision 2021-07-14 { + description + "Initial version."; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + + typedef encr-alg-t { + type uint16; + description + "The encryption algorithm is specified with a 16-bit + number extracted from the IANA registry. The acceptable + values MUST follow the requirement levels for + encryption algorithms for ESP and IKEv2."; + reference + "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, + IKEv2 Transform Attribute Types, Transform Type 1 - + Encryption Algorithm Transform IDs + RFC 8221: Cryptographic Algorithm Implementation + Requirements and Usage Guidance for Encapsulating + Security Payload (ESP) and Authentication Header + (AH) + RFC 8247: Algorithm Implementation Requirements and Usage + Guidance for the Internet Key Exchange Protocol + Version 2 (IKEv2)."; + } + + typedef intr-alg-t { + type uint16; + description + "The integrity algorithm is specified with a 16-bit + number extracted from the IANA registry. + The acceptable values MUST follow the requirement + levels for integrity algorithms for ESP and IKEv2."; + reference + "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, + IKEv2 Transform Attribute Types, Transform Type 3 - + Integrity Algorithm Transform IDs + RFC 8221: Cryptographic Algorithm Implementation + Requirements and Usage Guidance for Encapsulating + Security Payload (ESP) and Authentication Header + (AH) + RFC 8247: Algorithm Implementation Requirements and Usage + Guidance for the Internet Key Exchange Protocol + Version 2 (IKEv2)."; + } + + typedef ipsec-mode { + type enumeration { + enum transport { + description + "IPsec transport mode. No Network Address + Translation (NAT) support."; + } + enum tunnel { + description + "IPsec tunnel mode."; + } + } + description + "Type definition of IPsec mode: transport or + tunnel."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 3.2."; + } + + typedef esp-encap { + type enumeration { + enum espintcp { + description + "ESP in TCP encapsulation."; + reference + "RFC 8229: TCP Encapsulation of IKE and + IPsec Packets."; + } + enum espinudp { + description + "ESP in UDP encapsulation."; + reference + "RFC 3948: UDP Encapsulation of IPsec ESP + Packets."; + } + enum none { + description + "No ESP encapsulation."; + } + } + description + "Types of ESP encapsulation when Network Address + Translation (NAT) may be present between two NSFs."; + reference + "RFC 8229: TCP Encapsulation of IKE and IPsec Packets + RFC 3948: UDP Encapsulation of IPsec ESP Packets."; + } + + typedef ipsec-protocol-params { + type enumeration { + enum esp { + description + "IPsec ESP protocol."; + } + } + description + "Only the Encapsulation Security Protocol (ESP) is + supported, but it could be extended in the future."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP)."; + } + + typedef lifetime-action { + type enumeration { + enum terminate-clear { + description + "Terminates the IPsec SA and allows the + packets through."; + } + enum terminate-hold { + description + "Terminates the IPsec SA and drops the + packets."; + } + enum replace { + description + "Replaces the IPsec SA with a new one: + rekey."; + } + } + description + "When the lifetime of an IPsec SA expires, an action + needs to be performed for the IPsec SA that + reached the lifetime. There are three possible + options: terminate-clear, terminate-hold, and + replace."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.5."; + } + + typedef ipsec-traffic-direction { + type enumeration { + enum inbound { + description + "Inbound traffic."; + } + enum outbound { + description + "Outbound traffic."; + } + } + description + "IPsec traffic direction is defined in + two directions: inbound and outbound. + From an NSF perspective, inbound and + outbound are defined as mentioned + in Section 3.1 in RFC 4301."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 3.1."; + } + + typedef ipsec-spd-action { + type enumeration { + enum protect { + description + "PROTECT the traffic with IPsec."; + } + enum bypass { + description + "BYPASS the traffic. The packet is forwarded + without IPsec protection."; + } + enum discard { + description + "DISCARD the traffic. The IP packet is + discarded."; + } + } + description + "The action when traffic matches an IPsec security + policy. According to RFC 4301, there are three + possible values: BYPASS, PROTECT, and DISCARD."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1."; + } + + typedef ipsec-inner-protocol { + type union { + type uint8; + type enumeration { + enum any { + value 256; + description + "Any IP protocol number value."; + } + } + } + default "any"; + description + "IPsec protection can be applied to specific IP + traffic and Layer 4 traffic (TCP, UDP, SCTP, etc.) + or ANY protocol in the IP packet payload. + The IP protocol number is specified with a uint8 + or ANY defining an enumerate with value 256 to + indicate the protocol number. Note that in case + of IPv6, the protocol in the IP packet payload + is indicated in the Next Header field of the IPv6 + packet."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.1 + IANA: Protocol Numbers."; + } + + grouping encap { + description + "This group of nodes allows defining of the type of + encapsulation in case NAT traversal is + required and includes port information."; + leaf espencap { + type esp-encap; + default "none"; + description + "ESP in TCP, ESP in UDP, or ESP in TLS."; + } + leaf sport { + type inet:port-number; + default "4500"; + description + "Encapsulation source port."; + } + leaf dport { + type inet:port-number; + default "4500"; + description + "Encapsulation destination port."; + } + leaf-list oaddr { + type inet:ip-address; + description + "If required, this is the original address that + was used before NAT was applied over the packet."; + } + reference + "RFC 3947: Negotiation of NAT-Traversal in the IKE + RFC 8229: TCP Encapsulation of IKE and IPsec Packets."; + } + + grouping lifetime { + description + "Different lifetime values limited to an IPsec SA."; + leaf time { + type uint32; + units "seconds"; + default "0"; + description + "Time in seconds since the IPsec SA was added. + For example, if this value is 180 seconds, it + means the IPsec SA expires in 180 seconds since + it was added. The value 0 implies infinite."; + } + leaf bytes { + type uint64; + default "0"; + description + "If the IPsec SA processes the number of bytes + expressed in this leaf, the IPsec SA expires and + SHOULD be rekeyed. The value 0 implies + infinite."; + } + leaf packets { + type uint32; + default "0"; + description + "If the IPsec SA processes the number of packets + expressed in this leaf, the IPsec SA expires and + SHOULD be rekeyed. The value 0 implies + infinite."; + } + leaf idle { + type uint32; + units "seconds"; + default "0"; + description + "When an NSF stores an IPsec SA, it + consumes system resources. For an idle IPsec SA, this + is a waste of resources. If the IPsec SA is idle + during this number of seconds, the IPsec SA + SHOULD be removed. The value 0 implies + infinite."; + } + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.2.1."; + } + + grouping port-range { + description + "This grouping defines a port range, such as that + expressed in RFC 4301, for example, 1500 (Start + Port Number)-1600 (End Port Number). + A port range is used in the Traffic Selector."; + leaf start { + type inet:port-number; + description + "Start port number."; + } + leaf end { + type inet:port-number; + must '. >= ../start' { + error-message + "The end port number MUST be equal or greater + than the start port number."; + } + description + "End port number. To express a single port, set + the same value as start and end."; + } + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + } + + grouping tunnel-grouping { + description + "The parameters required to define the IP tunnel + endpoints when IPsec SA requires tunnel mode. The + tunnel is defined by two endpoints: the local IP + address and the remote IP address."; + leaf local { + type inet:ip-address; + mandatory true; + description + "Local IP address' tunnel endpoint."; + } + leaf remote { + type inet:ip-address; + mandatory true; + description + "Remote IP address' tunnel endpoint."; + } + leaf df-bit { + type enumeration { + enum clear { + description + "Disable the Don't Fragment (DF) bit + in the outer header. This is the + default value."; + } + enum set { + description + "Enable the DF bit in the outer header."; + } + enum copy { + description + "Copy the DF bit to the outer header."; + } + } + default "clear"; + description + "Allow configuring the DF bit when encapsulating + tunnel mode IPsec traffic. RFC 4301 describes + three options to handle the DF bit during + tunnel encapsulation: clear, set, and copy from + the inner IP header. This MUST be ignored or + has no meaning when the local/remote + IP addresses are IPv6 addresses."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 8.1."; + } + leaf bypass-dscp { + type boolean; + default "true"; + description + "If true, to copy the Differentiated Services Code + Point (DSCP) value from inner header to outer header. + If false, to map DSCP values + from an inner header to values in an outer header + following ../dscp-mapping."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + } + list dscp-mapping { + must '../bypass-dscp = "false"'; + key "id"; + ordered-by user; + leaf id { + type uint8; + description + "The index of list with the + different mappings."; + } + leaf inner-dscp { + type inet:dscp; + description + "The DSCP value of the inner IP packet. If this + leaf is not defined, it means ANY inner DSCP value."; + } + leaf outer-dscp { + type inet:dscp; + default "0"; + description + "The DSCP value of the outer IP packet."; + } + description + "A list that represents an array with the mapping from the + inner DSCP value to outer DSCP value when bypass-dscp is + false. To express a default mapping in the list where any + other inner dscp value is not matching a node in the list, + a new node has to be included at the end of the list where + the leaf inner-dscp is not defined (ANY) and the leaf + outer-dscp includes the value of the mapping. If there is + no value set in the leaf outer-dscp, the default value for + this leaf is 0."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2 and Appendix C."; + } + } + + grouping selector-grouping { + description + "This grouping contains the definition of a Traffic + Selector, which is used in the IPsec policies and + IPsec SAs."; + leaf local-prefix { + type inet:ip-prefix; + mandatory true; + description + "Local IP address prefix."; + } + leaf remote-prefix { + type inet:ip-prefix; + mandatory true; + description + "Remote IP address prefix."; + } + leaf inner-protocol { + type ipsec-inner-protocol; + default "any"; + description + "Inner protocol that is going to be + protected with IPsec."; + } + list local-ports { + key "start end"; + uses port-range; + description + "List of local ports. When the inner + protocol is ICMP, this 16-bit value + represents code and type. + If this list is not defined, + it is assumed that start and + end are 0 by default (any port)."; + } + list remote-ports { + key "start end"; + uses port-range; + description + "List of remote ports. When the upper layer + protocol is ICMP, this 16-bit value represents + code and type. If this list is not defined, + it is assumed that start and end are 0 by + default (any port)."; + } + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + } + + grouping ipsec-policy-grouping { + description + "Holds configuration information for an IPsec SPD + entry."; + leaf anti-replay-window-size { + type uint32; + default "64"; + description + "To set the anti-replay window size. + The default value is set + to 64, following the recommendation in RFC 4303."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 3.4.3."; + } + container traffic-selector { + description + "Packets are selected for + processing actions based on Traffic Selector + values, which refer to IP and inner protocol + header information."; + uses selector-grouping; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.4.1."; + } + container processing-info { + description + "SPD processing. If the required processing + action is protect, it contains the required + information to process the packet."; + leaf action { + type ipsec-spd-action; + default "discard"; + description + "If bypass or discard, container + ipsec-sa-cfg is empty."; + } + container ipsec-sa-cfg { + when "../action = 'protect'"; + description + "IPsec SA configuration included in the SPD + entry."; + leaf pfp-flag { + type boolean; + default "false"; + description + "Each selector has a Populate From + Packet (PFP) flag. If asserted for a + given selector X, the flag indicates + that the IPsec SA to be created should + take its value (local IP address, + remote IP address, Next Layer + Protocol, etc.) for X from the value + in the packet. Otherwise, the IPsec SA + should take its value(s) for X from + the value(s) in the SPD entry."; + } + leaf ext-seq-num { + type boolean; + default "false"; + description + "True if this IPsec SA is using extended + sequence numbers. If true, the 64-bit + extended sequence number counter is used; + if false, the normal 32-bit sequence + number counter is used."; + } + leaf seq-overflow { + type boolean; + default "false"; + description + "The flag indicating whether + overflow of the sequence number + counter should prevent transmission + of additional packets on the IPsec + SA (false) and, therefore, needs to + be rekeyed or whether rollover is + permitted (true). If Authenticated + Encryption with Associated Data + (AEAD) is used (leaf + esp-algorithms/encryption/algorithm-type), + this flag MUST be false. Setting this + flag to true is strongly discouraged."; + } + leaf stateful-frag-check { + type boolean; + default "false"; + description + "Indicates whether (true) or not (false) + stateful fragment checking applies to + the IPsec SA to be created."; + } + leaf mode { + type ipsec-mode; + default "transport"; + description + "IPsec SA has to be processed in + transport or tunnel mode."; + } + leaf protocol-parameters { + type ipsec-protocol-params; + default "esp"; + description + "Security protocol of the IPsec SA. + Only ESP is supported, but it could be + extended in the future."; + } + container esp-algorithms { + when "../protocol-parameters = 'esp'"; + description + "Configuration of Encapsulating + Security Payload (ESP) parameters and + algorithms."; + leaf-list integrity { + type intr-alg-t; + default "0"; + ordered-by user; + description + "Configuration of ESP authentication + based on the specified integrity + algorithm. With AEAD encryption + algorithms, the integrity node is + not used."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 3.2."; + } + list encryption { + key "id"; + ordered-by user; + leaf id { + type uint16; + description + "An identifier that unequivocally identifies each + entry of the list, i.e., an encryption algorithm + and its key length (if required)."; + } + leaf algorithm-type { + type encr-alg-t; + default "20"; + description + "Default value 20 (ENCR_AES_GCM_16)."; + } + leaf key-length { + type uint16; + default "128"; + description + "By default, key length is 128 + bits."; + } + description + "Encryption or AEAD algorithm for the + IPsec SAs. This list is ordered + following from the higher priority to + lower priority. First node of the + list will be the algorithm with + higher priority. In case the list + is empty, then no encryption algorithm + is applied (NULL)."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 3.2."; + } + leaf tfc-pad { + type boolean; + default "false"; + description + "If Traffic Flow Confidentiality + (TFC) padding for ESP encryption + can be used (true) or not (false)."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 2.7."; + } + reference + "RFC 4303: IP Encapsulating Security Payload (ESP)."; + } + container tunnel { + when "../mode = 'tunnel'"; + uses tunnel-grouping; + description + "IPsec tunnel endpoints definition."; + } + } + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + } + } +} diff --git a/models/ietf/RFC/ietf-i2nsf-ikeless.yang b/models/ietf/RFC/ietf-i2nsf-ikeless.yang new file mode 100644 index 0000000000000000000000000000000000000000..7b005c6af01ef08d9cc2ae42726b1fc96702c212 --- /dev/null +++ b/models/ietf/RFC/ietf-i2nsf-ikeless.yang @@ -0,0 +1,570 @@ +module ietf-i2nsf-ikeless { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikeless"; + prefix nsfikels; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + import ietf-i2nsf-ikec { + prefix nsfikec; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control + Model."; + } + + organization + "IETF I2NSF Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> + WG List: <mailto:i2nsf@ietf.org> + + Author: Rafael Marin-Lopez + <mailto:rafa@um.es> + + Author: Gabriel Lopez-Millan + <mailto:gabilm@um.es> + + Author: Fernando Pereniguez-Garcia + <mailto:fernando.pereniguez@cud.upct.es> + "; + description + "Data model for IKE-less case in the SDN-based IPsec flow + protection service. + + 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. + + Copyright (c) 2021 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 Simplified 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 9061; see + the RFC itself for full legal notices."; + + revision 2021-07-14 { + description + "Initial version."; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + + feature ikeless-notification { + description + "This feature indicates that the server supports + generating notifications in the ikeless module. + + To ensure broader applicability of this module, + the notifications are marked as a feature. + For the implementation of the IKE-less case, + the NSF is expected to implement this + feature."; + } + + container ipsec-ikeless { + description + "Container for configuration of the IKE-less + case. The container contains two additional + containers: 'spd' and 'sad'. The first allows the + I2NSF Controller to configure IPsec policies in + the Security Policy Database (SPD), and the second + allows the I2NSF Controller to configure IPsec + Security Associations (IPsec SAs) in the Security + Association Database (SAD)."; + reference + "RFC 4301: Security Architecture for the Internet Protocol."; + container spd { + description + "Configuration of the Security Policy Database + (SPD)."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + list spd-entry { + key "name"; + ordered-by user; + leaf name { + type string; + description + "SPD-entry-unique name to identify this + entry."; + } + leaf direction { + type nsfikec:ipsec-traffic-direction; + mandatory true; + description + "Inbound traffic or outbound + traffic. In the IKE-less case, the + I2NSF Controller needs to + specify the policy direction to be + applied in the NSF. In the IKE case, + this direction does not need to be + specified, since IKE + will determine the direction that the + IPsec policy will require."; + } + leaf reqid { + type uint64; + default "0"; + description + "This value allows linking this + IPsec policy with IPsec SAs with the + same reqid. It is only required in + the IKE-less model since, in the IKE + case, this link is handled internally + by IKE."; + } + container ipsec-policy-config { + description + "This container carries the + configuration of an IPsec policy."; + uses nsfikec:ipsec-policy-grouping; + } + description + "The SPD is represented as a list of SPD + entries, where each SPD entry represents an + IPsec policy."; + } /*list spd-entry*/ + } /*container spd*/ + container sad { + description + "Configuration of the IPsec Security Association + Database (SAD)."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.2.1."; + list sad-entry { + key "name"; + ordered-by user; + leaf name { + type string; + description + "SAD-entry-unique name to identify this + entry."; + } + leaf reqid { + type uint64; + default "0"; + description + "This value allows linking this + IPsec SA with an IPsec policy with + the same reqid."; + } + container ipsec-sa-config { + description + "This container allows configuring + details of an IPsec SA."; + leaf spi { + type uint32 { + range "0..max"; + } + mandatory true; + description + "IPsec SA of Security Parameter Index (SPI)."; + } + leaf ext-seq-num { + type boolean; + default "true"; + description + "True if this IPsec SA is using extended + sequence numbers. If true, the 64-bit + extended sequence number counter is used; + if false, the normal 32-bit sequence + number counter is used."; + } + leaf seq-overflow { + type boolean; + default "false"; + description + "The flag indicating whether + overflow of the sequence number + counter should prevent transmission + of additional packets on the IPsec + SA (false) and, therefore, needs to + be rekeyed or whether rollover is + permitted (true). If Authenticated + Encryption with Associated Data + (AEAD) is used (leaf + esp-algorithms/encryption/algorithm-type), + this flag MUST BE false. Setting this + flag to true is strongly discouraged."; + } + leaf anti-replay-window-size { + type uint32; + default "64"; + description + "To set the anti-replay window size. + The default value is set to 64, + following the recommendation in RFC 4303."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 3.4.3."; + } + container traffic-selector { + uses nsfikec:selector-grouping; + description + "The IPsec SA Traffic Selector."; + } + leaf protocol-parameters { + type nsfikec:ipsec-protocol-params; + default "esp"; + description + "Security protocol of IPsec SA, only + ESP so far."; + } + leaf mode { + type nsfikec:ipsec-mode; + default "transport"; + description + "Tunnel or transport mode."; + } + container esp-sa { + when "../protocol-parameters = 'esp'"; + description + "In case the IPsec SA is an + Encapsulation Security Payload + (ESP), it is required to specify + encryption and integrity + algorithms and key materials."; + container encryption { + description + "Configuration of encryption or + AEAD algorithm for IPsec + Encapsulation Security Payload + (ESP)."; + leaf encryption-algorithm { + type nsfikec:encr-alg-t; + default "12"; + description + "Configuration of ESP + encryption. With AEAD + algorithms, the integrity-algorithm + leaf is not used."; + } + leaf key { + nacm:default-deny-all; + type yang:hex-string; + description + "ESP encryption key value. + If this leaf is not defined, + the key is not defined + (e.g., encryption is NULL). + The key length is + determined by the + length of the key set in + this leaf. By default, it is + 128 bits."; + } + leaf iv { + nacm:default-deny-all; + type yang:hex-string; + description + "ESP encryption IV value. If + this leaf is not defined, the + IV is not defined (e.g., + encryption is NULL)."; + } + } + container integrity { + description + "Configuration of integrity for + IPsec Encapsulation Security + Payload (ESP). This container + allows configuration of integrity + algorithms when no AEAD + algorithms are used and + integrity is required."; + leaf integrity-algorithm { + type nsfikec:intr-alg-t; + default "12"; + description + "Message Authentication Code + (MAC) algorithm to provide + integrity in ESP (default + AUTH_HMAC_SHA2_256_128). + With AEAD algorithms, + the integrity leaf is not + used."; + } + leaf key { + nacm:default-deny-all; + type yang:hex-string; + description + "ESP integrity key value. + If this leaf is not defined, + the key is not defined (e.g., + AEAD algorithm is chosen and + integrity algorithm is not + required). The key length is + determined by the length of + the key configured."; + } + } + } /*container esp-sa*/ + container sa-lifetime-hard { + description + "IPsec SA hard lifetime. The action + associated is terminate and hold."; + uses nsfikec:lifetime; + } + container sa-lifetime-soft { + description + "IPsec SA soft lifetime."; + uses nsfikec:lifetime; + leaf action { + type nsfikec:lifetime-action; + description + "Action lifetime: terminate-clear, + terminate-hold, or replace."; + } + } + container tunnel { + when "../mode = 'tunnel'"; + uses nsfikec:tunnel-grouping; + leaf-list dscp-values { + type inet:dscp; + description + "DSCP values allowed for ingress packets carried + over this IPsec SA. If no values are specified, no + DSCP-specific filtering is applied. When + ../bypass-dscp is false and a dscp-mapping is + defined, each value here would be the same as the + 'inner' DSCP value for the DSCP mapping (list + dscp-mapping)."; + reference + "RFC 4301: Security Architecture for the Internet + Protocol, Section 4.4.2.1."; + } + description + "Endpoints of the IPsec tunnel."; + } + container encapsulation-type { + uses nsfikec:encap; + description + "This container carries + configuration information about + the source and destination ports + that will be used for ESP + encapsulation of ESP packets and + the type of encapsulation when NAT + traversal is in place."; + } + } /*ipsec-sa-config*/ + container ipsec-sa-state { + config false; + description + "Container describing IPsec SA state + data."; + container sa-lifetime-current { + uses nsfikec:lifetime; + description + "SAD lifetime current."; + } + container replay-stats { + description + "State data about the anti-replay + window."; + container replay-window { + leaf w { + type uint32; + description + "Size of the replay window."; + } + leaf t { + type uint64; + description + "Highest sequence number + authenticated so far, + upper bound of window."; + } + leaf b { + type uint64; + description + "Lower bound of window."; + } + description + "This container contains three + parameters that define the state + of the replay window: window size (w), + highest sequence number authenticated (t), + and lower bound of the window (b), according + to Appendix A2.1 in RFC 4303 (w = t - b + 1)."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Appendix A."; + } + leaf packet-dropped { + type yang:counter64; + description + "Packets dropped + because they are + replay packets."; + } + leaf failed { + type yang:counter64; + description + "Number of packets detected out + of the replay window."; + } + leaf seq-number-counter { + type uint64; + description + "A 64-bit counter when this + IPsec SA is using Extended + Sequence Number or 32-bit + counter when it is not. + Current value of sequence + number."; + } + } /* container replay-stats*/ + } /*ipsec-sa-state*/ + description + "List of SAD entries that form the SAD."; + } /*list sad-entry*/ + } /*container sad*/ + } /*container ipsec-ikeless*/ + + /* Notifications */ + + notification sadb-acquire { + if-feature "ikeless-notification"; + description + "The NSF detects and notifies that + an IPsec SA is required for an + outbound IP packet that has matched an SPD entry. + The traffic-selector container in this + notification contains information about + the IP packet that triggered this + notification."; + leaf ipsec-policy-name { + type string; + mandatory true; + description + "It contains the SPD entry name (unique) of + the IPsec policy that hits the IP-packet-required + IPsec SA. It is assumed the + I2NSF Controller will have a copy of the + information of this policy so it can + extract all the information with this + unique identifier. The type of IPsec SA is + defined in the policy so the security + controller can also know the type of IPsec + SA that MUST be generated."; + } + container traffic-selector { + description + "The IP packet that triggered the acquire + and requires an IPsec SA. Specifically, it + will contain the IP source/mask and IP + destination/mask, protocol (udp, tcp, + etc.), and source and destination + ports."; + uses nsfikec:selector-grouping; + } + } + + notification sadb-expire { + if-feature "ikeless-notification"; + description + "An IPsec SA expiration (soft or hard)."; + leaf ipsec-sa-name { + type string; + mandatory true; + description + "It contains the SAD entry name (unique) of + the IPsec SA that is about to expire. It is assumed + the I2NSF Controller will have a copy of the + IPsec SA information (except the cryptographic + material and state data) indexed by this name + (unique identifier) so it can know all the + information (crypto algorithms, etc.) about + the IPsec SA that has expired in order to + perform a rekey (soft lifetime) or delete it + (hard lifetime) with this unique identifier."; + } + leaf soft-lifetime-expire { + type boolean; + default "true"; + description + "If this value is true, the lifetime expired is + soft. If it is false, the lifetime is hard."; + } + container lifetime-current { + description + "IPsec SA current lifetime. If + soft-lifetime-expired is true, + this container is set with the + lifetime information about current + soft lifetime. + It can help the NSF Controller + to know which of the (soft) lifetime + limits raised the event: time, bytes, + packets, or idle."; + uses nsfikec:lifetime; + } + } + + notification sadb-seq-overflow { + if-feature "ikeless-notification"; + description + "Sequence overflow notification."; + leaf ipsec-sa-name { + type string; + mandatory true; + description + "It contains the SAD entry name (unique) of + the IPsec SA that is about to have a sequence + number overflow, and rollover is not permitted. + When the NSF issues this event before reaching + a sequence number, overflow is implementation + specific and out of scope of this specification. + It is assumed the I2NSF Controller will have a + copy of the IPsec SA information (except the + cryptographic material and state data) indexed + by this name (unique identifier) so it can + know all the information (crypto algorithms, + etc.) about the IPsec SA in + order to perform a rekey of the IPsec SA."; + } + } + + notification sadb-bad-spi { + if-feature "ikeless-notification"; + description + "Notify when the NSF receives a packet with an + incorrect SPI (i.e., not present in the SAD)."; + leaf spi { + type uint32 { + range "0..max"; + } + mandatory true; + description + "SPI number contained in the erroneous IPsec + packet."; + } + } +} diff --git a/models/ietf/RFC/ietf-i2nsf-ikeless@2021-07-14.yang b/models/ietf/RFC/ietf-i2nsf-ikeless@2021-07-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..7b005c6af01ef08d9cc2ae42726b1fc96702c212 --- /dev/null +++ b/models/ietf/RFC/ietf-i2nsf-ikeless@2021-07-14.yang @@ -0,0 +1,570 @@ +module ietf-i2nsf-ikeless { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikeless"; + prefix nsfikels; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + import ietf-i2nsf-ikec { + prefix nsfikec; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control + Model."; + } + + organization + "IETF I2NSF Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> + WG List: <mailto:i2nsf@ietf.org> + + Author: Rafael Marin-Lopez + <mailto:rafa@um.es> + + Author: Gabriel Lopez-Millan + <mailto:gabilm@um.es> + + Author: Fernando Pereniguez-Garcia + <mailto:fernando.pereniguez@cud.upct.es> + "; + description + "Data model for IKE-less case in the SDN-based IPsec flow + protection service. + + 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. + + Copyright (c) 2021 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 Simplified 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 9061; see + the RFC itself for full legal notices."; + + revision 2021-07-14 { + description + "Initial version."; + reference + "RFC 9061: A YANG Data Model for IPsec Flow Protection + Based on Software-Defined Networking (SDN)."; + } + + feature ikeless-notification { + description + "This feature indicates that the server supports + generating notifications in the ikeless module. + + To ensure broader applicability of this module, + the notifications are marked as a feature. + For the implementation of the IKE-less case, + the NSF is expected to implement this + feature."; + } + + container ipsec-ikeless { + description + "Container for configuration of the IKE-less + case. The container contains two additional + containers: 'spd' and 'sad'. The first allows the + I2NSF Controller to configure IPsec policies in + the Security Policy Database (SPD), and the second + allows the I2NSF Controller to configure IPsec + Security Associations (IPsec SAs) in the Security + Association Database (SAD)."; + reference + "RFC 4301: Security Architecture for the Internet Protocol."; + container spd { + description + "Configuration of the Security Policy Database + (SPD)."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.1.2."; + list spd-entry { + key "name"; + ordered-by user; + leaf name { + type string; + description + "SPD-entry-unique name to identify this + entry."; + } + leaf direction { + type nsfikec:ipsec-traffic-direction; + mandatory true; + description + "Inbound traffic or outbound + traffic. In the IKE-less case, the + I2NSF Controller needs to + specify the policy direction to be + applied in the NSF. In the IKE case, + this direction does not need to be + specified, since IKE + will determine the direction that the + IPsec policy will require."; + } + leaf reqid { + type uint64; + default "0"; + description + "This value allows linking this + IPsec policy with IPsec SAs with the + same reqid. It is only required in + the IKE-less model since, in the IKE + case, this link is handled internally + by IKE."; + } + container ipsec-policy-config { + description + "This container carries the + configuration of an IPsec policy."; + uses nsfikec:ipsec-policy-grouping; + } + description + "The SPD is represented as a list of SPD + entries, where each SPD entry represents an + IPsec policy."; + } /*list spd-entry*/ + } /*container spd*/ + container sad { + description + "Configuration of the IPsec Security Association + Database (SAD)."; + reference + "RFC 4301: Security Architecture for the Internet Protocol, + Section 4.4.2.1."; + list sad-entry { + key "name"; + ordered-by user; + leaf name { + type string; + description + "SAD-entry-unique name to identify this + entry."; + } + leaf reqid { + type uint64; + default "0"; + description + "This value allows linking this + IPsec SA with an IPsec policy with + the same reqid."; + } + container ipsec-sa-config { + description + "This container allows configuring + details of an IPsec SA."; + leaf spi { + type uint32 { + range "0..max"; + } + mandatory true; + description + "IPsec SA of Security Parameter Index (SPI)."; + } + leaf ext-seq-num { + type boolean; + default "true"; + description + "True if this IPsec SA is using extended + sequence numbers. If true, the 64-bit + extended sequence number counter is used; + if false, the normal 32-bit sequence + number counter is used."; + } + leaf seq-overflow { + type boolean; + default "false"; + description + "The flag indicating whether + overflow of the sequence number + counter should prevent transmission + of additional packets on the IPsec + SA (false) and, therefore, needs to + be rekeyed or whether rollover is + permitted (true). If Authenticated + Encryption with Associated Data + (AEAD) is used (leaf + esp-algorithms/encryption/algorithm-type), + this flag MUST BE false. Setting this + flag to true is strongly discouraged."; + } + leaf anti-replay-window-size { + type uint32; + default "64"; + description + "To set the anti-replay window size. + The default value is set to 64, + following the recommendation in RFC 4303."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Section 3.4.3."; + } + container traffic-selector { + uses nsfikec:selector-grouping; + description + "The IPsec SA Traffic Selector."; + } + leaf protocol-parameters { + type nsfikec:ipsec-protocol-params; + default "esp"; + description + "Security protocol of IPsec SA, only + ESP so far."; + } + leaf mode { + type nsfikec:ipsec-mode; + default "transport"; + description + "Tunnel or transport mode."; + } + container esp-sa { + when "../protocol-parameters = 'esp'"; + description + "In case the IPsec SA is an + Encapsulation Security Payload + (ESP), it is required to specify + encryption and integrity + algorithms and key materials."; + container encryption { + description + "Configuration of encryption or + AEAD algorithm for IPsec + Encapsulation Security Payload + (ESP)."; + leaf encryption-algorithm { + type nsfikec:encr-alg-t; + default "12"; + description + "Configuration of ESP + encryption. With AEAD + algorithms, the integrity-algorithm + leaf is not used."; + } + leaf key { + nacm:default-deny-all; + type yang:hex-string; + description + "ESP encryption key value. + If this leaf is not defined, + the key is not defined + (e.g., encryption is NULL). + The key length is + determined by the + length of the key set in + this leaf. By default, it is + 128 bits."; + } + leaf iv { + nacm:default-deny-all; + type yang:hex-string; + description + "ESP encryption IV value. If + this leaf is not defined, the + IV is not defined (e.g., + encryption is NULL)."; + } + } + container integrity { + description + "Configuration of integrity for + IPsec Encapsulation Security + Payload (ESP). This container + allows configuration of integrity + algorithms when no AEAD + algorithms are used and + integrity is required."; + leaf integrity-algorithm { + type nsfikec:intr-alg-t; + default "12"; + description + "Message Authentication Code + (MAC) algorithm to provide + integrity in ESP (default + AUTH_HMAC_SHA2_256_128). + With AEAD algorithms, + the integrity leaf is not + used."; + } + leaf key { + nacm:default-deny-all; + type yang:hex-string; + description + "ESP integrity key value. + If this leaf is not defined, + the key is not defined (e.g., + AEAD algorithm is chosen and + integrity algorithm is not + required). The key length is + determined by the length of + the key configured."; + } + } + } /*container esp-sa*/ + container sa-lifetime-hard { + description + "IPsec SA hard lifetime. The action + associated is terminate and hold."; + uses nsfikec:lifetime; + } + container sa-lifetime-soft { + description + "IPsec SA soft lifetime."; + uses nsfikec:lifetime; + leaf action { + type nsfikec:lifetime-action; + description + "Action lifetime: terminate-clear, + terminate-hold, or replace."; + } + } + container tunnel { + when "../mode = 'tunnel'"; + uses nsfikec:tunnel-grouping; + leaf-list dscp-values { + type inet:dscp; + description + "DSCP values allowed for ingress packets carried + over this IPsec SA. If no values are specified, no + DSCP-specific filtering is applied. When + ../bypass-dscp is false and a dscp-mapping is + defined, each value here would be the same as the + 'inner' DSCP value for the DSCP mapping (list + dscp-mapping)."; + reference + "RFC 4301: Security Architecture for the Internet + Protocol, Section 4.4.2.1."; + } + description + "Endpoints of the IPsec tunnel."; + } + container encapsulation-type { + uses nsfikec:encap; + description + "This container carries + configuration information about + the source and destination ports + that will be used for ESP + encapsulation of ESP packets and + the type of encapsulation when NAT + traversal is in place."; + } + } /*ipsec-sa-config*/ + container ipsec-sa-state { + config false; + description + "Container describing IPsec SA state + data."; + container sa-lifetime-current { + uses nsfikec:lifetime; + description + "SAD lifetime current."; + } + container replay-stats { + description + "State data about the anti-replay + window."; + container replay-window { + leaf w { + type uint32; + description + "Size of the replay window."; + } + leaf t { + type uint64; + description + "Highest sequence number + authenticated so far, + upper bound of window."; + } + leaf b { + type uint64; + description + "Lower bound of window."; + } + description + "This container contains three + parameters that define the state + of the replay window: window size (w), + highest sequence number authenticated (t), + and lower bound of the window (b), according + to Appendix A2.1 in RFC 4303 (w = t - b + 1)."; + reference + "RFC 4303: IP Encapsulating Security Payload (ESP), + Appendix A."; + } + leaf packet-dropped { + type yang:counter64; + description + "Packets dropped + because they are + replay packets."; + } + leaf failed { + type yang:counter64; + description + "Number of packets detected out + of the replay window."; + } + leaf seq-number-counter { + type uint64; + description + "A 64-bit counter when this + IPsec SA is using Extended + Sequence Number or 32-bit + counter when it is not. + Current value of sequence + number."; + } + } /* container replay-stats*/ + } /*ipsec-sa-state*/ + description + "List of SAD entries that form the SAD."; + } /*list sad-entry*/ + } /*container sad*/ + } /*container ipsec-ikeless*/ + + /* Notifications */ + + notification sadb-acquire { + if-feature "ikeless-notification"; + description + "The NSF detects and notifies that + an IPsec SA is required for an + outbound IP packet that has matched an SPD entry. + The traffic-selector container in this + notification contains information about + the IP packet that triggered this + notification."; + leaf ipsec-policy-name { + type string; + mandatory true; + description + "It contains the SPD entry name (unique) of + the IPsec policy that hits the IP-packet-required + IPsec SA. It is assumed the + I2NSF Controller will have a copy of the + information of this policy so it can + extract all the information with this + unique identifier. The type of IPsec SA is + defined in the policy so the security + controller can also know the type of IPsec + SA that MUST be generated."; + } + container traffic-selector { + description + "The IP packet that triggered the acquire + and requires an IPsec SA. Specifically, it + will contain the IP source/mask and IP + destination/mask, protocol (udp, tcp, + etc.), and source and destination + ports."; + uses nsfikec:selector-grouping; + } + } + + notification sadb-expire { + if-feature "ikeless-notification"; + description + "An IPsec SA expiration (soft or hard)."; + leaf ipsec-sa-name { + type string; + mandatory true; + description + "It contains the SAD entry name (unique) of + the IPsec SA that is about to expire. It is assumed + the I2NSF Controller will have a copy of the + IPsec SA information (except the cryptographic + material and state data) indexed by this name + (unique identifier) so it can know all the + information (crypto algorithms, etc.) about + the IPsec SA that has expired in order to + perform a rekey (soft lifetime) or delete it + (hard lifetime) with this unique identifier."; + } + leaf soft-lifetime-expire { + type boolean; + default "true"; + description + "If this value is true, the lifetime expired is + soft. If it is false, the lifetime is hard."; + } + container lifetime-current { + description + "IPsec SA current lifetime. If + soft-lifetime-expired is true, + this container is set with the + lifetime information about current + soft lifetime. + It can help the NSF Controller + to know which of the (soft) lifetime + limits raised the event: time, bytes, + packets, or idle."; + uses nsfikec:lifetime; + } + } + + notification sadb-seq-overflow { + if-feature "ikeless-notification"; + description + "Sequence overflow notification."; + leaf ipsec-sa-name { + type string; + mandatory true; + description + "It contains the SAD entry name (unique) of + the IPsec SA that is about to have a sequence + number overflow, and rollover is not permitted. + When the NSF issues this event before reaching + a sequence number, overflow is implementation + specific and out of scope of this specification. + It is assumed the I2NSF Controller will have a + copy of the IPsec SA information (except the + cryptographic material and state data) indexed + by this name (unique identifier) so it can + know all the information (crypto algorithms, + etc.) about the IPsec SA in + order to perform a rekey of the IPsec SA."; + } + } + + notification sadb-bad-spi { + if-feature "ikeless-notification"; + description + "Notify when the NSF receives a packet with an + incorrect SPI (i.e., not present in the SAD)."; + leaf spi { + type uint32 { + range "0..max"; + } + mandatory true; + description + "SPI number contained in the erroneous IPsec + packet."; + } + } +} diff --git a/models/ietf/RFC/ietf-i2rs-rib.yang b/models/ietf/RFC/ietf-i2rs-rib.yang new file mode 100644 index 0000000000000000000000000000000000000000..a824017daa33917a5eab193891524b3ba3fd38cd --- /dev/null +++ b/models/ietf/RFC/ietf-i2rs-rib.yang @@ -0,0 +1,2155 @@ +module ietf-i2rs-rib { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib"; + prefix iir; + + import ietf-inet-types { + prefix inet; + reference "RFC 6991"; + } + import ietf-interfaces { + prefix if; + reference "RFC 8344"; + } + import ietf-yang-types { + prefix yang; + reference "RFC 6991"; + } + + organization + "IETF I2RS (Interface to Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Lixing Wang + <mailto:wang_little_star@sina.com> + + Editor: Mach(Guoyi) Chen + <mailto:mach.chen@huawei.com> + + Editor: Amit Dass + <mailto:dass.amit@gmail.com> + + Editor: Hariharan Ananthakrishnan + <mailto:hari@netflix.com> + + Editor: Sriganesh Kini + <mailto:sriganeshkini@gmail.com> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com>"; + description + "This module defines a YANG data model for + Routing Information Base (RIB) that aligns + with the I2RS RIB information model. + + Copyright (c) 2018 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8341; see + the RFC itself for full legal notices."; + + revision 2018-09-13 { + description + "initial revision"; + reference "RFC 8431"; + } + + //Features + + feature nexthop-tunnel { + description + "This feature means that a node supports + tunnel nexthop capability."; + } + + feature nexthop-chain { + description + "This feature means that a node supports + chain nexthop capability."; + } + + feature nexthop-protection { + description + "This feature means that a node supports + protection nexthop capability."; + } + + feature nexthop-replicate { + description + "This feature means that a node supports + replicate nexthop capability."; + } + + feature nexthop-load-balance { + description + "This feature means that a node supports + load-balance nexthop capability."; + } + + feature ipv4-tunnel { + description + "This feature means that a node supports + IPv4 tunnel encapsulation capability."; + } + + feature ipv6-tunnel { + description + "This feature means that a node supports + IPv6 tunnel encapsulation capability."; + } + + feature mpls-tunnel { + description + "This feature means that a node supports + MPLS tunnel encapsulation capability."; + } + + feature vxlan-tunnel { + description + "This feature means that a node supports + Virtual eXtensible Local Area Network + (VXLAN) tunnel encapsulation capability."; + reference "RFC 7348"; + } + + feature gre-tunnel { + description + "This feature means that a node supports + GRE tunnel encapsulation capability."; + reference "RFC 2784"; + } + + feature nvgre-tunnel { + description + "This feature means that a node supports + Network Virtualization Using GRE (NVGRE) + tunnel encapsulation capability."; + reference "RFC 7637"; + } + feature route-vendor-attributes { + description + "This feature means that a node supports + route vendor attributes."; + } + + //Identities and Type Definitions + + identity mpls-label-action { + description + "Base identity from which all MPLS label + operations are derived. + + The MPLS label stack operations include: + push - to add a new label to a label stack + pop - to pop the top label from a label stack + swap - to exchange the top label of a label + stack with a new label"; + } + + identity label-push { + base mpls-label-action; + description + "MPLS label stack operation: push."; + } + + identity label-pop { + base mpls-label-action; + description + "MPLS label stack operation: pop."; + } + + identity label-swap { + base mpls-label-action; + description + "MPLS label stack operation: swap."; + } + + typedef mpls-label-action-definition { + type identityref { + base mpls-label-action; + } + description + "MPLS label action definition."; + } + + identity tunnel-decapsulation-action { + description + "Base identity from which all tunnel decapsulation + actions are derived. + Tunnel decapsulation actions include + ipv4-decapsulation (to decapsulate an IPv4 tunnel) + ipv6-decapsulation (to decapsulate an IPv6 tunnel)"; + } + + identity ipv4-decapsulation { + base tunnel-decapsulation-action; + description + "IPv4 tunnel decapsulation."; + } + + identity ipv6-decapsulation { + base tunnel-decapsulation-action; + description + "IPv6 tunnel decapsulation."; + } + + typedef tunnel-decapsulation-action-definition { + type identityref { + base tunnel-decapsulation-action; + } + description + "Tunnel decapsulation definition."; + } + + identity ttl-action { + description + "Base identity from which all TTL + actions are derived."; + } + + identity no-action { + base ttl-action; + description + "Do nothing regarding the TTL."; + } + + identity copy-to-inner { + base ttl-action; + description + "Copy the TTL of the outer header + to the inner header."; + } + + identity decrease-and-copy-to-inner { + base ttl-action; + description + "Decrease TTL by one and copy the TTL + to the inner header."; + } + + identity decrease-and-copy-to-next { + base ttl-action; + description + "Decrease TTL by one and copy the TTL + to the next header; for example, when + MPLS label swapping, decrease the TTL + of the in_label and copy it to the + out_label."; + } + + typedef ttl-action-definition { + type identityref { + base ttl-action; + } + description + "TTL action definition."; + } + + identity hop-limit-action { + description + "Base identity from which all hop limit + actions are derived."; + } + + identity hop-limit-no-action { + base hop-limit-action; + description + "Do nothing regarding the hop limit."; + } + + identity hop-limit-copy-to-inner { + base hop-limit-action; + description + "Copy the hop limit of the outer header + to the inner header."; + } + + typedef hop-limit-action-definition { + type identityref { + base hop-limit-action; + } + description + "IPv6 hop limit action definition."; + } + + identity special-nexthop { + description + "Base identity from which all special + nexthops are derived."; + } + + identity discard { + base special-nexthop; + description + "This indicates that the network + device should drop the packet and + increment a drop counter."; + } + + identity discard-with-error { + base special-nexthop; + description + "This indicates that the network + device should drop the packet, + increment a drop counter, and send + back an appropriate error message + (like ICMP error)."; + } + + identity receive { + base special-nexthop; + description + "This indicates that the traffic is + destined for the network device, e.g., + protocol packets or Operations, + Administration, and Maintenance (OAM) packets. + All locally destined traffic SHOULD be + throttled to avoid a denial-of-service + attack on the router's control plane. An + optional rate-limiter can be specified + to indicate how to throttle traffic + destined for the control plane."; + } + + identity cos-value { + base special-nexthop; + description + "Cos-value special nexthop."; + } + + typedef special-nexthop-definition { + type identityref { + base special-nexthop; + } + description + "Special nexthop definition."; + } + + identity ip-route-match-type { + description + "Base identity from which all route + match types are derived. + The route match type could be: + match source, or + match destination, or + match source and destination."; + } + + identity match-ip-src { + base ip-route-match-type; + description + "Source route match type."; + } + + identity match-ip-dest { + base ip-route-match-type; + description + "Destination route match type"; + } + + identity match-ip-src-dest { + base ip-route-match-type; + description + "Source and Destination route match type"; + } + + typedef ip-route-match-type-definition { + type identityref { + base ip-route-match-type; + } + description + "IP route match type definition."; + } + + identity address-family { + description + "Base identity from which all RIB + address families are derived."; + } + identity ipv4-address-family { + base address-family; + description + "IPv4 RIB address family."; + } + + identity ipv6-address-family { + base address-family; + description + "IPv6 RIB address family."; + } + + identity mpls-address-family { + base address-family; + description + "MPLS RIB address family."; + } + + identity ieee-mac-address-family { + base address-family; + description + "MAC RIB address family."; + } + + typedef address-family-definition { + type identityref { + base address-family; + } + description + "RIB address family definition."; + } + + identity route-type { + description + "Base identity from which all route types + are derived."; + } + + identity ipv4-route { + base route-type; + description + "IPv4 route type."; + } + + identity ipv6-route { + base route-type; + description + "IPv6 route type."; + } + + identity mpls-route { + base route-type; + description + "MPLS route type."; + } + + identity ieee-mac { + base route-type; + description + "MAC route type."; + } + + identity interface { + base route-type; + description + "Interface route type."; + } + + typedef route-type-definition { + type identityref { + base route-type; + } + description + "Route type definition."; + } + + identity tunnel-type { + description + "Base identity from which all tunnel + types are derived."; + } + + identity ipv4-tunnel { + base tunnel-type; + description + "IPv4 tunnel type"; + } + + identity ipv6-tunnel { + base tunnel-type; + description + "IPv6 tunnel type"; + } + + identity mpls-tunnel { + base tunnel-type; + description + "MPLS tunnel type"; + } + + identity gre-tunnel { + base tunnel-type; + description + "GRE tunnel type"; + } + + identity vxlan-tunnel { + base tunnel-type; + description + "VXLAN tunnel type"; + } + + identity nvgre-tunnel { + base tunnel-type; + description + "NVGRE tunnel type"; + } + + typedef tunnel-type-definition { + type identityref { + base tunnel-type; + } + description + "Tunnel type definition."; + } + + identity route-state { + description + "Base identity from which all route + states are derived."; + } + + identity active { + base route-state; + description + "Active state."; + } + + identity inactive { + base route-state; + description + "Inactive state."; + } + + typedef route-state-definition { + type identityref { + base route-state; + } + description + "Route state definition."; + } + + identity nexthop-state { + description + "Base identity from which all nexthop + states are derived."; + } + + identity resolved { + base nexthop-state; + description + "Resolved nexthop state."; + } + + identity unresolved { + base nexthop-state; + description + "Unresolved nexthop state."; + } + + typedef nexthop-state-definition { + type identityref { + base nexthop-state; + } + description + "Nexthop state definition."; + } + + identity route-installed-state { + description + "Base identity from which all route + installed states are derived."; + } + + identity uninstalled { + base route-installed-state; + description + "Uninstalled state."; + } + + identity installed { + base route-installed-state; + description + "Installed state."; + } + + typedef route-installed-state-definition { + type identityref { + base route-installed-state; + } + description + "Route installed state definition."; + } + + //Route Change Reason Identities + + identity route-change-reason { + description + "Base identity from which all route change + reasons are derived."; + } + + identity lower-route-preference { + base route-change-reason; + description + "This route was installed in the FIB because it had + a lower route preference value (and thus was more + preferred) than the route it replaced."; + } + + identity higher-route-preference { + base route-change-reason; + description + "This route was uninstalled from the FIB because it had + a higher route preference value (and thus was less + preferred) than the route that replaced it."; + } + + identity resolved-nexthop { + base route-change-reason; + description + "This route was made active because at least + one of its nexthops was resolved."; + } + + identity unresolved-nexthop { + base route-change-reason; + description + "This route was made inactive because all of + its nexthops are unresolved."; + } + + typedef route-change-reason-definition { + type identityref { + base route-change-reason; + } + description + "Route change reason definition."; + } + + typedef nexthop-preference-definition { + type uint8 { + range "1..99"; + } + description + "Nexthop-preference is used for protection schemes. + It is an integer value between 1 and 99. Lower + values are preferred. To download N + nexthops to the FIB, the N nexthops with the lowest + value are selected. If there are more than N + nexthops that have the same preference, an + implementation of the I2RS client should select N + nexthops and download them. As for how to select + the nexthops, this is left to the implementations."; + } + + typedef nexthop-lb-weight-definition { + type uint8 { + range "1..99"; + } + description + "Nexthop-lb-weight is used for load-balancing. + Each list member SHOULD be assigned a weight + between 1 and 99. The weight determines the + proportion of traffic to be sent over a nexthop + used for forwarding as a ratio of the weight of + this nexthop divided by the sum of the weights + of all the nexthops of this route that are used + for forwarding. To perform equal load-balancing, + one MAY specify a weight of 0 for all the member + nexthops. The value 0 is reserved for equal + load-balancing and, if applied, MUST be applied + to all member nexthops. + Note that the weight of 0 is special because of + historical reasons. It's typically used in + hardware devices to signify ECMP."; + } + + typedef nexthop-ref { + type leafref { + path "/iir:routing-instance" + + "/iir:rib-list" + + "/iir:route-list" + + "/iir:nexthop" + + "/iir:nexthop-id"; + } + description + "A nexthop reference that provides + an indirection reference to a nexthop."; + } + + //Groupings + + grouping route-prefix { + description + "The common attributes used for all types of route prefixes."; + leaf route-index { + type uint64; + mandatory true; + description + "Route index."; + } + container match { + description + "The match condition specifies the + kind of route (IPv4, MPLS, etc.) + and the set of fields to match on."; + choice route-type { + description + "Route types: IPv4, IPv6, MPLS, MAC, etc."; + case ipv4 { + description + "IPv4 route case."; + container ipv4 { + description + "IPv4 route match."; + choice ip-route-match-type { + description + "IP route match type options: + match source, or + match destination, or + match source and destination."; + case dest-ipv4-address { + leaf dest-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "An IPv4 destination address as the match."; + } + } + case src-ipv4-address { + leaf src-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "An IPv4 source address as the match."; + } + } + case dest-src-ipv4-address { + container dest-src-ipv4-address { + description + "A combination of an IPv4 source and + an IPv4 destination address as the match."; + leaf dest-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "The IPv4 destination address of the match."; + } + leaf src-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "The IPv4 source address of the match."; + } + } + } + } + } + } + case ipv6 { + description + "IPv6 route case."; + container ipv6 { + description + "IPv6 route match."; + choice ip-route-match-type { + description + "IP route match type options: + match source, + match destination, or + match source and destination."; + case dest-ipv6-address { + leaf dest-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "An IPv6 destination address as the match."; + } + } + case src-ipv6-address { + leaf src-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "An IPv6 source address as the match."; + } + } + case dest-src-ipv6-address { + container dest-src-ipv6-address { + description + "A combination of an IPv6 source and + an IPv6 destination address as the match."; + leaf dest-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "The IPv6 destination address of the match."; + } + leaf src-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "The IPv6 source address of the match."; + } + } + } + } + } + } + case mpls-route { + description + "MPLS route case."; + leaf mpls-label { + type uint32; + mandatory true; + description + "The label used for matching."; + } + } + case mac-route { + description + "MAC route case."; + leaf mac-address { + type yang:mac-address; + mandatory true; + description + "The MAC address used for matching."; + } + } + case interface-route { + description + "Interface route case."; + leaf interface-identifier { + type if:interface-ref; + mandatory true; + description + "The interface used for matching."; + } + } + } + } + } + + grouping route { + description + "The common attributes used for all types of routes."; + uses route-prefix; + container nexthop { + description + "The nexthop of the route."; + uses nexthop; + } + //In the information model, it is called route-statistic + container route-status { + description + "The status information of the route."; + leaf route-state { + type route-state-definition; + config false; + description + "Indicate a route's state: active or inactive."; + } + leaf route-installed-state { + type route-installed-state-definition; + config false; + description + "Indicate that a route's installed states: + installed or uninstalled."; + } + leaf route-reason { + type route-change-reason-definition; + config false; + description + "Indicate the reason that caused the route change."; + } + } + container route-attributes { + description + "Route attributes."; + uses route-attributes; + } + container route-vendor-attributes { + description + "Route vendor attributes."; + uses route-vendor-attributes; + } + } + + grouping nexthop-list { + description + "A generic nexthop list."; + list nexthop-list { + key "nexthop-member-id"; + description + "A list of nexthops."; + leaf nexthop-member-id { + type uint32; + mandatory true; + description + "A nexthop identifier that points + to a nexthop list member. + A nexthop list member is a nexthop."; + } + } + } + + grouping nexthop-list-p { + description + "A nexthop list with preference parameter."; + list nexthop-list { + key "nexthop-member-id"; + description + "A list of nexthop."; + leaf nexthop-member-id { + type uint32; + mandatory true; + description + "A nexthop identifier that points + to a nexthop list member. + A nexthop list member is a nexthop."; + } + leaf nexthop-preference { + type nexthop-preference-definition; + mandatory true; + description + "Nexthop-preference is used for protection schemes. + It is an integer value between 1 and 99. Lower + values are more preferred. To download a + primary/standby/tertiary group to the FIB, the + nexthops that are resolved and are most preferred + are selected."; + } + } + } + + grouping nexthop-list-w { + description + "A nexthop list with a weight parameter."; + list nexthop-list { + key "nexthop-member-id"; + description + "A list of nexthop."; + leaf nexthop-member-id { + type uint32; + mandatory true; + description + "A nexthop identifier that points + to a nexthop list member. + A nexthop list member is a nexthop."; + } + leaf nexthop-lb-weight { + type nexthop-lb-weight-definition; + mandatory true; + description + "The weight of a nexthop of + the load-balance nexthops."; + } + } + } + + grouping nexthop { + description + "The nexthop structure."; + leaf nexthop-id { + type uint32; + description + "An identifier that refers to a nexthop."; + } + leaf sharing-flag { + type boolean; + description + "To indicate whether a nexthop is sharable + or non-sharable: + true - sharable (which means the nexthop can be + shared with other routes) + false - non-sharable (which means the nexthop can + not be shared with other routes)"; + } + choice nexthop-type { + description + "Nexthop type options."; + case nexthop-base { + container nexthop-base { + description + "The base nexthop."; + uses nexthop-base; + } + } + case nexthop-chain { + if-feature "nexthop-chain"; + container nexthop-chain { + description + "A chain nexthop."; + uses nexthop-list; + } + } + case nexthop-replicate { + if-feature "nexthop-replicate"; + container nexthop-replicate { + description + "A replicate nexthop."; + uses nexthop-list; + } + } + case nexthop-protection { + if-feature "nexthop-protection"; + container nexthop-protection { + description + "A protection nexthop."; + uses nexthop-list-p; + } + } + case nexthop-load-balance { + if-feature "nexthop-load-balance"; + container nexthop-lb { + description + "A load-balance nexthop."; + uses nexthop-list-w; + } + } + } + } + + grouping nexthop-base { + description + "The base nexthop."; + choice nexthop-base-type { + description + "Nexthop base type options."; + case special-nexthop { + leaf special { + type special-nexthop-definition; + description + "A special nexthop."; + } + } + case egress-interface-nexthop { + leaf outgoing-interface { + type if:interface-ref; + mandatory true; + description + "The nexthop is an outgoing interface."; + } + } + case ipv4-address-nexthop { + leaf ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "The nexthop is an IPv4 address."; + } + } + case ipv6-address-nexthop { + leaf ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "The nexthop is an IPv6 address."; + } + } + case egress-interface-ipv4-nexthop { + container egress-interface-ipv4-address { + leaf outgoing-interface { + type if:interface-ref; + mandatory true; + description + "Name of the outgoing interface."; + } + leaf ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "The nexthop points to an interface with + an IPv4 address."; + } + description + "The nexthop is an egress-interface and an IP + address. This can be used in cases where, e.g., + the IP address is a link-local address."; + } + } + case egress-interface-ipv6-nexthop { + container egress-interface-ipv6-address { + leaf outgoing-interface { + type if:interface-ref; + mandatory true; + description + "Name of the outgoing interface."; + } + leaf ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "The nexthop points to an interface with + an IPv6 address."; + } + description + "The nexthop is an egress-interface and an IP + address. This can be used in cases where, e.g., + the IP address is a link-local address."; + } + } + case egress-interface-mac-nexthop { + container egress-interface-mac-address { + leaf outgoing-interface { + type if:interface-ref; + mandatory true; + description + "Name of the outgoing interface."; + } + leaf ieee-mac-address { + type yang:mac-address; + mandatory true; + description + "The nexthop points to an interface with + a specific MAC address."; + } + description + "The egress-interface must be an Ethernet + interface. Address resolution is not required + for this nexthop."; + } + } + case tunnel-encapsulation-nexthop { + if-feature "nexthop-tunnel"; + container tunnel-encapsulation { + uses tunnel-encapsulation; + description + "This can be an encapsulation representing an IP + tunnel, MPLS tunnel, or others as defined in the info + model. An optional egress-interface can be chained + to the tunnel encapsulation to indicate which + interface to send the packet out on. The + egress-interface is useful when the network device + contains Ethernet interfaces and one needs to + perform address resolution for the IP packet."; + } + } + case tunnel-decapsulation-nexthop { + if-feature "nexthop-tunnel"; + container tunnel-decapsulation { + uses tunnel-decapsulation; + description + "This is to specify the decapsulation of a tunnel + header."; + } + } + case logical-tunnel-nexthop { + if-feature "nexthop-tunnel"; + container logical-tunnel { + uses logical-tunnel; + description + "This can be an MPLS Label Switched Path (LSP) + or a GRE tunnel (or others as defined in this + document) that is represented by a unique + identifier (e.g., name)."; + } + } + case rib-name-nexthop { + leaf rib-name { + type string; + description + "A nexthop pointing to a RIB indicates that the + route lookup needs to continue in the specified + RIB. This is a way to perform chained lookups."; + } + } + case nexthop-identifier { + leaf nexthop-ref { + type nexthop-ref; + mandatory true; + description + "A nexthop reference that points to a nexthop."; + } + } + } + } + + grouping route-vendor-attributes { + description + "Route vendor attributes."; + } + + grouping logical-tunnel { + description + "A logical tunnel that is identified + by a type and a tunnel name."; + leaf tunnel-type { + type tunnel-type-definition; + mandatory true; + description + "A tunnel type."; + } + leaf tunnel-name { + type string; + mandatory true; + description + "A tunnel name that points to a logical tunnel."; + } + } + + grouping ipv4-header { + description + "The IPv4 header encapsulation information."; + leaf src-ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "The source IP address of the header."; + } + leaf dest-ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "The destination IP address of the header."; + } + leaf protocol { + type uint8; + mandatory true; + description + "The protocol id of the header."; + } + leaf ttl { + type uint8; + description + "The TTL of the header."; + } + leaf dscp { + type uint8; + description + "The Differentiated Services Code Point + (DSCP) field of the header."; + } + } + + grouping ipv6-header { + description + "The IPv6 header encapsulation information."; + leaf src-ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "The source IP address of the header."; + } + leaf dest-ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "The destination IP address of the header."; + } + leaf next-header { + type uint8; + mandatory true; + description + "The next header of the IPv6 header."; + } + leaf traffic-class { + type uint8; + description + "The traffic class value of the header."; + } + leaf flow-label { + type inet:ipv6-flow-label; + description + "The flow label of the header."; + } + leaf hop-limit { + type uint8 { + range "1..255"; + } + description + "The hop limit of the header."; + } + } + + grouping nvgre-header { + description + "The NVGRE header encapsulation information."; + choice nvgre-type { + description + "NVGRE can use either an IPv4 + or an IPv6 header for encapsulation."; + case ipv4 { + uses ipv4-header; + } + case ipv6 { + uses ipv6-header; + } + } + leaf virtual-subnet-id { + type uint32; + mandatory true; + description + "The subnet identifier of the NVGRE header."; + } + leaf flow-id { + type uint8; + description + "The flow identifier of the NVGRE header."; + } + } + grouping vxlan-header { + description + "The VXLAN encapsulation header information."; + choice vxlan-type { + description + "NVGRE can use either an IPv4 + or an IPv6 header for encapsulation."; + case ipv4 { + uses ipv4-header; + } + case ipv6 { + uses ipv6-header; + } + } + leaf vxlan-identifier { + type uint32; + mandatory true; + description + "The VXLAN identifier of the VXLAN header."; + } + } + + grouping gre-header { + description + "The GRE encapsulation header information."; + choice dest-address-type { + description + "GRE options: IPv4 and IPv6"; + case ipv4 { + leaf ipv4-dest { + type inet:ipv4-address; + mandatory true; + description + "The destination IP address of the GRE header."; + } + } + case ipv6 { + leaf ipv6-dest { + type inet:ipv6-address; + mandatory true; + description + "The destination IP address of the GRE header."; + } + } + } + leaf protocol-type { + type uint16; + mandatory true; + description + "The protocol type of the GRE header."; + } + leaf key { + type uint64; + description + "The GRE key of the GRE header."; + } + } + + grouping mpls-header { + description + "The MPLS encapsulation header information."; + list label-operations { + key "label-oper-id"; + description + "Label operations."; + leaf label-oper-id { + type uint32; + description + "An optional identifier that points + to a label operation."; + } + choice label-actions { + description + "Label action options."; + case label-push { + container label-push { + description + "Label push operation."; + leaf label { + type uint32; + mandatory true; + description + "The label to be pushed."; + } + leaf s-bit { + type boolean; + description + "The s-bit ('Bottom of Stack' bit) of the label to be + pushed."; + } + leaf tc-value { + type uint8; + description + "The traffic class value of the label to be pushed."; + } + leaf ttl-value { + type uint8; + description + "The TTL value of the label to be pushed."; + } + } + } + case label-swap { + container label-swap { + description + "Label swap operation."; + leaf in-label { + type uint32; + mandatory true; + description + "The label to be swapped."; + } + leaf out-label { + type uint32; + mandatory true; + description + "The out MPLS label."; + } + leaf ttl-action { + type ttl-action-definition; + description + "The label TTL actions: + - No-action + - Copy to inner label + - Decrease (the in-label) + by 1 and copy to the out-label"; + } + } + } + } + } + } + + grouping tunnel-encapsulation { + description + "Tunnel encapsulation information."; + choice tunnel-type { + description + "Tunnel options for nexthops."; + case ipv4 { + if-feature "ipv4-tunnel"; + container ipv4-header { + uses ipv4-header; + description + "IPv4 header."; + } + } + case ipv6 { + if-feature "ipv6-tunnel"; + container ipv6-header { + uses ipv6-header; + description + "IPv6 header."; + } + } + case mpls { + if-feature "mpls-tunnel"; + container mpls-header { + uses mpls-header; + description + "MPLS header."; + } + } + case gre { + if-feature "gre-tunnel"; + container gre-header { + uses gre-header; + description + "GRE header."; + } + } + case nvgre { + if-feature "nvgre-tunnel"; + container nvgre-header { + uses nvgre-header; + description + "NVGRE header."; + } + } + case vxlan { + if-feature "vxlan-tunnel"; + container vxlan-header { + uses vxlan-header; + description + "VXLAN header."; + } + } + } + } + + grouping tunnel-decapsulation { + description + "Tunnel decapsulation information."; + choice tunnel-type { + description + "Nexthop tunnel type options."; + case ipv4 { + if-feature "ipv4-tunnel"; + container ipv4-decapsulation { + description + "IPv4 decapsulation."; + leaf ipv4-decapsulation { + type tunnel-decapsulation-action-definition; + mandatory true; + description + "IPv4 decapsulation operations."; + } + leaf ttl-action { + type ttl-action-definition; + description + "The TTL actions: + no-action or copy to inner header."; + } + } + } + case ipv6 { + if-feature "ipv6-tunnel"; + container ipv6-decapsulation { + description + "IPv6 decapsulation."; + leaf ipv6-decapsulation { + type tunnel-decapsulation-action-definition; + mandatory true; + description + "IPv6 decapsulation operations."; + } + leaf hop-limit-action { + type hop-limit-action-definition; + description + "The hop limit actions: + no-action or copy to inner header."; + } + } + } + case mpls { + if-feature "mpls-tunnel"; + container label-pop { + description + "MPLS decapsulation."; + leaf label-pop { + type mpls-label-action-definition; + mandatory true; + description + "Pop a label from the label stack."; + } + leaf ttl-action { + type ttl-action-definition; + description + "The label TTL action."; + } + } + } + } + } + + grouping route-attributes { + description + "Route attributes."; + leaf route-preference { + type uint32; + mandatory true; + description + "ROUTE_PREFERENCE: This is a numerical value that + allows for comparing routes from different + protocols. Static configuration is also + considered a protocol for the purpose of this + field. It is also known as administrative-distance. + The lower the value, the higher the preference."; + } + leaf local-only { + type boolean; + mandatory true; + description + "Indicate whether the attribute is local only."; + } + container address-family-route-attributes { + description + "Address-family-related route attributes."; + choice route-type { + description + "Address-family-related route attributes. Future + documents should specify these attributes by augmenting + the cases in this choice."; + case ip-route-attributes { + } + case mpls-route-attributes { + } + case ethernet-route-attributes { + } + } + } + } + + container routing-instance { + description + "A routing instance, in the context of + the RIB information model, is a collection + of RIBs, interfaces, and routing parameters."; + leaf name { + type string; + description + "The name of the routing instance. This MUST + be unique across all routing instances in + a given network device."; + } + list interface-list { + key "name"; + description + "This represents the list of interfaces associated + with this routing instance. The interface list helps + constrain the boundaries of packet forwarding. + Packets coming on these interfaces are directly + associated with the given routing instance. The + interface list contains a list of identifiers with + each identifier uniquely identifying an interface."; + leaf name { + type if:interface-ref; + description + "A reference to the name of a network-layer interface."; + } + } + leaf router-id { + type yang:dotted-quad; + description + "Router ID: The 32-bit number in the form of a dotted quad."; + } + leaf lookup-limit { + type uint8; + description + "A limit on how many levels of a lookup can be performed."; + } + list rib-list { + key "name"; + description + "A list of RIBs that are associated with the routing + instance."; + leaf name { + type string; + mandatory true; + description + "A reference to the name of each RIB."; + } + leaf address-family { + type address-family-definition; + mandatory true; + description + "The address family of a RIB."; + } + leaf ip-rpf-check { + type boolean; + description + "Each RIB can be optionally associated with a + ENABLE_IP_RPF_CHECK attribute that enables Reverse + Path Forwarding (RPF) checks on all IP routes in that + RIB. An RPF check is used to + prevent spoofing and limit malicious traffic."; + } + list route-list { + key "route-index"; + description + "A list of routes of a RIB."; + uses route; + } + // This is a list that maintains the nexthops added to the RIB. + uses nexthop-list; + } + } + + //RPC Operations + + rpc rib-add { + description + "To add a RIB to an instance"; + input { + leaf name { + type string; + mandatory true; + description + "A reference to the name of the RIB + that is to be added."; + } + leaf address-family { + type address-family-definition; + mandatory true; + description + "The address family of the RIB."; + } + leaf ip-rpf-check { + type boolean; + description + "Each RIB can be optionally associated with an + ENABLE_IP_RPF_CHECK attribute that enables + RPF checks on all IP routes in that + RIB. An RPF check is used to + prevent spoofing and limit malicious traffic."; + } + } + output { + leaf result { + type boolean; + mandatory true; + description + "Return the result of the rib-add operation. + true - success; + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that caused the failure."; + } + } + } + + rpc rib-delete { + description + "To delete a RIB from a routing instance. + After deleting the RIB, all routes installed + in the RIB will be deleted as well."; + input { + leaf name { + type string; + mandatory true; + description + "A reference to the name of the RIB + that is to be deleted."; + } + } + output { + leaf result { + type boolean; + mandatory true; + description + "Return the result of the rib-delete operation. + true - success; + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that caused failure."; + } + } + } + + grouping route-operation-state { + description + "Route operation state."; + leaf success-count { + type uint32; + mandatory true; + description + "The numbers of routes that are successfully + added/deleted/updated."; + } + leaf failed-count { + type uint32; + mandatory true; + description + "The numbers of the routes that fail + to be added/deleted/updated."; + } + container failure-detail { + description + "The failure detail reflects the reason why a route + operation fails. It is an array that includes the route + index and error code of the failed route."; + list failed-routes { + key "route-index"; + description + "The list of failed routes."; + leaf route-index { + type uint32; + description + "The route index of the failed route."; + } + leaf error-code { + type uint32; + description + "The error code that reflects the failure reason. + 0 - Reserved + 1 - Trying to add a repeat route + 2 - Trying to delete or update a route that does not + exist + 3 - Malformed route attributes"; + } + } + } + } + + rpc route-add { + description + "To add a route or a list of routes to a RIB"; + input { + leaf return-failure-detail { + type boolean; + default "false"; + description + "Whether to return the failure detail. + true - return the failure detail + false - do not return the failure detail + The default is false."; + } + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + container routes { + description + "The routes to be added to the RIB."; + list route-list { + key "route-index"; + description + "The list of routes to be added."; + uses route-prefix; + container route-attributes { + uses route-attributes; + description + "The route attributes."; + } + container route-vendor-attributes { + if-feature "route-vendor-attributes"; + uses route-vendor-attributes; + description + "The route vendor attributes."; + } + container nexthop { + uses nexthop; + description + "The nexthop of the added route."; + } + } + } + } + output { + uses route-operation-state; + } + } + + rpc route-delete { + description + "To delete a route or a list of routes from a RIB"; + input { + leaf return-failure-detail { + type boolean; + default "false"; + description + "Whether to return the failure detail. + true - return the failure detail + false - do not return the failure detail + The default is false."; + } + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + container routes { + description + "The routes to be added to the RIB."; + list route-list { + key "route-index"; + description + "The list of routes to be deleted."; + uses route-prefix; + } + } + } + output { + uses route-operation-state; + } + } + + grouping route-update-options { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + choice update-options { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + case update-nexthop { + container updated-nexthop { + uses nexthop; + description + "The nexthop used for updating."; + } + } + case update-route-attributes { + container updated-route-attr { + uses route-attributes; + description + "The route attributes used for updating."; + } + } + case update-route-vendor-attributes { + container updated-route-vendor-attr { + uses route-vendor-attributes; + description + "The vendor route attributes used for updating."; + } + } + } + } + + rpc route-update { + description + "To update a route or a list of routes of a RIB. + The inputs: + 1. The match conditions, which could be: + a. route prefix, + b. route attributes, or + c. nexthop. + 2. The update parameters to be used: + a. new nexthop, + b. new route attributes, or + c. nexthop. + Actions: + 1. update the nexthop + 2. update the route attributes + The outputs: + success-count - the number of routes updated + failed-count - the number of routes fail to update + failure-detail - the detail failure info + "; + input { + leaf return-failure-detail { + type boolean; + default "false"; + description + "Whether to return the failure detail. + true - return the failure detail + false - do not return the failure detail + The default is false."; + } + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + choice match-options { + description + "Match options."; + case match-route-prefix { + description + "Update the routes that match the route + prefix(es) condition."; + container input-routes { + description + "The matched routes to be updated."; + list route-list { + key "route-index"; + description + "The list of routes to be updated."; + uses route-prefix; + uses route-update-options; + } + } + } + case match-route-attributes { + description + "Update the routes that match the + route attributes condition."; + container input-route-attributes { + description + "The route attributes are used for matching."; + uses route-attributes; + } + container update-parameters { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + uses route-update-options; + } + } + case match-route-vendor-attributes { + if-feature "route-vendor-attributes"; + description + "Update the routes that match the + vendor attributes condition"; + container input-route-vendor-attributes { + description + "The vendor route attributes are used for matching."; + uses route-vendor-attributes; + } + container update-parameters-vendor { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + uses route-update-options; + } + } + case match-nexthop { + description + "Update the routes that match the nexthop."; + container input-nexthop { + description + "The nexthop used for matching."; + uses nexthop; + } + container update-parameters-nexthop { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + uses route-update-options; + } + } + } + } + output { + uses route-operation-state; + } + } + rpc nh-add { + description + "To add a nexthop to a RIB. + Inputs parameters: + 1. rib-name + 2. nexthop + Actions: + Add the nexthop to the RIB + Outputs: + 1. Operation result: + true - success + false - failed + 2. nexthop identifier"; + input { + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + uses nexthop; + } + output { + leaf result { + type boolean; + mandatory true; + description + "Return the result of the rib-add operation: + true - success + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that caused the failure."; + } + leaf nexthop-id { + type uint32; + description + "A nexthop identifier that is allocated to the nexthop."; + } + } + } + + rpc nh-delete { + description + "To delete a nexthop from a RIB"; + input { + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + uses nexthop; + } + output { + leaf result { + type boolean; + mandatory true; + description + "Return the result of the rib-add operation: + true - success; + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that caused the failure."; + } + } + } + + //Notifications + + notification nexthop-resolution-status-change { + description + "Nexthop resolution status (resolved/unresolved) + notification."; + container nexthop { + description + "The nexthop."; + uses nexthop; + } + leaf nexthop-state { + type nexthop-state-definition; + mandatory true; + description + "Nexthop resolution status (resolved/unresolved) + notification."; + } + } + + notification route-change { + description + "Route change notification."; + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + leaf address-family { + type address-family-definition; + mandatory true; + description + "The address family of a RIB."; + } + uses route-prefix; + leaf route-installed-state { + type route-installed-state-definition; + mandatory true; + description + "Indicates whether the route got installed in the FIB."; + } + leaf route-state { + type route-state-definition; + mandatory true; + description + "Indicates whether a route is active or inactive."; + } + list route-change-reasons { + key "route-change-reason"; + description + "The reasons that cause the route change. A route + change may result from several reasons; for + example, a nexthop becoming resolved will make a + route A active, which is of better preference than + a currently active route B, which results in the + route A being installed"; + leaf route-change-reason { + type route-change-reason-definition; + mandatory true; + description + "The reason that caused the route change."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-i2rs-rib@2018-09-13.yang b/models/ietf/RFC/ietf-i2rs-rib@2018-09-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..a824017daa33917a5eab193891524b3ba3fd38cd --- /dev/null +++ b/models/ietf/RFC/ietf-i2rs-rib@2018-09-13.yang @@ -0,0 +1,2155 @@ +module ietf-i2rs-rib { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib"; + prefix iir; + + import ietf-inet-types { + prefix inet; + reference "RFC 6991"; + } + import ietf-interfaces { + prefix if; + reference "RFC 8344"; + } + import ietf-yang-types { + prefix yang; + reference "RFC 6991"; + } + + organization + "IETF I2RS (Interface to Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Lixing Wang + <mailto:wang_little_star@sina.com> + + Editor: Mach(Guoyi) Chen + <mailto:mach.chen@huawei.com> + + Editor: Amit Dass + <mailto:dass.amit@gmail.com> + + Editor: Hariharan Ananthakrishnan + <mailto:hari@netflix.com> + + Editor: Sriganesh Kini + <mailto:sriganeshkini@gmail.com> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com>"; + description + "This module defines a YANG data model for + Routing Information Base (RIB) that aligns + with the I2RS RIB information model. + + Copyright (c) 2018 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8341; see + the RFC itself for full legal notices."; + + revision 2018-09-13 { + description + "initial revision"; + reference "RFC 8431"; + } + + //Features + + feature nexthop-tunnel { + description + "This feature means that a node supports + tunnel nexthop capability."; + } + + feature nexthop-chain { + description + "This feature means that a node supports + chain nexthop capability."; + } + + feature nexthop-protection { + description + "This feature means that a node supports + protection nexthop capability."; + } + + feature nexthop-replicate { + description + "This feature means that a node supports + replicate nexthop capability."; + } + + feature nexthop-load-balance { + description + "This feature means that a node supports + load-balance nexthop capability."; + } + + feature ipv4-tunnel { + description + "This feature means that a node supports + IPv4 tunnel encapsulation capability."; + } + + feature ipv6-tunnel { + description + "This feature means that a node supports + IPv6 tunnel encapsulation capability."; + } + + feature mpls-tunnel { + description + "This feature means that a node supports + MPLS tunnel encapsulation capability."; + } + + feature vxlan-tunnel { + description + "This feature means that a node supports + Virtual eXtensible Local Area Network + (VXLAN) tunnel encapsulation capability."; + reference "RFC 7348"; + } + + feature gre-tunnel { + description + "This feature means that a node supports + GRE tunnel encapsulation capability."; + reference "RFC 2784"; + } + + feature nvgre-tunnel { + description + "This feature means that a node supports + Network Virtualization Using GRE (NVGRE) + tunnel encapsulation capability."; + reference "RFC 7637"; + } + feature route-vendor-attributes { + description + "This feature means that a node supports + route vendor attributes."; + } + + //Identities and Type Definitions + + identity mpls-label-action { + description + "Base identity from which all MPLS label + operations are derived. + + The MPLS label stack operations include: + push - to add a new label to a label stack + pop - to pop the top label from a label stack + swap - to exchange the top label of a label + stack with a new label"; + } + + identity label-push { + base mpls-label-action; + description + "MPLS label stack operation: push."; + } + + identity label-pop { + base mpls-label-action; + description + "MPLS label stack operation: pop."; + } + + identity label-swap { + base mpls-label-action; + description + "MPLS label stack operation: swap."; + } + + typedef mpls-label-action-definition { + type identityref { + base mpls-label-action; + } + description + "MPLS label action definition."; + } + + identity tunnel-decapsulation-action { + description + "Base identity from which all tunnel decapsulation + actions are derived. + Tunnel decapsulation actions include + ipv4-decapsulation (to decapsulate an IPv4 tunnel) + ipv6-decapsulation (to decapsulate an IPv6 tunnel)"; + } + + identity ipv4-decapsulation { + base tunnel-decapsulation-action; + description + "IPv4 tunnel decapsulation."; + } + + identity ipv6-decapsulation { + base tunnel-decapsulation-action; + description + "IPv6 tunnel decapsulation."; + } + + typedef tunnel-decapsulation-action-definition { + type identityref { + base tunnel-decapsulation-action; + } + description + "Tunnel decapsulation definition."; + } + + identity ttl-action { + description + "Base identity from which all TTL + actions are derived."; + } + + identity no-action { + base ttl-action; + description + "Do nothing regarding the TTL."; + } + + identity copy-to-inner { + base ttl-action; + description + "Copy the TTL of the outer header + to the inner header."; + } + + identity decrease-and-copy-to-inner { + base ttl-action; + description + "Decrease TTL by one and copy the TTL + to the inner header."; + } + + identity decrease-and-copy-to-next { + base ttl-action; + description + "Decrease TTL by one and copy the TTL + to the next header; for example, when + MPLS label swapping, decrease the TTL + of the in_label and copy it to the + out_label."; + } + + typedef ttl-action-definition { + type identityref { + base ttl-action; + } + description + "TTL action definition."; + } + + identity hop-limit-action { + description + "Base identity from which all hop limit + actions are derived."; + } + + identity hop-limit-no-action { + base hop-limit-action; + description + "Do nothing regarding the hop limit."; + } + + identity hop-limit-copy-to-inner { + base hop-limit-action; + description + "Copy the hop limit of the outer header + to the inner header."; + } + + typedef hop-limit-action-definition { + type identityref { + base hop-limit-action; + } + description + "IPv6 hop limit action definition."; + } + + identity special-nexthop { + description + "Base identity from which all special + nexthops are derived."; + } + + identity discard { + base special-nexthop; + description + "This indicates that the network + device should drop the packet and + increment a drop counter."; + } + + identity discard-with-error { + base special-nexthop; + description + "This indicates that the network + device should drop the packet, + increment a drop counter, and send + back an appropriate error message + (like ICMP error)."; + } + + identity receive { + base special-nexthop; + description + "This indicates that the traffic is + destined for the network device, e.g., + protocol packets or Operations, + Administration, and Maintenance (OAM) packets. + All locally destined traffic SHOULD be + throttled to avoid a denial-of-service + attack on the router's control plane. An + optional rate-limiter can be specified + to indicate how to throttle traffic + destined for the control plane."; + } + + identity cos-value { + base special-nexthop; + description + "Cos-value special nexthop."; + } + + typedef special-nexthop-definition { + type identityref { + base special-nexthop; + } + description + "Special nexthop definition."; + } + + identity ip-route-match-type { + description + "Base identity from which all route + match types are derived. + The route match type could be: + match source, or + match destination, or + match source and destination."; + } + + identity match-ip-src { + base ip-route-match-type; + description + "Source route match type."; + } + + identity match-ip-dest { + base ip-route-match-type; + description + "Destination route match type"; + } + + identity match-ip-src-dest { + base ip-route-match-type; + description + "Source and Destination route match type"; + } + + typedef ip-route-match-type-definition { + type identityref { + base ip-route-match-type; + } + description + "IP route match type definition."; + } + + identity address-family { + description + "Base identity from which all RIB + address families are derived."; + } + identity ipv4-address-family { + base address-family; + description + "IPv4 RIB address family."; + } + + identity ipv6-address-family { + base address-family; + description + "IPv6 RIB address family."; + } + + identity mpls-address-family { + base address-family; + description + "MPLS RIB address family."; + } + + identity ieee-mac-address-family { + base address-family; + description + "MAC RIB address family."; + } + + typedef address-family-definition { + type identityref { + base address-family; + } + description + "RIB address family definition."; + } + + identity route-type { + description + "Base identity from which all route types + are derived."; + } + + identity ipv4-route { + base route-type; + description + "IPv4 route type."; + } + + identity ipv6-route { + base route-type; + description + "IPv6 route type."; + } + + identity mpls-route { + base route-type; + description + "MPLS route type."; + } + + identity ieee-mac { + base route-type; + description + "MAC route type."; + } + + identity interface { + base route-type; + description + "Interface route type."; + } + + typedef route-type-definition { + type identityref { + base route-type; + } + description + "Route type definition."; + } + + identity tunnel-type { + description + "Base identity from which all tunnel + types are derived."; + } + + identity ipv4-tunnel { + base tunnel-type; + description + "IPv4 tunnel type"; + } + + identity ipv6-tunnel { + base tunnel-type; + description + "IPv6 tunnel type"; + } + + identity mpls-tunnel { + base tunnel-type; + description + "MPLS tunnel type"; + } + + identity gre-tunnel { + base tunnel-type; + description + "GRE tunnel type"; + } + + identity vxlan-tunnel { + base tunnel-type; + description + "VXLAN tunnel type"; + } + + identity nvgre-tunnel { + base tunnel-type; + description + "NVGRE tunnel type"; + } + + typedef tunnel-type-definition { + type identityref { + base tunnel-type; + } + description + "Tunnel type definition."; + } + + identity route-state { + description + "Base identity from which all route + states are derived."; + } + + identity active { + base route-state; + description + "Active state."; + } + + identity inactive { + base route-state; + description + "Inactive state."; + } + + typedef route-state-definition { + type identityref { + base route-state; + } + description + "Route state definition."; + } + + identity nexthop-state { + description + "Base identity from which all nexthop + states are derived."; + } + + identity resolved { + base nexthop-state; + description + "Resolved nexthop state."; + } + + identity unresolved { + base nexthop-state; + description + "Unresolved nexthop state."; + } + + typedef nexthop-state-definition { + type identityref { + base nexthop-state; + } + description + "Nexthop state definition."; + } + + identity route-installed-state { + description + "Base identity from which all route + installed states are derived."; + } + + identity uninstalled { + base route-installed-state; + description + "Uninstalled state."; + } + + identity installed { + base route-installed-state; + description + "Installed state."; + } + + typedef route-installed-state-definition { + type identityref { + base route-installed-state; + } + description + "Route installed state definition."; + } + + //Route Change Reason Identities + + identity route-change-reason { + description + "Base identity from which all route change + reasons are derived."; + } + + identity lower-route-preference { + base route-change-reason; + description + "This route was installed in the FIB because it had + a lower route preference value (and thus was more + preferred) than the route it replaced."; + } + + identity higher-route-preference { + base route-change-reason; + description + "This route was uninstalled from the FIB because it had + a higher route preference value (and thus was less + preferred) than the route that replaced it."; + } + + identity resolved-nexthop { + base route-change-reason; + description + "This route was made active because at least + one of its nexthops was resolved."; + } + + identity unresolved-nexthop { + base route-change-reason; + description + "This route was made inactive because all of + its nexthops are unresolved."; + } + + typedef route-change-reason-definition { + type identityref { + base route-change-reason; + } + description + "Route change reason definition."; + } + + typedef nexthop-preference-definition { + type uint8 { + range "1..99"; + } + description + "Nexthop-preference is used for protection schemes. + It is an integer value between 1 and 99. Lower + values are preferred. To download N + nexthops to the FIB, the N nexthops with the lowest + value are selected. If there are more than N + nexthops that have the same preference, an + implementation of the I2RS client should select N + nexthops and download them. As for how to select + the nexthops, this is left to the implementations."; + } + + typedef nexthop-lb-weight-definition { + type uint8 { + range "1..99"; + } + description + "Nexthop-lb-weight is used for load-balancing. + Each list member SHOULD be assigned a weight + between 1 and 99. The weight determines the + proportion of traffic to be sent over a nexthop + used for forwarding as a ratio of the weight of + this nexthop divided by the sum of the weights + of all the nexthops of this route that are used + for forwarding. To perform equal load-balancing, + one MAY specify a weight of 0 for all the member + nexthops. The value 0 is reserved for equal + load-balancing and, if applied, MUST be applied + to all member nexthops. + Note that the weight of 0 is special because of + historical reasons. It's typically used in + hardware devices to signify ECMP."; + } + + typedef nexthop-ref { + type leafref { + path "/iir:routing-instance" + + "/iir:rib-list" + + "/iir:route-list" + + "/iir:nexthop" + + "/iir:nexthop-id"; + } + description + "A nexthop reference that provides + an indirection reference to a nexthop."; + } + + //Groupings + + grouping route-prefix { + description + "The common attributes used for all types of route prefixes."; + leaf route-index { + type uint64; + mandatory true; + description + "Route index."; + } + container match { + description + "The match condition specifies the + kind of route (IPv4, MPLS, etc.) + and the set of fields to match on."; + choice route-type { + description + "Route types: IPv4, IPv6, MPLS, MAC, etc."; + case ipv4 { + description + "IPv4 route case."; + container ipv4 { + description + "IPv4 route match."; + choice ip-route-match-type { + description + "IP route match type options: + match source, or + match destination, or + match source and destination."; + case dest-ipv4-address { + leaf dest-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "An IPv4 destination address as the match."; + } + } + case src-ipv4-address { + leaf src-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "An IPv4 source address as the match."; + } + } + case dest-src-ipv4-address { + container dest-src-ipv4-address { + description + "A combination of an IPv4 source and + an IPv4 destination address as the match."; + leaf dest-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "The IPv4 destination address of the match."; + } + leaf src-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "The IPv4 source address of the match."; + } + } + } + } + } + } + case ipv6 { + description + "IPv6 route case."; + container ipv6 { + description + "IPv6 route match."; + choice ip-route-match-type { + description + "IP route match type options: + match source, + match destination, or + match source and destination."; + case dest-ipv6-address { + leaf dest-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "An IPv6 destination address as the match."; + } + } + case src-ipv6-address { + leaf src-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "An IPv6 source address as the match."; + } + } + case dest-src-ipv6-address { + container dest-src-ipv6-address { + description + "A combination of an IPv6 source and + an IPv6 destination address as the match."; + leaf dest-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "The IPv6 destination address of the match."; + } + leaf src-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "The IPv6 source address of the match."; + } + } + } + } + } + } + case mpls-route { + description + "MPLS route case."; + leaf mpls-label { + type uint32; + mandatory true; + description + "The label used for matching."; + } + } + case mac-route { + description + "MAC route case."; + leaf mac-address { + type yang:mac-address; + mandatory true; + description + "The MAC address used for matching."; + } + } + case interface-route { + description + "Interface route case."; + leaf interface-identifier { + type if:interface-ref; + mandatory true; + description + "The interface used for matching."; + } + } + } + } + } + + grouping route { + description + "The common attributes used for all types of routes."; + uses route-prefix; + container nexthop { + description + "The nexthop of the route."; + uses nexthop; + } + //In the information model, it is called route-statistic + container route-status { + description + "The status information of the route."; + leaf route-state { + type route-state-definition; + config false; + description + "Indicate a route's state: active or inactive."; + } + leaf route-installed-state { + type route-installed-state-definition; + config false; + description + "Indicate that a route's installed states: + installed or uninstalled."; + } + leaf route-reason { + type route-change-reason-definition; + config false; + description + "Indicate the reason that caused the route change."; + } + } + container route-attributes { + description + "Route attributes."; + uses route-attributes; + } + container route-vendor-attributes { + description + "Route vendor attributes."; + uses route-vendor-attributes; + } + } + + grouping nexthop-list { + description + "A generic nexthop list."; + list nexthop-list { + key "nexthop-member-id"; + description + "A list of nexthops."; + leaf nexthop-member-id { + type uint32; + mandatory true; + description + "A nexthop identifier that points + to a nexthop list member. + A nexthop list member is a nexthop."; + } + } + } + + grouping nexthop-list-p { + description + "A nexthop list with preference parameter."; + list nexthop-list { + key "nexthop-member-id"; + description + "A list of nexthop."; + leaf nexthop-member-id { + type uint32; + mandatory true; + description + "A nexthop identifier that points + to a nexthop list member. + A nexthop list member is a nexthop."; + } + leaf nexthop-preference { + type nexthop-preference-definition; + mandatory true; + description + "Nexthop-preference is used for protection schemes. + It is an integer value between 1 and 99. Lower + values are more preferred. To download a + primary/standby/tertiary group to the FIB, the + nexthops that are resolved and are most preferred + are selected."; + } + } + } + + grouping nexthop-list-w { + description + "A nexthop list with a weight parameter."; + list nexthop-list { + key "nexthop-member-id"; + description + "A list of nexthop."; + leaf nexthop-member-id { + type uint32; + mandatory true; + description + "A nexthop identifier that points + to a nexthop list member. + A nexthop list member is a nexthop."; + } + leaf nexthop-lb-weight { + type nexthop-lb-weight-definition; + mandatory true; + description + "The weight of a nexthop of + the load-balance nexthops."; + } + } + } + + grouping nexthop { + description + "The nexthop structure."; + leaf nexthop-id { + type uint32; + description + "An identifier that refers to a nexthop."; + } + leaf sharing-flag { + type boolean; + description + "To indicate whether a nexthop is sharable + or non-sharable: + true - sharable (which means the nexthop can be + shared with other routes) + false - non-sharable (which means the nexthop can + not be shared with other routes)"; + } + choice nexthop-type { + description + "Nexthop type options."; + case nexthop-base { + container nexthop-base { + description + "The base nexthop."; + uses nexthop-base; + } + } + case nexthop-chain { + if-feature "nexthop-chain"; + container nexthop-chain { + description + "A chain nexthop."; + uses nexthop-list; + } + } + case nexthop-replicate { + if-feature "nexthop-replicate"; + container nexthop-replicate { + description + "A replicate nexthop."; + uses nexthop-list; + } + } + case nexthop-protection { + if-feature "nexthop-protection"; + container nexthop-protection { + description + "A protection nexthop."; + uses nexthop-list-p; + } + } + case nexthop-load-balance { + if-feature "nexthop-load-balance"; + container nexthop-lb { + description + "A load-balance nexthop."; + uses nexthop-list-w; + } + } + } + } + + grouping nexthop-base { + description + "The base nexthop."; + choice nexthop-base-type { + description + "Nexthop base type options."; + case special-nexthop { + leaf special { + type special-nexthop-definition; + description + "A special nexthop."; + } + } + case egress-interface-nexthop { + leaf outgoing-interface { + type if:interface-ref; + mandatory true; + description + "The nexthop is an outgoing interface."; + } + } + case ipv4-address-nexthop { + leaf ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "The nexthop is an IPv4 address."; + } + } + case ipv6-address-nexthop { + leaf ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "The nexthop is an IPv6 address."; + } + } + case egress-interface-ipv4-nexthop { + container egress-interface-ipv4-address { + leaf outgoing-interface { + type if:interface-ref; + mandatory true; + description + "Name of the outgoing interface."; + } + leaf ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "The nexthop points to an interface with + an IPv4 address."; + } + description + "The nexthop is an egress-interface and an IP + address. This can be used in cases where, e.g., + the IP address is a link-local address."; + } + } + case egress-interface-ipv6-nexthop { + container egress-interface-ipv6-address { + leaf outgoing-interface { + type if:interface-ref; + mandatory true; + description + "Name of the outgoing interface."; + } + leaf ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "The nexthop points to an interface with + an IPv6 address."; + } + description + "The nexthop is an egress-interface and an IP + address. This can be used in cases where, e.g., + the IP address is a link-local address."; + } + } + case egress-interface-mac-nexthop { + container egress-interface-mac-address { + leaf outgoing-interface { + type if:interface-ref; + mandatory true; + description + "Name of the outgoing interface."; + } + leaf ieee-mac-address { + type yang:mac-address; + mandatory true; + description + "The nexthop points to an interface with + a specific MAC address."; + } + description + "The egress-interface must be an Ethernet + interface. Address resolution is not required + for this nexthop."; + } + } + case tunnel-encapsulation-nexthop { + if-feature "nexthop-tunnel"; + container tunnel-encapsulation { + uses tunnel-encapsulation; + description + "This can be an encapsulation representing an IP + tunnel, MPLS tunnel, or others as defined in the info + model. An optional egress-interface can be chained + to the tunnel encapsulation to indicate which + interface to send the packet out on. The + egress-interface is useful when the network device + contains Ethernet interfaces and one needs to + perform address resolution for the IP packet."; + } + } + case tunnel-decapsulation-nexthop { + if-feature "nexthop-tunnel"; + container tunnel-decapsulation { + uses tunnel-decapsulation; + description + "This is to specify the decapsulation of a tunnel + header."; + } + } + case logical-tunnel-nexthop { + if-feature "nexthop-tunnel"; + container logical-tunnel { + uses logical-tunnel; + description + "This can be an MPLS Label Switched Path (LSP) + or a GRE tunnel (or others as defined in this + document) that is represented by a unique + identifier (e.g., name)."; + } + } + case rib-name-nexthop { + leaf rib-name { + type string; + description + "A nexthop pointing to a RIB indicates that the + route lookup needs to continue in the specified + RIB. This is a way to perform chained lookups."; + } + } + case nexthop-identifier { + leaf nexthop-ref { + type nexthop-ref; + mandatory true; + description + "A nexthop reference that points to a nexthop."; + } + } + } + } + + grouping route-vendor-attributes { + description + "Route vendor attributes."; + } + + grouping logical-tunnel { + description + "A logical tunnel that is identified + by a type and a tunnel name."; + leaf tunnel-type { + type tunnel-type-definition; + mandatory true; + description + "A tunnel type."; + } + leaf tunnel-name { + type string; + mandatory true; + description + "A tunnel name that points to a logical tunnel."; + } + } + + grouping ipv4-header { + description + "The IPv4 header encapsulation information."; + leaf src-ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "The source IP address of the header."; + } + leaf dest-ipv4-address { + type inet:ipv4-address; + mandatory true; + description + "The destination IP address of the header."; + } + leaf protocol { + type uint8; + mandatory true; + description + "The protocol id of the header."; + } + leaf ttl { + type uint8; + description + "The TTL of the header."; + } + leaf dscp { + type uint8; + description + "The Differentiated Services Code Point + (DSCP) field of the header."; + } + } + + grouping ipv6-header { + description + "The IPv6 header encapsulation information."; + leaf src-ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "The source IP address of the header."; + } + leaf dest-ipv6-address { + type inet:ipv6-address; + mandatory true; + description + "The destination IP address of the header."; + } + leaf next-header { + type uint8; + mandatory true; + description + "The next header of the IPv6 header."; + } + leaf traffic-class { + type uint8; + description + "The traffic class value of the header."; + } + leaf flow-label { + type inet:ipv6-flow-label; + description + "The flow label of the header."; + } + leaf hop-limit { + type uint8 { + range "1..255"; + } + description + "The hop limit of the header."; + } + } + + grouping nvgre-header { + description + "The NVGRE header encapsulation information."; + choice nvgre-type { + description + "NVGRE can use either an IPv4 + or an IPv6 header for encapsulation."; + case ipv4 { + uses ipv4-header; + } + case ipv6 { + uses ipv6-header; + } + } + leaf virtual-subnet-id { + type uint32; + mandatory true; + description + "The subnet identifier of the NVGRE header."; + } + leaf flow-id { + type uint8; + description + "The flow identifier of the NVGRE header."; + } + } + grouping vxlan-header { + description + "The VXLAN encapsulation header information."; + choice vxlan-type { + description + "NVGRE can use either an IPv4 + or an IPv6 header for encapsulation."; + case ipv4 { + uses ipv4-header; + } + case ipv6 { + uses ipv6-header; + } + } + leaf vxlan-identifier { + type uint32; + mandatory true; + description + "The VXLAN identifier of the VXLAN header."; + } + } + + grouping gre-header { + description + "The GRE encapsulation header information."; + choice dest-address-type { + description + "GRE options: IPv4 and IPv6"; + case ipv4 { + leaf ipv4-dest { + type inet:ipv4-address; + mandatory true; + description + "The destination IP address of the GRE header."; + } + } + case ipv6 { + leaf ipv6-dest { + type inet:ipv6-address; + mandatory true; + description + "The destination IP address of the GRE header."; + } + } + } + leaf protocol-type { + type uint16; + mandatory true; + description + "The protocol type of the GRE header."; + } + leaf key { + type uint64; + description + "The GRE key of the GRE header."; + } + } + + grouping mpls-header { + description + "The MPLS encapsulation header information."; + list label-operations { + key "label-oper-id"; + description + "Label operations."; + leaf label-oper-id { + type uint32; + description + "An optional identifier that points + to a label operation."; + } + choice label-actions { + description + "Label action options."; + case label-push { + container label-push { + description + "Label push operation."; + leaf label { + type uint32; + mandatory true; + description + "The label to be pushed."; + } + leaf s-bit { + type boolean; + description + "The s-bit ('Bottom of Stack' bit) of the label to be + pushed."; + } + leaf tc-value { + type uint8; + description + "The traffic class value of the label to be pushed."; + } + leaf ttl-value { + type uint8; + description + "The TTL value of the label to be pushed."; + } + } + } + case label-swap { + container label-swap { + description + "Label swap operation."; + leaf in-label { + type uint32; + mandatory true; + description + "The label to be swapped."; + } + leaf out-label { + type uint32; + mandatory true; + description + "The out MPLS label."; + } + leaf ttl-action { + type ttl-action-definition; + description + "The label TTL actions: + - No-action + - Copy to inner label + - Decrease (the in-label) + by 1 and copy to the out-label"; + } + } + } + } + } + } + + grouping tunnel-encapsulation { + description + "Tunnel encapsulation information."; + choice tunnel-type { + description + "Tunnel options for nexthops."; + case ipv4 { + if-feature "ipv4-tunnel"; + container ipv4-header { + uses ipv4-header; + description + "IPv4 header."; + } + } + case ipv6 { + if-feature "ipv6-tunnel"; + container ipv6-header { + uses ipv6-header; + description + "IPv6 header."; + } + } + case mpls { + if-feature "mpls-tunnel"; + container mpls-header { + uses mpls-header; + description + "MPLS header."; + } + } + case gre { + if-feature "gre-tunnel"; + container gre-header { + uses gre-header; + description + "GRE header."; + } + } + case nvgre { + if-feature "nvgre-tunnel"; + container nvgre-header { + uses nvgre-header; + description + "NVGRE header."; + } + } + case vxlan { + if-feature "vxlan-tunnel"; + container vxlan-header { + uses vxlan-header; + description + "VXLAN header."; + } + } + } + } + + grouping tunnel-decapsulation { + description + "Tunnel decapsulation information."; + choice tunnel-type { + description + "Nexthop tunnel type options."; + case ipv4 { + if-feature "ipv4-tunnel"; + container ipv4-decapsulation { + description + "IPv4 decapsulation."; + leaf ipv4-decapsulation { + type tunnel-decapsulation-action-definition; + mandatory true; + description + "IPv4 decapsulation operations."; + } + leaf ttl-action { + type ttl-action-definition; + description + "The TTL actions: + no-action or copy to inner header."; + } + } + } + case ipv6 { + if-feature "ipv6-tunnel"; + container ipv6-decapsulation { + description + "IPv6 decapsulation."; + leaf ipv6-decapsulation { + type tunnel-decapsulation-action-definition; + mandatory true; + description + "IPv6 decapsulation operations."; + } + leaf hop-limit-action { + type hop-limit-action-definition; + description + "The hop limit actions: + no-action or copy to inner header."; + } + } + } + case mpls { + if-feature "mpls-tunnel"; + container label-pop { + description + "MPLS decapsulation."; + leaf label-pop { + type mpls-label-action-definition; + mandatory true; + description + "Pop a label from the label stack."; + } + leaf ttl-action { + type ttl-action-definition; + description + "The label TTL action."; + } + } + } + } + } + + grouping route-attributes { + description + "Route attributes."; + leaf route-preference { + type uint32; + mandatory true; + description + "ROUTE_PREFERENCE: This is a numerical value that + allows for comparing routes from different + protocols. Static configuration is also + considered a protocol for the purpose of this + field. It is also known as administrative-distance. + The lower the value, the higher the preference."; + } + leaf local-only { + type boolean; + mandatory true; + description + "Indicate whether the attribute is local only."; + } + container address-family-route-attributes { + description + "Address-family-related route attributes."; + choice route-type { + description + "Address-family-related route attributes. Future + documents should specify these attributes by augmenting + the cases in this choice."; + case ip-route-attributes { + } + case mpls-route-attributes { + } + case ethernet-route-attributes { + } + } + } + } + + container routing-instance { + description + "A routing instance, in the context of + the RIB information model, is a collection + of RIBs, interfaces, and routing parameters."; + leaf name { + type string; + description + "The name of the routing instance. This MUST + be unique across all routing instances in + a given network device."; + } + list interface-list { + key "name"; + description + "This represents the list of interfaces associated + with this routing instance. The interface list helps + constrain the boundaries of packet forwarding. + Packets coming on these interfaces are directly + associated with the given routing instance. The + interface list contains a list of identifiers with + each identifier uniquely identifying an interface."; + leaf name { + type if:interface-ref; + description + "A reference to the name of a network-layer interface."; + } + } + leaf router-id { + type yang:dotted-quad; + description + "Router ID: The 32-bit number in the form of a dotted quad."; + } + leaf lookup-limit { + type uint8; + description + "A limit on how many levels of a lookup can be performed."; + } + list rib-list { + key "name"; + description + "A list of RIBs that are associated with the routing + instance."; + leaf name { + type string; + mandatory true; + description + "A reference to the name of each RIB."; + } + leaf address-family { + type address-family-definition; + mandatory true; + description + "The address family of a RIB."; + } + leaf ip-rpf-check { + type boolean; + description + "Each RIB can be optionally associated with a + ENABLE_IP_RPF_CHECK attribute that enables Reverse + Path Forwarding (RPF) checks on all IP routes in that + RIB. An RPF check is used to + prevent spoofing and limit malicious traffic."; + } + list route-list { + key "route-index"; + description + "A list of routes of a RIB."; + uses route; + } + // This is a list that maintains the nexthops added to the RIB. + uses nexthop-list; + } + } + + //RPC Operations + + rpc rib-add { + description + "To add a RIB to an instance"; + input { + leaf name { + type string; + mandatory true; + description + "A reference to the name of the RIB + that is to be added."; + } + leaf address-family { + type address-family-definition; + mandatory true; + description + "The address family of the RIB."; + } + leaf ip-rpf-check { + type boolean; + description + "Each RIB can be optionally associated with an + ENABLE_IP_RPF_CHECK attribute that enables + RPF checks on all IP routes in that + RIB. An RPF check is used to + prevent spoofing and limit malicious traffic."; + } + } + output { + leaf result { + type boolean; + mandatory true; + description + "Return the result of the rib-add operation. + true - success; + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that caused the failure."; + } + } + } + + rpc rib-delete { + description + "To delete a RIB from a routing instance. + After deleting the RIB, all routes installed + in the RIB will be deleted as well."; + input { + leaf name { + type string; + mandatory true; + description + "A reference to the name of the RIB + that is to be deleted."; + } + } + output { + leaf result { + type boolean; + mandatory true; + description + "Return the result of the rib-delete operation. + true - success; + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that caused failure."; + } + } + } + + grouping route-operation-state { + description + "Route operation state."; + leaf success-count { + type uint32; + mandatory true; + description + "The numbers of routes that are successfully + added/deleted/updated."; + } + leaf failed-count { + type uint32; + mandatory true; + description + "The numbers of the routes that fail + to be added/deleted/updated."; + } + container failure-detail { + description + "The failure detail reflects the reason why a route + operation fails. It is an array that includes the route + index and error code of the failed route."; + list failed-routes { + key "route-index"; + description + "The list of failed routes."; + leaf route-index { + type uint32; + description + "The route index of the failed route."; + } + leaf error-code { + type uint32; + description + "The error code that reflects the failure reason. + 0 - Reserved + 1 - Trying to add a repeat route + 2 - Trying to delete or update a route that does not + exist + 3 - Malformed route attributes"; + } + } + } + } + + rpc route-add { + description + "To add a route or a list of routes to a RIB"; + input { + leaf return-failure-detail { + type boolean; + default "false"; + description + "Whether to return the failure detail. + true - return the failure detail + false - do not return the failure detail + The default is false."; + } + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + container routes { + description + "The routes to be added to the RIB."; + list route-list { + key "route-index"; + description + "The list of routes to be added."; + uses route-prefix; + container route-attributes { + uses route-attributes; + description + "The route attributes."; + } + container route-vendor-attributes { + if-feature "route-vendor-attributes"; + uses route-vendor-attributes; + description + "The route vendor attributes."; + } + container nexthop { + uses nexthop; + description + "The nexthop of the added route."; + } + } + } + } + output { + uses route-operation-state; + } + } + + rpc route-delete { + description + "To delete a route or a list of routes from a RIB"; + input { + leaf return-failure-detail { + type boolean; + default "false"; + description + "Whether to return the failure detail. + true - return the failure detail + false - do not return the failure detail + The default is false."; + } + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + container routes { + description + "The routes to be added to the RIB."; + list route-list { + key "route-index"; + description + "The list of routes to be deleted."; + uses route-prefix; + } + } + } + output { + uses route-operation-state; + } + } + + grouping route-update-options { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + choice update-options { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + case update-nexthop { + container updated-nexthop { + uses nexthop; + description + "The nexthop used for updating."; + } + } + case update-route-attributes { + container updated-route-attr { + uses route-attributes; + description + "The route attributes used for updating."; + } + } + case update-route-vendor-attributes { + container updated-route-vendor-attr { + uses route-vendor-attributes; + description + "The vendor route attributes used for updating."; + } + } + } + } + + rpc route-update { + description + "To update a route or a list of routes of a RIB. + The inputs: + 1. The match conditions, which could be: + a. route prefix, + b. route attributes, or + c. nexthop. + 2. The update parameters to be used: + a. new nexthop, + b. new route attributes, or + c. nexthop. + Actions: + 1. update the nexthop + 2. update the route attributes + The outputs: + success-count - the number of routes updated + failed-count - the number of routes fail to update + failure-detail - the detail failure info + "; + input { + leaf return-failure-detail { + type boolean; + default "false"; + description + "Whether to return the failure detail. + true - return the failure detail + false - do not return the failure detail + The default is false."; + } + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + choice match-options { + description + "Match options."; + case match-route-prefix { + description + "Update the routes that match the route + prefix(es) condition."; + container input-routes { + description + "The matched routes to be updated."; + list route-list { + key "route-index"; + description + "The list of routes to be updated."; + uses route-prefix; + uses route-update-options; + } + } + } + case match-route-attributes { + description + "Update the routes that match the + route attributes condition."; + container input-route-attributes { + description + "The route attributes are used for matching."; + uses route-attributes; + } + container update-parameters { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + uses route-update-options; + } + } + case match-route-vendor-attributes { + if-feature "route-vendor-attributes"; + description + "Update the routes that match the + vendor attributes condition"; + container input-route-vendor-attributes { + description + "The vendor route attributes are used for matching."; + uses route-vendor-attributes; + } + container update-parameters-vendor { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + uses route-update-options; + } + } + case match-nexthop { + description + "Update the routes that match the nexthop."; + container input-nexthop { + description + "The nexthop used for matching."; + uses nexthop; + } + container update-parameters-nexthop { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes"; + uses route-update-options; + } + } + } + } + output { + uses route-operation-state; + } + } + rpc nh-add { + description + "To add a nexthop to a RIB. + Inputs parameters: + 1. rib-name + 2. nexthop + Actions: + Add the nexthop to the RIB + Outputs: + 1. Operation result: + true - success + false - failed + 2. nexthop identifier"; + input { + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + uses nexthop; + } + output { + leaf result { + type boolean; + mandatory true; + description + "Return the result of the rib-add operation: + true - success + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that caused the failure."; + } + leaf nexthop-id { + type uint32; + description + "A nexthop identifier that is allocated to the nexthop."; + } + } + } + + rpc nh-delete { + description + "To delete a nexthop from a RIB"; + input { + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + uses nexthop; + } + output { + leaf result { + type boolean; + mandatory true; + description + "Return the result of the rib-add operation: + true - success; + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that caused the failure."; + } + } + } + + //Notifications + + notification nexthop-resolution-status-change { + description + "Nexthop resolution status (resolved/unresolved) + notification."; + container nexthop { + description + "The nexthop."; + uses nexthop; + } + leaf nexthop-state { + type nexthop-state-definition; + mandatory true; + description + "Nexthop resolution status (resolved/unresolved) + notification."; + } + } + + notification route-change { + description + "Route change notification."; + leaf rib-name { + type string; + mandatory true; + description + "A reference to the name of a RIB."; + } + leaf address-family { + type address-family-definition; + mandatory true; + description + "The address family of a RIB."; + } + uses route-prefix; + leaf route-installed-state { + type route-installed-state-definition; + mandatory true; + description + "Indicates whether the route got installed in the FIB."; + } + leaf route-state { + type route-state-definition; + mandatory true; + description + "Indicates whether a route is active or inactive."; + } + list route-change-reasons { + key "route-change-reason"; + description + "The reasons that cause the route change. A route + change may result from several reasons; for + example, a nexthop becoming resolved will make a + route A active, which is of better preference than + a currently active route B, which results in the + route A being installed"; + leaf route-change-reason { + type route-change-reason-definition; + mandatory true; + description + "The reason that caused the route change."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-igmp-mld.yang b/models/ietf/RFC/ietf-igmp-mld.yang new file mode 100644 index 0000000000000000000000000000000000000000..0e1001f73050f2fc18c8bc4c5fde1bdb9941ae7a --- /dev/null +++ b/models/ietf/RFC/ietf-igmp-mld.yang @@ -0,0 +1,1458 @@ +module ietf-igmp-mld { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-igmp-mld"; + prefix igmp-mld; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + import ietf-access-control-list { + prefix acl; + reference + "RFC 8519: YANG Data Model for Network Access Control Lists + (ACLs)"; + } + import ietf-routing { + prefix rt; + reference + "RFC 8349: A YANG Data Model for Routing Management (NMDA + Version)"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-ip { + prefix ip; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + + organization + "IETF PIM Working Group"; + contact + "WG Web: <http://datatracker.ietf.org/wg/pim/> + WG List: <mailto:pim@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Feng Guo + <mailto:guofeng@huawei.com> + + Editor: Mahesh Sivakumar + <mailto:sivakumar.mahesh@gmail.com> + + Editor: Pete McAllister + <mailto:pete.mcallister@metaswitch.com> + + Editor: Anish Peter + <mailto:anish.ietf@gmail.com>"; + description + "The module defines the configuration and operational state for + the Internet Group Management Protocol (IGMP) and Multicast + Listener Discovery (MLD) protocols. + + 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. + + Copyright (c) 2019 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8652; see the + RFC itself for full legal notices."; + + revision 2019-11-01 { + description + "Initial revision."; + reference + "RFC 8652: A YANG Data Model for the Internet Group Management + Protocol (IGMP) and Multicast Listener Discovery (MLD)"; + } + + /* + * Features + */ + + feature feature-igmp { + description + "Support IGMP protocol for IPv4 group membership record."; + } + + feature feature-mld { + description + "Support MLD protocol for IPv6 group membership record."; + } + + feature global-admin-enable { + description + "Support global configuration to enable or disable protocol."; + } + + feature global-max-entries { + description + "Support configuration of global max-entries."; + } + + feature global-max-groups { + description + "Support configuration of global max-groups."; + } + + feature interface-global-config { + description + "Support global configuration applied for all interfaces."; + } + + feature intf-admin-enable { + description + "Support configuration of interface administrative enabling."; + } + + feature intf-immediate-leave { + description + "Support configuration of interface immediate-leave."; + } + + feature intf-join-group { + description + "Support configuration of interface join-group."; + } + + feature intf-max-groups { + description + "Support configuration of interface max-groups."; + } + + feature intf-max-group-sources { + description + "Support configuration of interface max-group-sources."; + } + + feature intf-require-router-alert { + description + "Support configuration of interface require-router-alert."; + } + + feature intf-source-policy { + description + "Support configuration of interface source policy."; + } + + feature intf-ssm-map { + description + "Support configuration of interface ssm-map."; + } + + feature intf-static-group { + description + "Support configuration of interface static-group."; + } + + feature intf-verify-source-subnet { + description + "Support configuration of interface verify-source-subnet."; + } + + feature intf-explicit-tracking { + description + "Support configuration of interface explicit-tracking hosts."; + } + + feature intf-lite-exclude-filter { + description + "Support configuration of interface lite-exclude-filter."; + } + + feature per-interface-config { + description + "Support per-interface configuration."; + } + + feature action-clear-groups { + description + "Support actions to clear groups."; + } + + /* + * Typedefs + */ + + typedef ssm-map-ipv4-addr-type { + type union { + type enumeration { + enum policy { + description + "Source address is specified in SSM map policy."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IP address type for SSM map."; + } + // source-ipv4-addr-type + + typedef ssm-map-ipv6-addr-type { + type union { + type enumeration { + enum policy { + description + "Source address is specified in SSM map policy."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IP address type for SSM map."; + } + // source-ipv6-addr-type + + /* + * Identities + */ + + identity igmp { + if-feature "feature-igmp"; + base rt:control-plane-protocol; + description + "IGMP protocol."; + reference + "RFC 3376: Internet Group Management Protocol, Version 3"; + } + + identity mld { + if-feature "feature-mld"; + base rt:control-plane-protocol; + description + "MLD protocol."; + reference + "RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) for + IPv6"; + } + + /* + * Groupings + */ + + grouping global-config-attributes { + description + "This grouping is used in either IGMP schema or MLD schema. + When used in IGMP schema, this grouping contains the global + configuration for IGMP; + when used in MLD schema, this grouping contains the global + configuration for MLD."; + leaf enabled { + if-feature "global-admin-enable"; + type boolean; + default "true"; + description + "When this grouping is used for IGMP, this leaf indicates + whether IGMP is enabled ('true') or disabled ('false') + in the routing instance. + When this grouping is used for MLD, this leaf indicates + whether MLD is enabled ('true') or disabled ('false') + in the routing instance."; + } + leaf max-entries { + if-feature "global-max-entries"; + type uint32; + description + "When this grouping is used for IGMP, this leaf indicates + the maximum number of entries in the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the maximum number of entries in the MLD instance. + If this leaf is not specified, the number of entries is not + limited."; + } + leaf max-groups { + if-feature "global-max-groups"; + type uint32; + description + "When this grouping is used for IGMP, this leaf indicates + the maximum number of groups in the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the maximum number of groups in the MLD instance. + If this leaf is not specified, the number of groups is not + limited."; + } + } + // global-config-attributes + + grouping global-state-attributes { + description + "This grouping is used in either IGMP schema or MLD schema. + When used in IGMP schema, this grouping contains the global + IGMP state attributes; + when used in MLD schema, this grouping contains the global + MLD state attributes."; + leaf entries-count { + type uint32; + config false; + description + "When this grouping is used for IGMP, this leaf indicates + the number of entries in the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the number of entries in the MLD instance."; + } + leaf groups-count { + type uint32; + config false; + description + "When this grouping is used for IGMP, this leaf indicates + the number of existing groups in the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the number of existing groups in the MLD instance."; + } + container statistics { + config false; + description + "When this grouping is used for IGMP, this container contains + the statistics for the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the statistics for the MLD instance."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time on the most recent occasion at which any one + or more of the statistic counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local + management subsystem, then this node contains the time + the local management subsystem re-initialized itself."; + } + container error { + description + "Statistics of errors."; + uses global-statistics-error; + } + container received { + description + "Statistics of received messages."; + uses global-statistics-sent-received; + } + container sent { + description + "Statistics of sent messages."; + uses global-statistics-sent-received; + } + } + // statistics + } + // global-state-attributes + + grouping global-statistics-error { + description + "A grouping defining statistics attributes for errors."; + uses global-statistics-sent-received; + leaf checksum { + type yang:counter64; + description + "The number of checksum errors."; + } + leaf too-short { + type yang:counter64; + description + "The number of messages that are too short."; + } + } + // global-statistics-error + + grouping global-statistics-sent-received { + description + "A grouping defining statistics attributes."; + leaf total { + type yang:counter64; + description + "The number of total messages."; + } + leaf query { + type yang:counter64; + description + "The number of query messages."; + } + leaf report { + type yang:counter64; + description + "The number of report messages."; + } + leaf leave { + type yang:counter64; + description + "The number of leave messages."; + } + } + // global-statistics-sent-received + + grouping interface-global-config-attributes { + description + "Configuration attributes applied to the interface-global level + whose per-interface attributes are not configured."; + leaf max-groups-per-interface { + if-feature "intf-max-groups"; + type uint32; + description + "The maximum number of groups associated with each interface. + If this leaf is not specified, the number of groups is not + limited."; + } + } + // interface-global-config-attributes + + grouping interface-common-config-attributes { + description + "Configuration attributes applied to both the interface-global + level and interface level."; + leaf last-member-query-interval { + type uint16 { + range "1..1023"; + } + units "seconds"; + description + "When used in IGMP schema, this leaf indicates the Last + Member Query Interval, which may be tuned to modify the + leave latency of the network; + when used in MLD schema, this leaf indicates the Last + Listener Query Interval, which may be tuned to modify the + leave latency of the network. + This leaf is not applicable for version 1 of the IGMP. For + version 2 and version 3 of the IGMP, and for all versions of + the MLD, the default value of this leaf is 1. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "Section 8.8 of RFC 2236: Internet Group Management Protocol, + Version 2. + Section 8.8 of RFC 3376: Internet Group Management Protocol, + Version 3. + Section 7.8 of RFC 2710: Multicast Listener Discovery (MLD) + for IPv6. + Section 9.8 of RFC 3810: Multicast Listener Discovery + Version 2 (MLDv2) for IPv6."; + } + leaf query-interval { + type uint16 { + range "1..31744"; + } + units "seconds"; + description + "The Query Interval is the interval between General Queries + sent by the Querier. In RFC 3376, the Querier's Query + Interval (QQI) is represented from the Querier's Query + Interval Code (QQIC) in query message as follows: + If QQIC < 128, QQI = QQIC. + If QQIC >= 128, QQIC represents a floating-point value as + follows: + 0 1 2 3 4 5 6 7 + +-+-+-+-+-+-+-+-+ + |1| exp | mant | + +-+-+-+-+-+-+-+-+ + QQI = (mant | 0x10) << (exp + 3). + The maximum value of QQI is 31744. + The default value is 125. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "Sections 4.1.7, 8.2, and 8.14.2 of RFC 3376: Internet Group + Management Protocol, Version 3"; + } + leaf query-max-response-time { + type uint16 { + range "1..1023"; + } + units "seconds"; + description + "Query maximum response time specifies the maximum time + allowed before sending a responding report. + The default value is 10. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "Sections 4.1.1, 8.3, and 8.14.3 of RFC 3376: Internet Group + Management Protocol, Version 3"; + } + leaf require-router-alert { + if-feature "intf-require-router-alert"; + type boolean; + description + "Protocol packets should contain the router alert IP option. + When this leaf is not configured, the server uses the + following rules to determine the operational value of this + leaf: + if this grouping is used in IGMP schema and the value of the + leaf 'version' is 1, the value 'false' is operationally used + by the server; + if this grouping is used in IGMP schema and the value of the + leaf 'version' is 2 or 3, the value 'true' is operationally + used by the server; + if this grouping is used in MLD schema, the value 'true' is + operationally used by the server. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + } + leaf robustness-variable { + type uint8 { + range "1..7"; + } + description + "The Querier's Robustness Variable allows tuning for the + expected packet loss on a network. + The default value is 2. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "Sections 4.1.6, 8.1, and 8.14.1 of RFC 3376: Internet Group + Management Protocol, Version 3"; + } + } + // interface-common-config-attributes + + grouping interface-common-config-attributes-igmp { + description + "Configuration attributes applied to both the interface-global + level and interface level for IGMP."; + uses interface-common-config-attributes; + leaf version { + type uint8 { + range "1..3"; + } + description + "IGMP version. + The default value is 2. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "RFC 1112: Host Extensions for IP Multicasting, + RFC 2236: Internet Group Management Protocol, Version 2, + RFC 3376: Internet Group Management Protocol, Version 3."; + } + } + + grouping interface-common-config-attributes-mld { + description + "Configuration attributes applied to both the interface-global + level and interface level for MLD."; + uses interface-common-config-attributes; + leaf version { + type uint8 { + range "1..2"; + } + description + "MLD version. + The default value is 2. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "RFC 2710: Multicast Listener Discovery (MLD) for IPv6, + RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) + for IPv6."; + } + } + + grouping interfaces-config-attributes-igmp { + description + "Configuration attributes applied to the interface-global + level for IGMP."; + uses interface-common-config-attributes-igmp; + uses interface-global-config-attributes; + } + + grouping interfaces-config-attributes-mld { + description + "Configuration attributes applied to the interface-global + level for MLD."; + uses interface-common-config-attributes-mld; + uses interface-global-config-attributes; + } + + grouping interface-level-config-attributes { + description + "This grouping is used in either IGMP schema or MLD schema. + When used in IGMP schema, this grouping contains the IGMP + configuration attributes that are defined at the interface + level but are not defined at the interface-global level; + when used in MLD schema, this grouping contains the MLD + configuration attributes that are defined at the interface + level but are not defined at the interface-global level."; + leaf enabled { + if-feature "intf-admin-enable"; + type boolean; + default "true"; + description + "When this grouping is used for IGMP, this leaf indicates + whether IGMP is enabled ('true') or disabled ('false') + on the interface. + When this grouping is used for MLD, this leaf indicates + whether MLD is enabled ('true') or disabled ('false') + on the interface."; + } + leaf group-policy { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "When this grouping is used for IGMP, this leaf specifies + the name of the access policy used to filter the + IGMP membership. + When this grouping is used for MLD, this leaf specifies + the name of the access policy used to filter the + MLD membership. + The value space of this leaf is restricted to the existing + policy instances defined by the referenced schema in + RFC 8519. + As specified by RFC 8519, the length of the name is between + 1 and 64; a device MAY further restrict the length of this + name; space and special characters are not allowed. + If this leaf is not specified, no policy is applied, and + all packets received from this interface are accepted."; + reference + "RFC 8519: YANG Data Model for Network Access Control Lists + (ACLs)"; + } + leaf immediate-leave { + if-feature "intf-immediate-leave"; + type empty; + description + "When this grouping is used for IGMP, the presence of this + leaf requests IGMP to perform an immediate leave upon + receiving an IGMPv2 leave message. + If the router is IGMP-enabled, it sends an IGMP last member + query with a last member query response time. However, the + router does not wait for the response time before it prunes + the group. + When this grouping is used for MLD, the presence of this + leaf requests MLD to perform an immediate leave upon + receiving an MLDv1 leave message. + If the router is MLD-enabled, it sends an MLD last member + query with a last member query response time. However, the + router does not wait for the response time before it prunes + the group."; + } + leaf max-groups { + if-feature "intf-max-groups"; + type uint32; + description + "When this grouping is used for IGMP, this leaf indicates + the maximum number of groups associated with the IGMP + interface. + When this grouping is used for MLD, this leaf indicates + the maximum number of groups associated with the MLD + interface. + If this leaf is not specified, the number of groups is not + limited."; + } + leaf max-group-sources { + if-feature "intf-max-group-sources"; + type uint32; + description + "The maximum number of group sources. + If this leaf is not specified, the number of group sources + is not limited."; + } + leaf source-policy { + if-feature "intf-source-policy"; + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "Name of the access policy used to filter sources. + The value space of this leaf is restricted to the existing + policy instances defined by the referenced schema in + RFC 8519. + As specified by RFC 8519, the length of the name is between + 1 and 64; a device MAY further restrict the length of this + name; space and special characters are not allowed. + If this leaf is not specified, no policy is applied, and + all packets received from this interface are accepted."; + } + leaf verify-source-subnet { + if-feature "intf-verify-source-subnet"; + type empty; + description + "If present, the interface accepts packets with matching + source IP subnet only."; + } + leaf explicit-tracking { + if-feature "intf-explicit-tracking"; + type empty; + description + "When this grouping is used for IGMP, the presence of this + leaf enables an IGMP-based explicit membership tracking + function for multicast routers and IGMP proxy devices + supporting IGMPv3. + When this grouping is used for MLD, the presence of this + leaf enables an MLD-based explicit membership tracking + function for multicast routers and MLD proxy devices + supporting MLDv2. + The explicit membership tracking function contributes to + saving network resources and shortening leave latency."; + reference + "Section 3 of RFC 6636: Tuning the Behavior of the Internet + Group Management Protocol (IGMP) and Multicast Listener + Discovery (MLD) for Routers in Mobile and Wireless + Networks"; + } + leaf lite-exclude-filter { + if-feature "intf-lite-exclude-filter"; + type empty; + description + "When this grouping is used for IGMP, the presence of this + leaf enables the support of the simplified EXCLUDE filter + in the Lightweight IGMPv3 protocol, which simplifies the + standard versions of IGMPv3. + When this grouping is used for MLD, the presence of this + leaf enables the support of the simplified EXCLUDE filter + in the Lightweight MLDv2 protocol, which simplifies the + standard versions of MLDv2."; + reference + "RFC 5790: Lightweight Internet Group Management Protocol + Version 3 (IGMPv3) and Multicast Listener Discovery + Version 2 (MLDv2) Protocols"; + } + } + // interface-level-config-attributes + + grouping interface-config-attributes-igmp { + description + "Per-interface configuration attributes for IGMP."; + uses interface-common-config-attributes-igmp; + uses interface-level-config-attributes; + leaf-list join-group { + if-feature "intf-join-group"; + type rt-types:ipv4-multicast-group-address; + description + "The router joins this multicast group on the interface."; + } + list ssm-map { + if-feature "intf-ssm-map"; + key "ssm-map-source-addr ssm-map-group-policy"; + description + "The policy for (*,G) mapping to (S,G)."; + leaf ssm-map-source-addr { + type ssm-map-ipv4-addr-type; + description + "Multicast source IPv4 address."; + } + leaf ssm-map-group-policy { + type string; + description + "Name of the policy used to define ssm-map rules. + A device can restrict the length + and value of this name, possibly space and special + characters are not allowed."; + } + } + list static-group { + if-feature "intf-static-group"; + key "group-addr source-addr"; + description + "A static multicast route, (*,G) or (S,G). + The version of IGMP must be 3 to support (S,G)."; + leaf group-addr { + type rt-types:ipv4-multicast-group-address; + description + "Multicast group IPv4 address."; + } + leaf source-addr { + type rt-types:ipv4-multicast-source-address; + description + "Multicast source IPv4 address."; + } + } + } + // interface-config-attributes-igmp + + grouping interface-config-attributes-mld { + description + "Per-interface configuration attributes for MLD."; + uses interface-common-config-attributes-mld; + uses interface-level-config-attributes; + leaf-list join-group { + if-feature "intf-join-group"; + type rt-types:ipv6-multicast-group-address; + description + "The router joins this multicast group on the interface."; + } + list ssm-map { + if-feature "intf-ssm-map"; + key "ssm-map-source-addr ssm-map-group-policy"; + description + "The policy for (*,G) mapping to (S,G)."; + leaf ssm-map-source-addr { + type ssm-map-ipv6-addr-type; + description + "Multicast source IPv6 address."; + } + leaf ssm-map-group-policy { + type string; + description + "Name of the policy used to define ssm-map rules. + A device can restrict the length + and value of this name, possibly space and special + characters are not allowed."; + } + } + list static-group { + if-feature "intf-static-group"; + key "group-addr source-addr"; + description + "A static multicast route, (*,G) or (S,G). + The version of MLD must be 2 to support (S,G)."; + leaf group-addr { + type rt-types:ipv6-multicast-group-address; + description + "Multicast group IPv6 address."; + } + leaf source-addr { + type rt-types:ipv6-multicast-source-address; + description + "Multicast source IPv6 address."; + } + } + } + // interface-config-attributes-mld + + grouping interface-state-attributes { + description + "Per-interface state attributes for both IGMP and MLD."; + leaf oper-status { + type enumeration { + enum up { + description + "Ready to pass packets."; + } + enum down { + description + "The interface does not pass any packets."; + } + } + config false; + mandatory true; + description + "Indicates whether the operational state of the interface + is up or down."; + } + } + // interface-state-attributes + + grouping interface-state-attributes-igmp { + description + "Per-interface state attributes for IGMP."; + uses interface-state-attributes; + leaf querier { + type inet:ipv4-address; + config false; + mandatory true; + description + "The querier address in the subnet."; + } + leaf-list joined-group { + if-feature "intf-join-group"; + type rt-types:ipv4-multicast-group-address; + config false; + description + "The routers that joined this multicast group."; + } + list group { + key "group-address"; + config false; + description + "Multicast group membership information + that joined on the interface."; + leaf group-address { + type rt-types:ipv4-multicast-group-address; + description + "Multicast group address."; + } + uses interface-state-group-attributes; + leaf last-reporter { + type inet:ipv4-address; + description + "The IPv4 address of the last host that has sent the + report to join the multicast group."; + } + list source { + key "source-address"; + description + "List of multicast source information + of the multicast group."; + leaf source-address { + type inet:ipv4-address; + description + "Multicast source address in group record."; + } + uses interface-state-source-attributes; + leaf last-reporter { + type inet:ipv4-address; + description + "The IPv4 address of the last host that has sent the + report to join the multicast source and group."; + } + list host { + if-feature "intf-explicit-tracking"; + key "host-address"; + description + "List of hosts with the membership for the specific + multicast source-group."; + leaf host-address { + type inet:ipv4-address; + description + "The IPv4 address of the host."; + } + uses interface-state-host-attributes; + } + // list host + } + // list source + } + // list group + } + // interface-state-attributes-igmp + + grouping interface-state-attributes-mld { + description + "Per-interface state attributes for MLD."; + uses interface-state-attributes; + leaf querier { + type inet:ipv6-address; + config false; + mandatory true; + description + "The querier address in the subnet."; + } + leaf-list joined-group { + if-feature "intf-join-group"; + type rt-types:ipv6-multicast-group-address; + config false; + description + "The routers that joined this multicast group."; + } + list group { + key "group-address"; + config false; + description + "Multicast group membership information + that joined on the interface."; + leaf group-address { + type rt-types:ipv6-multicast-group-address; + description + "Multicast group address."; + } + uses interface-state-group-attributes; + leaf last-reporter { + type inet:ipv6-address; + description + "The IPv6 address of the last host that has sent the + report to join the multicast group."; + } + list source { + key "source-address"; + description + "List of multicast sources of the multicast group."; + leaf source-address { + type inet:ipv6-address; + description + "Multicast source address in group record."; + } + uses interface-state-source-attributes; + leaf last-reporter { + type inet:ipv6-address; + description + "The IPv6 address of the last host that has sent the + report to join the multicast source and group."; + } + list host { + if-feature "intf-explicit-tracking"; + key "host-address"; + description + "List of hosts with the membership for the specific + multicast source-group."; + leaf host-address { + type inet:ipv6-address; + description + "The IPv6 address of the host."; + } + uses interface-state-host-attributes; + } + // list host + } + // list source + } + // list group + } + // interface-state-attributes-mld + + grouping interface-state-group-attributes { + description + "Per-interface state attributes for both IGMP and MLD + groups."; + leaf expire { + type uint32; + units "seconds"; + mandatory true; + description + "The time left before the multicast group state expires."; + } + leaf filter-mode { + type enumeration { + enum include { + description + "In include mode, reception of packets sent + to the specified multicast address is requested + only from those IP source addresses listed in the + source-list parameter"; + } + enum exclude { + description + "In exclude mode, reception of packets sent + to the given multicast address is requested + from all IP source addresses except those + listed in the source-list parameter."; + } + } + mandatory true; + description + "Filter mode for a multicast group, + may be either include or exclude."; + } + leaf up-time { + type uint32; + units "seconds"; + mandatory true; + description + "The elapsed time since the device created multicast group + record."; + } + } + // interface-state-group-attributes + + grouping interface-state-source-attributes { + description + "Per-interface state attributes for both IGMP and MLD + source-group records."; + leaf expire { + type uint32; + units "seconds"; + mandatory true; + description + "The time left before multicast source-group state expires."; + } + leaf up-time { + type uint32; + units "seconds"; + mandatory true; + description + "The elapsed time since the device created multicast + source-group record."; + } + leaf host-count { + if-feature "intf-explicit-tracking"; + type uint32; + description + "The number of host addresses."; + } + } + // interface-state-source-attributes + + grouping interface-state-host-attributes { + description + "Per-interface state attributes for both IGMP and MLD + hosts of source-group records."; + leaf host-filter-mode { + type enumeration { + enum include { + description + "In include mode."; + } + enum exclude { + description + "In exclude mode."; + } + } + mandatory true; + description + "Filter mode for a multicast membership + host may be either include or exclude."; + } + } + // interface-state-host-attributes + + /* + * Configuration and Operational state data nodes (NMDA version) + */ + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol" { + when "derived-from-or-self(rt:type, 'igmp-mld:igmp')" { + description + "This augmentation is only valid for a control-plane + protocol instance of IGMP (type 'igmp')."; + } + description + "IGMP augmentation to routing control-plane protocol + configuration and state."; + container igmp { + if-feature "feature-igmp"; + description + "IGMP configuration and operational state data."; + container global { + description + "Global attributes."; + uses global-config-attributes; + uses global-state-attributes; + } + container interfaces { + description + "Containing a list of interfaces."; + uses interfaces-config-attributes-igmp { + if-feature "interface-global-config"; + refine "query-interval" { + default "125"; + } + refine "query-max-response-time" { + default "10"; + } + refine "robustness-variable" { + default "2"; + } + refine "version" { + default "2"; + } + } + list interface { + key "interface-name"; + description + "List of IGMP interfaces."; + leaf interface-name { + type if:interface-ref; + must + '/if:interfaces/if:interface[if:name = current()]/' + + 'ip:ipv4' { + error-message + "The interface must have IPv4 configured, either " + + "enabled or disabled."; + } + description + "Reference to an entry in the global interface list."; + } + uses interface-config-attributes-igmp { + if-feature "per-interface-config"; + refine "last-member-query-interval" { + must '../version != 1 or ' + + '(not(../version) and ' + + '(../../version != 1 or not(../../version)))' { + error-message "IGMPv1 does not support " + + "last-member-query-interval."; + } + } + refine "max-group-sources" { + must '../version = 3 or ' + + '(not(../version) and (../../version = 3))' { + error-message + "The version of IGMP must be 3 to support the " + + "source-specific parameters."; + } + } + refine "source-policy" { + must '../version = 3 or ' + + '(not(../version) and (../../version = 3))' { + error-message + "The version of IGMP must be 3 to support the " + + "source-specific parameters."; + } + } + refine "explicit-tracking" { + must '../version = 3 or ' + + '(not(../version) and (../../version = 3))' { + error-message + "The version of IGMP must be 3 to support the " + + "explicit tracking function."; + } + } + refine "lite-exclude-filter" { + must '../version = 3 or ' + + '(not(../version) and (../../version = 3))' { + error-message + "The version of IGMP must be 3 to support the " + + "simplified EXCLUDE filter in the Lightweight " + + "IGMPv3 protocol."; + } + } + } + uses interface-state-attributes-igmp; + } + // interface + } + // interfaces + + /* + * Actions + */ + action clear-groups { + if-feature "action-clear-groups"; + description + "Clears the specified IGMP cache entries."; + input { + choice interface { + mandatory true; + description + "Indicates the interface(s) from which the cache + entries are cleared."; + case name { + leaf interface-name { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/" + + "igmp-mld:igmp/igmp-mld:interfaces/" + + "igmp-mld:interface/igmp-mld:interface-name"; + } + description + "Name of the IGMP interface."; + } + } + case all { + leaf all-interfaces { + type empty; + description + "IGMP groups from all interfaces are cleared."; + } + } + } + leaf group-address { + type union { + type enumeration { + enum * { + description + "Any group address."; + } + } + type rt-types:ipv4-multicast-group-address; + } + mandatory true; + description + "Multicast group IPv4 address. + If the value '*' is specified, all IGMP group entries + are cleared."; + } + leaf source-address { + type rt-types:ipv4-multicast-source-address; + mandatory true; + description + "Multicast source IPv4 address. + If the value '*' is specified, all IGMP source-group + entries are cleared."; + } + } + } + // action clear-groups + } + // igmp + } + // augment + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol" { + when "derived-from-or-self(rt:type, 'igmp-mld:mld')" { + description + "This augmentation is only valid for a control-plane + protocol instance of IGMP (type 'mld')."; + } + description + "MLD augmentation to routing control-plane protocol + configuration and state."; + container mld { + if-feature "feature-mld"; + description + "MLD configuration and operational state data."; + container global { + description + "Global attributes."; + uses global-config-attributes; + uses global-state-attributes; + } + container interfaces { + description + "Containing a list of interfaces."; + uses interfaces-config-attributes-mld { + if-feature "interface-global-config"; + refine "last-member-query-interval" { + default "1"; + } + refine "query-interval" { + default "125"; + } + refine "query-max-response-time" { + default "10"; + } + refine "require-router-alert" { + default "true"; + } + refine "robustness-variable" { + default "2"; + } + refine "version" { + default "2"; + } + } + list interface { + key "interface-name"; + description + "List of MLD interfaces."; + leaf interface-name { + type if:interface-ref; + must + '/if:interfaces/if:interface[if:name = current()]/' + + 'ip:ipv6' { + error-message + "The interface must have IPv6 configured, either " + + "enabled or disabled."; + } + description + "Reference to an entry in the global interface list."; + } + uses interface-config-attributes-mld { + if-feature "per-interface-config"; + refine "max-group-sources" { + must '../version = 2 or ' + + '(not(../version) and ' + + '(../../version = 2 or not(../../version)))' { + error-message + "The version of MLD must be 2 to support the " + + "source-specific parameters."; + } + } + refine "source-policy" { + must '../version = 2 or ' + + '(not(../version) and ' + + '(../../version = 2 or not(../../version)))' { + error-message + "The version of MLD must be 2 to support the " + + "source-specific parameters."; + } + } + refine "explicit-tracking" { + must '../version = 2 or ' + + '(not(../version) and ' + + '(../../version = 2 or not(../../version)))' { + error-message + "The version of MLD must be 2 to support the " + + "explicit tracking function."; + } + } + refine "lite-exclude-filter" { + must '../version = 2 or ' + + '(not(../version) and ' + + '(../../version = 2 or not(../../version)))' { + error-message + "The version of MLD must be 2 to support the " + + "simplified EXCLUDE filter in the Lightweight " + + "MLDv2 protocol."; + } + } + } + uses interface-state-attributes-mld; + } + // interface + } + // interfaces + + /* + * Actions + */ + action clear-groups { + if-feature "action-clear-groups"; + description + "Clears the specified MLD cache entries."; + input { + choice interface { + mandatory true; + description + "Indicates the interface(s) from which the cache + entries are cleared."; + case name { + leaf interface-name { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/" + + "igmp-mld:mld/igmp-mld:interfaces/" + + "igmp-mld:interface/igmp-mld:interface-name"; + } + description + "Name of the MLD interface."; + } + } + case all { + leaf all-interfaces { + type empty; + description + "MLD groups from all interfaces are cleared."; + } + } + } + leaf group-address { + type union { + type enumeration { + enum * { + description + "Any group address."; + } + } + type rt-types:ipv6-multicast-group-address; + } + description + "Multicast group IPv6 address. + If the value '*' is specified, all MLD group entries + are cleared."; + } + leaf source-address { + type rt-types:ipv6-multicast-source-address; + description + "Multicast source IPv6 address. + If the value '*' is specified, all MLD source-group + entries are cleared."; + } + } + } + // action clear-mld-groups + } + // mld + } + // augment +} diff --git a/models/ietf/RFC/ietf-igmp-mld@2019-11-01.yang b/models/ietf/RFC/ietf-igmp-mld@2019-11-01.yang new file mode 100644 index 0000000000000000000000000000000000000000..0e1001f73050f2fc18c8bc4c5fde1bdb9941ae7a --- /dev/null +++ b/models/ietf/RFC/ietf-igmp-mld@2019-11-01.yang @@ -0,0 +1,1458 @@ +module ietf-igmp-mld { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-igmp-mld"; + prefix igmp-mld; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + import ietf-access-control-list { + prefix acl; + reference + "RFC 8519: YANG Data Model for Network Access Control Lists + (ACLs)"; + } + import ietf-routing { + prefix rt; + reference + "RFC 8349: A YANG Data Model for Routing Management (NMDA + Version)"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-ip { + prefix ip; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + + organization + "IETF PIM Working Group"; + contact + "WG Web: <http://datatracker.ietf.org/wg/pim/> + WG List: <mailto:pim@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Feng Guo + <mailto:guofeng@huawei.com> + + Editor: Mahesh Sivakumar + <mailto:sivakumar.mahesh@gmail.com> + + Editor: Pete McAllister + <mailto:pete.mcallister@metaswitch.com> + + Editor: Anish Peter + <mailto:anish.ietf@gmail.com>"; + description + "The module defines the configuration and operational state for + the Internet Group Management Protocol (IGMP) and Multicast + Listener Discovery (MLD) protocols. + + 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. + + Copyright (c) 2019 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8652; see the + RFC itself for full legal notices."; + + revision 2019-11-01 { + description + "Initial revision."; + reference + "RFC 8652: A YANG Data Model for the Internet Group Management + Protocol (IGMP) and Multicast Listener Discovery (MLD)"; + } + + /* + * Features + */ + + feature feature-igmp { + description + "Support IGMP protocol for IPv4 group membership record."; + } + + feature feature-mld { + description + "Support MLD protocol for IPv6 group membership record."; + } + + feature global-admin-enable { + description + "Support global configuration to enable or disable protocol."; + } + + feature global-max-entries { + description + "Support configuration of global max-entries."; + } + + feature global-max-groups { + description + "Support configuration of global max-groups."; + } + + feature interface-global-config { + description + "Support global configuration applied for all interfaces."; + } + + feature intf-admin-enable { + description + "Support configuration of interface administrative enabling."; + } + + feature intf-immediate-leave { + description + "Support configuration of interface immediate-leave."; + } + + feature intf-join-group { + description + "Support configuration of interface join-group."; + } + + feature intf-max-groups { + description + "Support configuration of interface max-groups."; + } + + feature intf-max-group-sources { + description + "Support configuration of interface max-group-sources."; + } + + feature intf-require-router-alert { + description + "Support configuration of interface require-router-alert."; + } + + feature intf-source-policy { + description + "Support configuration of interface source policy."; + } + + feature intf-ssm-map { + description + "Support configuration of interface ssm-map."; + } + + feature intf-static-group { + description + "Support configuration of interface static-group."; + } + + feature intf-verify-source-subnet { + description + "Support configuration of interface verify-source-subnet."; + } + + feature intf-explicit-tracking { + description + "Support configuration of interface explicit-tracking hosts."; + } + + feature intf-lite-exclude-filter { + description + "Support configuration of interface lite-exclude-filter."; + } + + feature per-interface-config { + description + "Support per-interface configuration."; + } + + feature action-clear-groups { + description + "Support actions to clear groups."; + } + + /* + * Typedefs + */ + + typedef ssm-map-ipv4-addr-type { + type union { + type enumeration { + enum policy { + description + "Source address is specified in SSM map policy."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IP address type for SSM map."; + } + // source-ipv4-addr-type + + typedef ssm-map-ipv6-addr-type { + type union { + type enumeration { + enum policy { + description + "Source address is specified in SSM map policy."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IP address type for SSM map."; + } + // source-ipv6-addr-type + + /* + * Identities + */ + + identity igmp { + if-feature "feature-igmp"; + base rt:control-plane-protocol; + description + "IGMP protocol."; + reference + "RFC 3376: Internet Group Management Protocol, Version 3"; + } + + identity mld { + if-feature "feature-mld"; + base rt:control-plane-protocol; + description + "MLD protocol."; + reference + "RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) for + IPv6"; + } + + /* + * Groupings + */ + + grouping global-config-attributes { + description + "This grouping is used in either IGMP schema or MLD schema. + When used in IGMP schema, this grouping contains the global + configuration for IGMP; + when used in MLD schema, this grouping contains the global + configuration for MLD."; + leaf enabled { + if-feature "global-admin-enable"; + type boolean; + default "true"; + description + "When this grouping is used for IGMP, this leaf indicates + whether IGMP is enabled ('true') or disabled ('false') + in the routing instance. + When this grouping is used for MLD, this leaf indicates + whether MLD is enabled ('true') or disabled ('false') + in the routing instance."; + } + leaf max-entries { + if-feature "global-max-entries"; + type uint32; + description + "When this grouping is used for IGMP, this leaf indicates + the maximum number of entries in the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the maximum number of entries in the MLD instance. + If this leaf is not specified, the number of entries is not + limited."; + } + leaf max-groups { + if-feature "global-max-groups"; + type uint32; + description + "When this grouping is used for IGMP, this leaf indicates + the maximum number of groups in the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the maximum number of groups in the MLD instance. + If this leaf is not specified, the number of groups is not + limited."; + } + } + // global-config-attributes + + grouping global-state-attributes { + description + "This grouping is used in either IGMP schema or MLD schema. + When used in IGMP schema, this grouping contains the global + IGMP state attributes; + when used in MLD schema, this grouping contains the global + MLD state attributes."; + leaf entries-count { + type uint32; + config false; + description + "When this grouping is used for IGMP, this leaf indicates + the number of entries in the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the number of entries in the MLD instance."; + } + leaf groups-count { + type uint32; + config false; + description + "When this grouping is used for IGMP, this leaf indicates + the number of existing groups in the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the number of existing groups in the MLD instance."; + } + container statistics { + config false; + description + "When this grouping is used for IGMP, this container contains + the statistics for the IGMP instance. + When this grouping is used for MLD, this leaf indicates + the statistics for the MLD instance."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time on the most recent occasion at which any one + or more of the statistic counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local + management subsystem, then this node contains the time + the local management subsystem re-initialized itself."; + } + container error { + description + "Statistics of errors."; + uses global-statistics-error; + } + container received { + description + "Statistics of received messages."; + uses global-statistics-sent-received; + } + container sent { + description + "Statistics of sent messages."; + uses global-statistics-sent-received; + } + } + // statistics + } + // global-state-attributes + + grouping global-statistics-error { + description + "A grouping defining statistics attributes for errors."; + uses global-statistics-sent-received; + leaf checksum { + type yang:counter64; + description + "The number of checksum errors."; + } + leaf too-short { + type yang:counter64; + description + "The number of messages that are too short."; + } + } + // global-statistics-error + + grouping global-statistics-sent-received { + description + "A grouping defining statistics attributes."; + leaf total { + type yang:counter64; + description + "The number of total messages."; + } + leaf query { + type yang:counter64; + description + "The number of query messages."; + } + leaf report { + type yang:counter64; + description + "The number of report messages."; + } + leaf leave { + type yang:counter64; + description + "The number of leave messages."; + } + } + // global-statistics-sent-received + + grouping interface-global-config-attributes { + description + "Configuration attributes applied to the interface-global level + whose per-interface attributes are not configured."; + leaf max-groups-per-interface { + if-feature "intf-max-groups"; + type uint32; + description + "The maximum number of groups associated with each interface. + If this leaf is not specified, the number of groups is not + limited."; + } + } + // interface-global-config-attributes + + grouping interface-common-config-attributes { + description + "Configuration attributes applied to both the interface-global + level and interface level."; + leaf last-member-query-interval { + type uint16 { + range "1..1023"; + } + units "seconds"; + description + "When used in IGMP schema, this leaf indicates the Last + Member Query Interval, which may be tuned to modify the + leave latency of the network; + when used in MLD schema, this leaf indicates the Last + Listener Query Interval, which may be tuned to modify the + leave latency of the network. + This leaf is not applicable for version 1 of the IGMP. For + version 2 and version 3 of the IGMP, and for all versions of + the MLD, the default value of this leaf is 1. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "Section 8.8 of RFC 2236: Internet Group Management Protocol, + Version 2. + Section 8.8 of RFC 3376: Internet Group Management Protocol, + Version 3. + Section 7.8 of RFC 2710: Multicast Listener Discovery (MLD) + for IPv6. + Section 9.8 of RFC 3810: Multicast Listener Discovery + Version 2 (MLDv2) for IPv6."; + } + leaf query-interval { + type uint16 { + range "1..31744"; + } + units "seconds"; + description + "The Query Interval is the interval between General Queries + sent by the Querier. In RFC 3376, the Querier's Query + Interval (QQI) is represented from the Querier's Query + Interval Code (QQIC) in query message as follows: + If QQIC < 128, QQI = QQIC. + If QQIC >= 128, QQIC represents a floating-point value as + follows: + 0 1 2 3 4 5 6 7 + +-+-+-+-+-+-+-+-+ + |1| exp | mant | + +-+-+-+-+-+-+-+-+ + QQI = (mant | 0x10) << (exp + 3). + The maximum value of QQI is 31744. + The default value is 125. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "Sections 4.1.7, 8.2, and 8.14.2 of RFC 3376: Internet Group + Management Protocol, Version 3"; + } + leaf query-max-response-time { + type uint16 { + range "1..1023"; + } + units "seconds"; + description + "Query maximum response time specifies the maximum time + allowed before sending a responding report. + The default value is 10. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "Sections 4.1.1, 8.3, and 8.14.3 of RFC 3376: Internet Group + Management Protocol, Version 3"; + } + leaf require-router-alert { + if-feature "intf-require-router-alert"; + type boolean; + description + "Protocol packets should contain the router alert IP option. + When this leaf is not configured, the server uses the + following rules to determine the operational value of this + leaf: + if this grouping is used in IGMP schema and the value of the + leaf 'version' is 1, the value 'false' is operationally used + by the server; + if this grouping is used in IGMP schema and the value of the + leaf 'version' is 2 or 3, the value 'true' is operationally + used by the server; + if this grouping is used in MLD schema, the value 'true' is + operationally used by the server. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + } + leaf robustness-variable { + type uint8 { + range "1..7"; + } + description + "The Querier's Robustness Variable allows tuning for the + expected packet loss on a network. + The default value is 2. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "Sections 4.1.6, 8.1, and 8.14.1 of RFC 3376: Internet Group + Management Protocol, Version 3"; + } + } + // interface-common-config-attributes + + grouping interface-common-config-attributes-igmp { + description + "Configuration attributes applied to both the interface-global + level and interface level for IGMP."; + uses interface-common-config-attributes; + leaf version { + type uint8 { + range "1..3"; + } + description + "IGMP version. + The default value is 2. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "RFC 1112: Host Extensions for IP Multicasting, + RFC 2236: Internet Group Management Protocol, Version 2, + RFC 3376: Internet Group Management Protocol, Version 3."; + } + } + + grouping interface-common-config-attributes-mld { + description + "Configuration attributes applied to both the interface-global + level and interface level for MLD."; + uses interface-common-config-attributes; + leaf version { + type uint8 { + range "1..2"; + } + description + "MLD version. + The default value is 2. + This leaf may be configured at the interface level or the + interface-global level, with precedence given to the value + at the interface level. If the leaf is not configured at + either level, the default value is used."; + reference + "RFC 2710: Multicast Listener Discovery (MLD) for IPv6, + RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) + for IPv6."; + } + } + + grouping interfaces-config-attributes-igmp { + description + "Configuration attributes applied to the interface-global + level for IGMP."; + uses interface-common-config-attributes-igmp; + uses interface-global-config-attributes; + } + + grouping interfaces-config-attributes-mld { + description + "Configuration attributes applied to the interface-global + level for MLD."; + uses interface-common-config-attributes-mld; + uses interface-global-config-attributes; + } + + grouping interface-level-config-attributes { + description + "This grouping is used in either IGMP schema or MLD schema. + When used in IGMP schema, this grouping contains the IGMP + configuration attributes that are defined at the interface + level but are not defined at the interface-global level; + when used in MLD schema, this grouping contains the MLD + configuration attributes that are defined at the interface + level but are not defined at the interface-global level."; + leaf enabled { + if-feature "intf-admin-enable"; + type boolean; + default "true"; + description + "When this grouping is used for IGMP, this leaf indicates + whether IGMP is enabled ('true') or disabled ('false') + on the interface. + When this grouping is used for MLD, this leaf indicates + whether MLD is enabled ('true') or disabled ('false') + on the interface."; + } + leaf group-policy { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "When this grouping is used for IGMP, this leaf specifies + the name of the access policy used to filter the + IGMP membership. + When this grouping is used for MLD, this leaf specifies + the name of the access policy used to filter the + MLD membership. + The value space of this leaf is restricted to the existing + policy instances defined by the referenced schema in + RFC 8519. + As specified by RFC 8519, the length of the name is between + 1 and 64; a device MAY further restrict the length of this + name; space and special characters are not allowed. + If this leaf is not specified, no policy is applied, and + all packets received from this interface are accepted."; + reference + "RFC 8519: YANG Data Model for Network Access Control Lists + (ACLs)"; + } + leaf immediate-leave { + if-feature "intf-immediate-leave"; + type empty; + description + "When this grouping is used for IGMP, the presence of this + leaf requests IGMP to perform an immediate leave upon + receiving an IGMPv2 leave message. + If the router is IGMP-enabled, it sends an IGMP last member + query with a last member query response time. However, the + router does not wait for the response time before it prunes + the group. + When this grouping is used for MLD, the presence of this + leaf requests MLD to perform an immediate leave upon + receiving an MLDv1 leave message. + If the router is MLD-enabled, it sends an MLD last member + query with a last member query response time. However, the + router does not wait for the response time before it prunes + the group."; + } + leaf max-groups { + if-feature "intf-max-groups"; + type uint32; + description + "When this grouping is used for IGMP, this leaf indicates + the maximum number of groups associated with the IGMP + interface. + When this grouping is used for MLD, this leaf indicates + the maximum number of groups associated with the MLD + interface. + If this leaf is not specified, the number of groups is not + limited."; + } + leaf max-group-sources { + if-feature "intf-max-group-sources"; + type uint32; + description + "The maximum number of group sources. + If this leaf is not specified, the number of group sources + is not limited."; + } + leaf source-policy { + if-feature "intf-source-policy"; + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "Name of the access policy used to filter sources. + The value space of this leaf is restricted to the existing + policy instances defined by the referenced schema in + RFC 8519. + As specified by RFC 8519, the length of the name is between + 1 and 64; a device MAY further restrict the length of this + name; space and special characters are not allowed. + If this leaf is not specified, no policy is applied, and + all packets received from this interface are accepted."; + } + leaf verify-source-subnet { + if-feature "intf-verify-source-subnet"; + type empty; + description + "If present, the interface accepts packets with matching + source IP subnet only."; + } + leaf explicit-tracking { + if-feature "intf-explicit-tracking"; + type empty; + description + "When this grouping is used for IGMP, the presence of this + leaf enables an IGMP-based explicit membership tracking + function for multicast routers and IGMP proxy devices + supporting IGMPv3. + When this grouping is used for MLD, the presence of this + leaf enables an MLD-based explicit membership tracking + function for multicast routers and MLD proxy devices + supporting MLDv2. + The explicit membership tracking function contributes to + saving network resources and shortening leave latency."; + reference + "Section 3 of RFC 6636: Tuning the Behavior of the Internet + Group Management Protocol (IGMP) and Multicast Listener + Discovery (MLD) for Routers in Mobile and Wireless + Networks"; + } + leaf lite-exclude-filter { + if-feature "intf-lite-exclude-filter"; + type empty; + description + "When this grouping is used for IGMP, the presence of this + leaf enables the support of the simplified EXCLUDE filter + in the Lightweight IGMPv3 protocol, which simplifies the + standard versions of IGMPv3. + When this grouping is used for MLD, the presence of this + leaf enables the support of the simplified EXCLUDE filter + in the Lightweight MLDv2 protocol, which simplifies the + standard versions of MLDv2."; + reference + "RFC 5790: Lightweight Internet Group Management Protocol + Version 3 (IGMPv3) and Multicast Listener Discovery + Version 2 (MLDv2) Protocols"; + } + } + // interface-level-config-attributes + + grouping interface-config-attributes-igmp { + description + "Per-interface configuration attributes for IGMP."; + uses interface-common-config-attributes-igmp; + uses interface-level-config-attributes; + leaf-list join-group { + if-feature "intf-join-group"; + type rt-types:ipv4-multicast-group-address; + description + "The router joins this multicast group on the interface."; + } + list ssm-map { + if-feature "intf-ssm-map"; + key "ssm-map-source-addr ssm-map-group-policy"; + description + "The policy for (*,G) mapping to (S,G)."; + leaf ssm-map-source-addr { + type ssm-map-ipv4-addr-type; + description + "Multicast source IPv4 address."; + } + leaf ssm-map-group-policy { + type string; + description + "Name of the policy used to define ssm-map rules. + A device can restrict the length + and value of this name, possibly space and special + characters are not allowed."; + } + } + list static-group { + if-feature "intf-static-group"; + key "group-addr source-addr"; + description + "A static multicast route, (*,G) or (S,G). + The version of IGMP must be 3 to support (S,G)."; + leaf group-addr { + type rt-types:ipv4-multicast-group-address; + description + "Multicast group IPv4 address."; + } + leaf source-addr { + type rt-types:ipv4-multicast-source-address; + description + "Multicast source IPv4 address."; + } + } + } + // interface-config-attributes-igmp + + grouping interface-config-attributes-mld { + description + "Per-interface configuration attributes for MLD."; + uses interface-common-config-attributes-mld; + uses interface-level-config-attributes; + leaf-list join-group { + if-feature "intf-join-group"; + type rt-types:ipv6-multicast-group-address; + description + "The router joins this multicast group on the interface."; + } + list ssm-map { + if-feature "intf-ssm-map"; + key "ssm-map-source-addr ssm-map-group-policy"; + description + "The policy for (*,G) mapping to (S,G)."; + leaf ssm-map-source-addr { + type ssm-map-ipv6-addr-type; + description + "Multicast source IPv6 address."; + } + leaf ssm-map-group-policy { + type string; + description + "Name of the policy used to define ssm-map rules. + A device can restrict the length + and value of this name, possibly space and special + characters are not allowed."; + } + } + list static-group { + if-feature "intf-static-group"; + key "group-addr source-addr"; + description + "A static multicast route, (*,G) or (S,G). + The version of MLD must be 2 to support (S,G)."; + leaf group-addr { + type rt-types:ipv6-multicast-group-address; + description + "Multicast group IPv6 address."; + } + leaf source-addr { + type rt-types:ipv6-multicast-source-address; + description + "Multicast source IPv6 address."; + } + } + } + // interface-config-attributes-mld + + grouping interface-state-attributes { + description + "Per-interface state attributes for both IGMP and MLD."; + leaf oper-status { + type enumeration { + enum up { + description + "Ready to pass packets."; + } + enum down { + description + "The interface does not pass any packets."; + } + } + config false; + mandatory true; + description + "Indicates whether the operational state of the interface + is up or down."; + } + } + // interface-state-attributes + + grouping interface-state-attributes-igmp { + description + "Per-interface state attributes for IGMP."; + uses interface-state-attributes; + leaf querier { + type inet:ipv4-address; + config false; + mandatory true; + description + "The querier address in the subnet."; + } + leaf-list joined-group { + if-feature "intf-join-group"; + type rt-types:ipv4-multicast-group-address; + config false; + description + "The routers that joined this multicast group."; + } + list group { + key "group-address"; + config false; + description + "Multicast group membership information + that joined on the interface."; + leaf group-address { + type rt-types:ipv4-multicast-group-address; + description + "Multicast group address."; + } + uses interface-state-group-attributes; + leaf last-reporter { + type inet:ipv4-address; + description + "The IPv4 address of the last host that has sent the + report to join the multicast group."; + } + list source { + key "source-address"; + description + "List of multicast source information + of the multicast group."; + leaf source-address { + type inet:ipv4-address; + description + "Multicast source address in group record."; + } + uses interface-state-source-attributes; + leaf last-reporter { + type inet:ipv4-address; + description + "The IPv4 address of the last host that has sent the + report to join the multicast source and group."; + } + list host { + if-feature "intf-explicit-tracking"; + key "host-address"; + description + "List of hosts with the membership for the specific + multicast source-group."; + leaf host-address { + type inet:ipv4-address; + description + "The IPv4 address of the host."; + } + uses interface-state-host-attributes; + } + // list host + } + // list source + } + // list group + } + // interface-state-attributes-igmp + + grouping interface-state-attributes-mld { + description + "Per-interface state attributes for MLD."; + uses interface-state-attributes; + leaf querier { + type inet:ipv6-address; + config false; + mandatory true; + description + "The querier address in the subnet."; + } + leaf-list joined-group { + if-feature "intf-join-group"; + type rt-types:ipv6-multicast-group-address; + config false; + description + "The routers that joined this multicast group."; + } + list group { + key "group-address"; + config false; + description + "Multicast group membership information + that joined on the interface."; + leaf group-address { + type rt-types:ipv6-multicast-group-address; + description + "Multicast group address."; + } + uses interface-state-group-attributes; + leaf last-reporter { + type inet:ipv6-address; + description + "The IPv6 address of the last host that has sent the + report to join the multicast group."; + } + list source { + key "source-address"; + description + "List of multicast sources of the multicast group."; + leaf source-address { + type inet:ipv6-address; + description + "Multicast source address in group record."; + } + uses interface-state-source-attributes; + leaf last-reporter { + type inet:ipv6-address; + description + "The IPv6 address of the last host that has sent the + report to join the multicast source and group."; + } + list host { + if-feature "intf-explicit-tracking"; + key "host-address"; + description + "List of hosts with the membership for the specific + multicast source-group."; + leaf host-address { + type inet:ipv6-address; + description + "The IPv6 address of the host."; + } + uses interface-state-host-attributes; + } + // list host + } + // list source + } + // list group + } + // interface-state-attributes-mld + + grouping interface-state-group-attributes { + description + "Per-interface state attributes for both IGMP and MLD + groups."; + leaf expire { + type uint32; + units "seconds"; + mandatory true; + description + "The time left before the multicast group state expires."; + } + leaf filter-mode { + type enumeration { + enum include { + description + "In include mode, reception of packets sent + to the specified multicast address is requested + only from those IP source addresses listed in the + source-list parameter"; + } + enum exclude { + description + "In exclude mode, reception of packets sent + to the given multicast address is requested + from all IP source addresses except those + listed in the source-list parameter."; + } + } + mandatory true; + description + "Filter mode for a multicast group, + may be either include or exclude."; + } + leaf up-time { + type uint32; + units "seconds"; + mandatory true; + description + "The elapsed time since the device created multicast group + record."; + } + } + // interface-state-group-attributes + + grouping interface-state-source-attributes { + description + "Per-interface state attributes for both IGMP and MLD + source-group records."; + leaf expire { + type uint32; + units "seconds"; + mandatory true; + description + "The time left before multicast source-group state expires."; + } + leaf up-time { + type uint32; + units "seconds"; + mandatory true; + description + "The elapsed time since the device created multicast + source-group record."; + } + leaf host-count { + if-feature "intf-explicit-tracking"; + type uint32; + description + "The number of host addresses."; + } + } + // interface-state-source-attributes + + grouping interface-state-host-attributes { + description + "Per-interface state attributes for both IGMP and MLD + hosts of source-group records."; + leaf host-filter-mode { + type enumeration { + enum include { + description + "In include mode."; + } + enum exclude { + description + "In exclude mode."; + } + } + mandatory true; + description + "Filter mode for a multicast membership + host may be either include or exclude."; + } + } + // interface-state-host-attributes + + /* + * Configuration and Operational state data nodes (NMDA version) + */ + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol" { + when "derived-from-or-self(rt:type, 'igmp-mld:igmp')" { + description + "This augmentation is only valid for a control-plane + protocol instance of IGMP (type 'igmp')."; + } + description + "IGMP augmentation to routing control-plane protocol + configuration and state."; + container igmp { + if-feature "feature-igmp"; + description + "IGMP configuration and operational state data."; + container global { + description + "Global attributes."; + uses global-config-attributes; + uses global-state-attributes; + } + container interfaces { + description + "Containing a list of interfaces."; + uses interfaces-config-attributes-igmp { + if-feature "interface-global-config"; + refine "query-interval" { + default "125"; + } + refine "query-max-response-time" { + default "10"; + } + refine "robustness-variable" { + default "2"; + } + refine "version" { + default "2"; + } + } + list interface { + key "interface-name"; + description + "List of IGMP interfaces."; + leaf interface-name { + type if:interface-ref; + must + '/if:interfaces/if:interface[if:name = current()]/' + + 'ip:ipv4' { + error-message + "The interface must have IPv4 configured, either " + + "enabled or disabled."; + } + description + "Reference to an entry in the global interface list."; + } + uses interface-config-attributes-igmp { + if-feature "per-interface-config"; + refine "last-member-query-interval" { + must '../version != 1 or ' + + '(not(../version) and ' + + '(../../version != 1 or not(../../version)))' { + error-message "IGMPv1 does not support " + + "last-member-query-interval."; + } + } + refine "max-group-sources" { + must '../version = 3 or ' + + '(not(../version) and (../../version = 3))' { + error-message + "The version of IGMP must be 3 to support the " + + "source-specific parameters."; + } + } + refine "source-policy" { + must '../version = 3 or ' + + '(not(../version) and (../../version = 3))' { + error-message + "The version of IGMP must be 3 to support the " + + "source-specific parameters."; + } + } + refine "explicit-tracking" { + must '../version = 3 or ' + + '(not(../version) and (../../version = 3))' { + error-message + "The version of IGMP must be 3 to support the " + + "explicit tracking function."; + } + } + refine "lite-exclude-filter" { + must '../version = 3 or ' + + '(not(../version) and (../../version = 3))' { + error-message + "The version of IGMP must be 3 to support the " + + "simplified EXCLUDE filter in the Lightweight " + + "IGMPv3 protocol."; + } + } + } + uses interface-state-attributes-igmp; + } + // interface + } + // interfaces + + /* + * Actions + */ + action clear-groups { + if-feature "action-clear-groups"; + description + "Clears the specified IGMP cache entries."; + input { + choice interface { + mandatory true; + description + "Indicates the interface(s) from which the cache + entries are cleared."; + case name { + leaf interface-name { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/" + + "igmp-mld:igmp/igmp-mld:interfaces/" + + "igmp-mld:interface/igmp-mld:interface-name"; + } + description + "Name of the IGMP interface."; + } + } + case all { + leaf all-interfaces { + type empty; + description + "IGMP groups from all interfaces are cleared."; + } + } + } + leaf group-address { + type union { + type enumeration { + enum * { + description + "Any group address."; + } + } + type rt-types:ipv4-multicast-group-address; + } + mandatory true; + description + "Multicast group IPv4 address. + If the value '*' is specified, all IGMP group entries + are cleared."; + } + leaf source-address { + type rt-types:ipv4-multicast-source-address; + mandatory true; + description + "Multicast source IPv4 address. + If the value '*' is specified, all IGMP source-group + entries are cleared."; + } + } + } + // action clear-groups + } + // igmp + } + // augment + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol" { + when "derived-from-or-self(rt:type, 'igmp-mld:mld')" { + description + "This augmentation is only valid for a control-plane + protocol instance of IGMP (type 'mld')."; + } + description + "MLD augmentation to routing control-plane protocol + configuration and state."; + container mld { + if-feature "feature-mld"; + description + "MLD configuration and operational state data."; + container global { + description + "Global attributes."; + uses global-config-attributes; + uses global-state-attributes; + } + container interfaces { + description + "Containing a list of interfaces."; + uses interfaces-config-attributes-mld { + if-feature "interface-global-config"; + refine "last-member-query-interval" { + default "1"; + } + refine "query-interval" { + default "125"; + } + refine "query-max-response-time" { + default "10"; + } + refine "require-router-alert" { + default "true"; + } + refine "robustness-variable" { + default "2"; + } + refine "version" { + default "2"; + } + } + list interface { + key "interface-name"; + description + "List of MLD interfaces."; + leaf interface-name { + type if:interface-ref; + must + '/if:interfaces/if:interface[if:name = current()]/' + + 'ip:ipv6' { + error-message + "The interface must have IPv6 configured, either " + + "enabled or disabled."; + } + description + "Reference to an entry in the global interface list."; + } + uses interface-config-attributes-mld { + if-feature "per-interface-config"; + refine "max-group-sources" { + must '../version = 2 or ' + + '(not(../version) and ' + + '(../../version = 2 or not(../../version)))' { + error-message + "The version of MLD must be 2 to support the " + + "source-specific parameters."; + } + } + refine "source-policy" { + must '../version = 2 or ' + + '(not(../version) and ' + + '(../../version = 2 or not(../../version)))' { + error-message + "The version of MLD must be 2 to support the " + + "source-specific parameters."; + } + } + refine "explicit-tracking" { + must '../version = 2 or ' + + '(not(../version) and ' + + '(../../version = 2 or not(../../version)))' { + error-message + "The version of MLD must be 2 to support the " + + "explicit tracking function."; + } + } + refine "lite-exclude-filter" { + must '../version = 2 or ' + + '(not(../version) and ' + + '(../../version = 2 or not(../../version)))' { + error-message + "The version of MLD must be 2 to support the " + + "simplified EXCLUDE filter in the Lightweight " + + "MLDv2 protocol."; + } + } + } + uses interface-state-attributes-mld; + } + // interface + } + // interfaces + + /* + * Actions + */ + action clear-groups { + if-feature "action-clear-groups"; + description + "Clears the specified MLD cache entries."; + input { + choice interface { + mandatory true; + description + "Indicates the interface(s) from which the cache + entries are cleared."; + case name { + leaf interface-name { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/" + + "igmp-mld:mld/igmp-mld:interfaces/" + + "igmp-mld:interface/igmp-mld:interface-name"; + } + description + "Name of the MLD interface."; + } + } + case all { + leaf all-interfaces { + type empty; + description + "MLD groups from all interfaces are cleared."; + } + } + } + leaf group-address { + type union { + type enumeration { + enum * { + description + "Any group address."; + } + } + type rt-types:ipv6-multicast-group-address; + } + description + "Multicast group IPv6 address. + If the value '*' is specified, all MLD group entries + are cleared."; + } + leaf source-address { + type rt-types:ipv6-multicast-source-address; + description + "Multicast source IPv6 address. + If the value '*' is specified, all MLD source-group + entries are cleared."; + } + } + } + // action clear-mld-groups + } + // mld + } + // augment +} diff --git a/models/third_party/ietf/ietf-inet-types.yang b/models/ietf/RFC/ietf-inet-types.yang similarity index 100% rename from models/third_party/ietf/ietf-inet-types.yang rename to models/ietf/RFC/ietf-inet-types.yang diff --git a/models/ietf/RFC/ietf-inet-types@2010-09-24.yang b/models/ietf/RFC/ietf-inet-types@2010-09-24.yang new file mode 100644 index 0000000000000000000000000000000000000000..c3ada6c68865c19f45d98b912512cc1110b2f939 --- /dev/null +++ b/models/ietf/RFC/ietf-inet-types@2010-09-24.yang @@ -0,0 +1,418 @@ +module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Partain + <mailto:david.partain@ericsson.com> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2010 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 Simplified BSD License set forth in Section + 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6021; see + the RFC itself for full legal notices."; + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of protocol field related types ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code-Point + that may be used for marking packets in a traffic stream. + + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The flow-label type represents flow identifier or Flow Label + in an IPv6 packet header that may be used to discriminate + traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from <http://www.iana.org/>. + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of autonomous system related types ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASs'. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4893: BGP Support for Four-octet AS Number Space + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of IP address and hostname related types ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the compressed + format described in RFC 4291, Section 2.2, item 2 with the + following additional rules: the :: substitution must be + applied to the longest sequence of all-zero 16-bit chunks + in an IPv6 address. If there is a tie, the first sequence + of all-zero 16-bit chunks is replaced by ::. Single + all-zero 16-bit chunks are not compressed. The canonical + format uses lowercase characters and leading zeros are + not allowed. The canonical format for the zone index is + the numerical format as described in RFC 4007, Section + 11.2."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, IPv6 address is represented + in the compressed format described in RFC 4291, Section + 2.2, item 2 with the following additional rules: the :: + substitution must be applied to the longest sequence of + all-zero 16-bit chunks in an IPv6 address. If there is + a tie, the first sequence of all-zero 16-bit chunks is + replaced by ::. Single all-zero 16-bit chunks are not + compressed. The canonical format uses lowercase + characters and leading zeros are not allowed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + pattern '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + length "1..253"; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitely or it may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be encoded in punycode as described in RFC + 3492"; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 3492: Punycode: A Bootstring encoding of Unicode for + Internationalized Domain Names in Applications + (IDNA) + RFC 5891: Internationalizing Domain Names in Applications + (IDNA): Protocol"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + +} diff --git a/models/ietf/RFC/ietf-inet-types@2013-07-15.yang b/models/ietf/RFC/ietf-inet-types@2013-07-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..eacefb6363de1beb543567a0fa705571b7dc57a2 --- /dev/null +++ b/models/ietf/RFC/ietf-inet-types@2013-07-15.yang @@ -0,0 +1,458 @@ +module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2013 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or Flow + Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from <http://www.iana.org/>. + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + length "1..253"; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + +} diff --git a/models/ietf/RFC/ietf-interface-protection.yang b/models/ietf/RFC/ietf-interface-protection.yang new file mode 100644 index 0000000000000000000000000000000000000000..0fae6d1e8d93f9ff09ddc99de52c6d1fb23bec55 --- /dev/null +++ b/models/ietf/RFC/ietf-interface-protection.yang @@ -0,0 +1,269 @@ +module ietf-interface-protection { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-interface-protection"; + prefix ifprot; + + import ietf-interfaces { + prefix if; + reference + "RFC 8343"; + } + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + "WG List: <mailto:ccamp@ietf.org> + + Editors: + Jonas Ahlberg (jonas.ahlberg@ericsson.com) + Min Ye (amy.yemin@huawei.com) + Xi Li (Xi.Li@neclab.eu) + Daniela Spreafico (daniela.spreafico@nokia.com) + Marko Vaupotic (Marko.Vaupotic@aviatnet.com)"; + description + "This is a module for the entities in + a generic interface protection mechanism. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8561; see + the RFC itself for full legal notices."; + + revision 2019-06-19 { + description + "Initial revision."; + reference + "RFC 8561: A YANG Data Model for Microwave Radio Link"; + } + + /* + * Protection architecture type identities + */ + + identity protection-architecture-type { + description + "protection architecture type"; + reference + "ITU-T G.808.1"; + } + + identity one-plus-one-type { + base protection-architecture-type; + description + "1+1; one interface protects + another one interface."; + reference + "ITU-T G.808.1"; + } + + identity one-to-n-type { + base protection-architecture-type; + description + "1:N; one interface protects + n other interfaces."; + reference + "ITU-T G.808.1"; + } + + /* + * Protection states identities + */ + + identity protection-states { + description + "Identities describing the status of the protection + in a group of interfaces configured in + a protection mode."; + } + + identity unprotected { + base protection-states; + description + "Not protected."; + } + + identity protected { + base protection-states; + description + "Protected."; + } + + identity unable-to-protect { + base protection-states; + description + "Unable to protect."; + } + + /* + * Protection Groups + */ + + grouping protection-groups { + description + "Configuration of protected groups of interfaces + providing protection for each other. More than one + protected group per higher-layer interface is allowed."; + list protection-group { + key "name"; + description + "List of protected groups of interfaces + in a higher-layer interface."; + leaf name { + type string; + description + "Name used for identification of the protection group."; + } + leaf protection-architecture-type { + type identityref { + base protection-architecture-type; + } + default "ifprot:one-plus-one-type"; + description + "The type of protection architecture used, e.g., one + interface protecting one or several other interfaces."; + + reference + "ITU-T G.808.1"; + } + leaf-list members { + type if:interface-ref; + min-elements 2; + description + "Association to a group of interfaces configured for + protection and used by a higher-layer interface."; + } + leaf operation-type { + type enumeration { + enum non-revertive { + description + "In non-revertive operation, the traffic does not + return to the working interface if the switch requests + are terminated."; + reference + "ITU-T G.808.1"; + } + enum revertive { + description + "In revertive operation, the traffic always + returns to (or remains on) the working interface + if the switch requests are terminated."; + reference + "ITU-T G.808.1"; + } + } + default "non-revertive"; + description + "The type of protection operation, i.e., revertive + or non-revertive operation."; + } + leaf-list working-entity { + when "../operation-type = 'revertive'"; + type if:interface-ref; + min-elements 1; + description + "The interfaces that the traffic normally should + be transported over when there is no need to use the + protecting interface."; + } + leaf revertive-wait-to-restore { + when "../operation-type = 'revertive'"; + type uint16; + units "seconds"; + default "0"; + description + "The time to wait before switching back to the working + interface if operation-type is revertive."; + reference + "ITU-T G.808.1"; + } + leaf hold-off-timer { + type uint16; + units "milliseconds"; + default "0"; + description + "Time interval after the detection of a fault and its + confirmation as a condition requiring the protection- + switching procedure."; + reference + "ITU-T G.808.1"; + } + leaf status { + type identityref { + base protection-states; + } + config false; + description + "Status of the protection in a group of interfaces + configured in a protection mode."; + reference + "ITU-T G.808.1"; + } + action manual-switch-working { + description + "A switch action initiated by an operator command. + It switches a normal traffic signal to the working + transport entity."; + reference + "ITU-T G.808.1"; + } + action manual-switch-protection { + description + "A switch action initiated by an operator command. + It switches a normal traffic signal to the protection + transport entity."; + reference + "ITU-T G.808.1"; + } + action forced-switch { + description + "A switch action initiated by an operator command. + It switches a normal traffic signal to the protection + transport entity and forces it to remain on that + entity even when criteria for switching back to + the original entity are fulfilled."; + reference + "ITU-T G.808.1"; + } + action lockout-of-protection { + description + "A switch action temporarily disables access to the + protection transport entity for all signals."; + reference + "ITU-T G.808.1"; + } + action freeze { + description + "A switch action temporarily prevents any switch action + to be taken and, as such, freezes the current state. + Until the freeze is cleared, additional near-end external + commands are rejected, and fault condition changes and + received Automatic Protection-Switching (APS) messages + are ignored."; + reference + "ITU-T G.808.1"; + } + action exercise { + description + "A switch action to test if the APS communication is + operating correctly. It is lower priority than any 'real' + switch request."; + reference + "ITU-T G.808.1"; + } + action clear { + description + "An action clears all switch commands."; + reference + "ITU-T G.808.1"; + } + } + } +} diff --git a/models/ietf/RFC/ietf-interface-protection@2019-06-19.yang b/models/ietf/RFC/ietf-interface-protection@2019-06-19.yang new file mode 100644 index 0000000000000000000000000000000000000000..0fae6d1e8d93f9ff09ddc99de52c6d1fb23bec55 --- /dev/null +++ b/models/ietf/RFC/ietf-interface-protection@2019-06-19.yang @@ -0,0 +1,269 @@ +module ietf-interface-protection { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-interface-protection"; + prefix ifprot; + + import ietf-interfaces { + prefix if; + reference + "RFC 8343"; + } + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + "WG List: <mailto:ccamp@ietf.org> + + Editors: + Jonas Ahlberg (jonas.ahlberg@ericsson.com) + Min Ye (amy.yemin@huawei.com) + Xi Li (Xi.Li@neclab.eu) + Daniela Spreafico (daniela.spreafico@nokia.com) + Marko Vaupotic (Marko.Vaupotic@aviatnet.com)"; + description + "This is a module for the entities in + a generic interface protection mechanism. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8561; see + the RFC itself for full legal notices."; + + revision 2019-06-19 { + description + "Initial revision."; + reference + "RFC 8561: A YANG Data Model for Microwave Radio Link"; + } + + /* + * Protection architecture type identities + */ + + identity protection-architecture-type { + description + "protection architecture type"; + reference + "ITU-T G.808.1"; + } + + identity one-plus-one-type { + base protection-architecture-type; + description + "1+1; one interface protects + another one interface."; + reference + "ITU-T G.808.1"; + } + + identity one-to-n-type { + base protection-architecture-type; + description + "1:N; one interface protects + n other interfaces."; + reference + "ITU-T G.808.1"; + } + + /* + * Protection states identities + */ + + identity protection-states { + description + "Identities describing the status of the protection + in a group of interfaces configured in + a protection mode."; + } + + identity unprotected { + base protection-states; + description + "Not protected."; + } + + identity protected { + base protection-states; + description + "Protected."; + } + + identity unable-to-protect { + base protection-states; + description + "Unable to protect."; + } + + /* + * Protection Groups + */ + + grouping protection-groups { + description + "Configuration of protected groups of interfaces + providing protection for each other. More than one + protected group per higher-layer interface is allowed."; + list protection-group { + key "name"; + description + "List of protected groups of interfaces + in a higher-layer interface."; + leaf name { + type string; + description + "Name used for identification of the protection group."; + } + leaf protection-architecture-type { + type identityref { + base protection-architecture-type; + } + default "ifprot:one-plus-one-type"; + description + "The type of protection architecture used, e.g., one + interface protecting one or several other interfaces."; + + reference + "ITU-T G.808.1"; + } + leaf-list members { + type if:interface-ref; + min-elements 2; + description + "Association to a group of interfaces configured for + protection and used by a higher-layer interface."; + } + leaf operation-type { + type enumeration { + enum non-revertive { + description + "In non-revertive operation, the traffic does not + return to the working interface if the switch requests + are terminated."; + reference + "ITU-T G.808.1"; + } + enum revertive { + description + "In revertive operation, the traffic always + returns to (or remains on) the working interface + if the switch requests are terminated."; + reference + "ITU-T G.808.1"; + } + } + default "non-revertive"; + description + "The type of protection operation, i.e., revertive + or non-revertive operation."; + } + leaf-list working-entity { + when "../operation-type = 'revertive'"; + type if:interface-ref; + min-elements 1; + description + "The interfaces that the traffic normally should + be transported over when there is no need to use the + protecting interface."; + } + leaf revertive-wait-to-restore { + when "../operation-type = 'revertive'"; + type uint16; + units "seconds"; + default "0"; + description + "The time to wait before switching back to the working + interface if operation-type is revertive."; + reference + "ITU-T G.808.1"; + } + leaf hold-off-timer { + type uint16; + units "milliseconds"; + default "0"; + description + "Time interval after the detection of a fault and its + confirmation as a condition requiring the protection- + switching procedure."; + reference + "ITU-T G.808.1"; + } + leaf status { + type identityref { + base protection-states; + } + config false; + description + "Status of the protection in a group of interfaces + configured in a protection mode."; + reference + "ITU-T G.808.1"; + } + action manual-switch-working { + description + "A switch action initiated by an operator command. + It switches a normal traffic signal to the working + transport entity."; + reference + "ITU-T G.808.1"; + } + action manual-switch-protection { + description + "A switch action initiated by an operator command. + It switches a normal traffic signal to the protection + transport entity."; + reference + "ITU-T G.808.1"; + } + action forced-switch { + description + "A switch action initiated by an operator command. + It switches a normal traffic signal to the protection + transport entity and forces it to remain on that + entity even when criteria for switching back to + the original entity are fulfilled."; + reference + "ITU-T G.808.1"; + } + action lockout-of-protection { + description + "A switch action temporarily disables access to the + protection transport entity for all signals."; + reference + "ITU-T G.808.1"; + } + action freeze { + description + "A switch action temporarily prevents any switch action + to be taken and, as such, freezes the current state. + Until the freeze is cleared, additional near-end external + commands are rejected, and fault condition changes and + received Automatic Protection-Switching (APS) messages + are ignored."; + reference + "ITU-T G.808.1"; + } + action exercise { + description + "A switch action to test if the APS communication is + operating correctly. It is lower priority than any 'real' + switch request."; + reference + "ITU-T G.808.1"; + } + action clear { + description + "An action clears all switch commands."; + reference + "ITU-T G.808.1"; + } + } + } +} diff --git a/models/third_party/ietf/ietf-interfaces.yang b/models/ietf/RFC/ietf-interfaces.yang similarity index 100% rename from models/third_party/ietf/ietf-interfaces.yang rename to models/ietf/RFC/ietf-interfaces.yang diff --git a/models/ietf/RFC/ietf-interfaces@2014-05-08.yang b/models/ietf/RFC/ietf-interfaces@2014-05-08.yang new file mode 100644 index 0000000000000000000000000000000000000000..710e7e62bb1038244f97656ca1fafa62e912644f --- /dev/null +++ b/models/ietf/RFC/ietf-interfaces@2014-05-08.yang @@ -0,0 +1,696 @@ +module ietf-interfaces { + + namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; + prefix if; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "This module contains a collection of YANG definitions for + managing network interfaces. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7223; see + the RFC itself for full legal notices."; + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + /* + * Typedefs + */ + + typedef interface-ref { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + configured interfaces."; + } + + typedef interface-state-ref { + type leafref { + path "/if:interfaces-state/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + the operationally present interfaces."; + } + + /* + * Identities + */ + + identity interface-type { + description + "Base identity from which specific interface types are + derived."; + } + + /* + * Features + */ + + feature arbitrary-names { + description + "This feature indicates that the device allows user-controlled + interfaces to be named arbitrarily."; + } + feature pre-provisioning { + description + "This feature indicates that the device supports + pre-provisioning of interface configuration, i.e., it is + possible to configure an interface whose physical interface + hardware is not present on the device."; + } + + feature if-mib { + description + "This feature indicates that the device implements + the IF-MIB."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + + /* + * Configuration data nodes + */ + + container interfaces { + description + "Interface configuration parameters."; + + list interface { + key "name"; + + description + "The list of configured interfaces on the device. + + The operational state of an interface is available in the + /interfaces-state/interface list. If the configuration of a + system-controlled interface cannot be used by the system + (e.g., the interface hardware present does not match the + interface type), then the configuration is not applied to + the system-controlled interface shown in the + /interfaces-state/interface list. If the configuration + of a user-controlled interface cannot be used by the system, + the configured interface is not instantiated in the + /interfaces-state/interface list."; + + leaf name { + type string; + description + "The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. The 'config false' + list /interfaces-state/interface contains the currently + existing interfaces on the device. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + /interfaces-state/interface list, the server MAY reject + the request if the implementation does not support + pre-provisioning of interfaces or if the name refers to + an interface that can never exist in the system. A + NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case. + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + /interface-state/interface list."; + } + + leaf description { + type string; + description + "A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + datastore. + + Specifically, if the device supports ':startup', when + ifAlias is read the device MUST return the value of + 'description' in the 'startup' datastore, and when it is + written, it MUST be written to the 'running' and 'startup' + datastores. Note that it is up to the implementation to + + decide whether to modify this single leaf in 'startup' or + perform an implicit copy-config from 'running' to + 'startup'. + + If the device does not support ':startup', ifAlias MUST + be mapped to the 'description' leaf in the 'running' + datastore."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf enabled { + type boolean; + default "true"; + description + "This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the 'running' datastore to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + Changes in this leaf in the 'running' datastore are + reflected in ifAdminStatus, but if ifAdminStatus is + changed over SNMP, this leaf is not affected."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf link-up-down-trap-enable { + if-feature if-mib; + type enumeration { + enum enabled { + value 1; + } + enum disabled { + value 2; + } + } + description + "Controls whether linkUp/linkDown SNMP notifications + should be generated for this interface. + + If this node is not configured, the value 'enabled' is + operationally used by the server for interfaces that do + not operate on top of any other interface (i.e., there are + no 'lower-layer-if' entries), and 'disabled' otherwise."; + reference + "RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable"; + } + } + } + + /* + * Operational state data nodes + */ + + container interfaces-state { + config false; + description + "Data nodes for the operational state of interfaces."; + + list interface { + key "name"; + + description + "The list of interfaces on the device. + + System-controlled interfaces created by the system are + always present in this list, whether they are configured or + not."; + + leaf name { + type string; + description + "The name of the interface. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + + enum testing { + value 3; + description + "In some test mode."; + } + } + mandatory true; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + mandatory true; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + mandatory true; + description + "The ifIndex value for the ifEntry represented by this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-state-ref; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-state-ref; + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-interfaces@2018-02-20.yang b/models/ietf/RFC/ietf-interfaces@2018-02-20.yang new file mode 100644 index 0000000000000000000000000000000000000000..f66c205ce076e65b2ded1d388c944a91829a48b5 --- /dev/null +++ b/models/ietf/RFC/ietf-interfaces@2018-02-20.yang @@ -0,0 +1,1123 @@ +module ietf-interfaces { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; + prefix if; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "This module contains a collection of YANG definitions for + managing network interfaces. + + Copyright (c) 2018 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 Simplified 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 8343; see + the RFC itself for full legal notices."; + + revision 2018-02-20 { + description + "Updated to support NMDA."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + /* + * Typedefs + */ + + typedef interface-ref { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + interfaces."; + } + + /* + * Identities + */ + + identity interface-type { + description + "Base identity from which specific interface types are + derived."; + } + + /* + * Features + */ + + feature arbitrary-names { + description + "This feature indicates that the device allows user-controlled + interfaces to be named arbitrarily."; + } + feature pre-provisioning { + description + "This feature indicates that the device supports + pre-provisioning of interface configuration, i.e., it is + possible to configure an interface whose physical interface + hardware is not present on the device."; + } + feature if-mib { + description + "This feature indicates that the device implements + the IF-MIB."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + + /* + * Data nodes + */ + + container interfaces { + description + "Interface parameters."; + + list interface { + key "name"; + + description + "The list of interfaces on the device. + + The status of an interface is available in this list in the + operational state. If the configuration of a + system-controlled interface cannot be used by the system + (e.g., the interface hardware present does not match the + interface type), then the configuration is not applied to + the system-controlled interface shown in the operational + state. If the configuration of a user-controlled interface + cannot be used by the system, the configured interface is + not instantiated in the operational state. + + System-controlled interfaces created by the system are + always present in this list in the operational state, + whether or not they are configured."; + + leaf name { + type string; + description + "The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + operational state, the server MAY reject the request if + the implementation does not support pre-provisioning of + interfaces or if the name refers to an interface that can + never exist in the system. A Network Configuration + Protocol (NETCONF) server MUST reply with an rpc-error + with the error-tag 'invalid-value' in this case. + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + operational state. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf description { + type string; + description + "A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + configuration."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf enabled { + type boolean; + default "true"; + description + "This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the intended configuration to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + Changes in this leaf in the intended configuration are + reflected in ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf link-up-down-trap-enable { + if-feature if-mib; + type enumeration { + enum enabled { + value 1; + description + "The device will generate linkUp/linkDown SNMP + notifications for this interface."; + } + enum disabled { + value 2; + description + "The device will not generate linkUp/linkDown SNMP + notifications for this interface."; + } + } + description + "Controls whether linkUp/linkDown SNMP notifications + should be generated for this interface. + + If this node is not configured, the value 'enabled' is + operationally used by the server for interfaces that do + not operate on top of any other interface (i.e., there are + no 'lower-layer-if' entries), and 'disabled' otherwise."; + reference + "RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + config false; + mandatory true; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + config false; + mandatory true; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + config false; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + config false; + mandatory true; + description + "The ifIndex value for the ifEntry represented by this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + config false; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-ref; + config false; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-ref; + config false; + + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + config false; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + config false; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + + } + } + + /* + * Legacy typedefs + */ + + typedef interface-state-ref { + type leafref { + path "/if:interfaces-state/if:interface/if:name"; + } + status deprecated; + description + "This type is used by data models that need to reference + the operationally present interfaces."; + } + + /* + * Legacy operational state data nodes + */ + + container interfaces-state { + config false; + status deprecated; + description + "Data nodes for the operational state of interfaces."; + + list interface { + key "name"; + status deprecated; + + description + "The list of interfaces on the device. + + System-controlled interfaces created by the system are + always present in this list, whether or not they are + configured."; + + leaf name { + type string; + status deprecated; + description + "The name of the interface. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + status deprecated; + description + "The type of the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + mandatory true; + status deprecated; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + mandatory true; + status deprecated; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + status deprecated; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + mandatory true; + status deprecated; + description + "The ifIndex value for the ifEntry represented by this + interface."; + + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + status deprecated; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + status deprecated; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + status deprecated; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + status deprecated; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + status deprecated; + + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + status deprecated; + + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + status deprecated; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ip.yang b/models/ietf/RFC/ietf-ip.yang new file mode 100644 index 0000000000000000000000000000000000000000..a270f67b6fec6c7930362d98f2bbca8a339f4100 --- /dev/null +++ b/models/ietf/RFC/ietf-ip.yang @@ -0,0 +1,876 @@ +module ietf-ip { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; + prefix ip; + + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module contains a collection of YANG definitions for + managing IP implementations. + + Copyright (c) 2018 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 Simplified 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 8344; see + the RFC itself for full legal notices."; + + revision 2018-02-22 { + description + "Updated to support NMDA."; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + + revision 2014-06-16 { + description + "Initial revision."; + reference + "RFC 7277: A YANG Data Model for IP Management"; + } + + /* + * Features + */ + + feature ipv4-non-contiguous-netmasks { + description + "Indicates support for configuring non-contiguous + subnet masks."; + } + + feature ipv6-privacy-autoconf { + description + "Indicates support for privacy extensions for stateless address + autoconfiguration in IPv6."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + /* + * Typedefs + */ + + typedef ip-address-origin { + type enumeration { + enum other { + description + "None of the following."; + } + + enum static { + description + "Indicates that the address has been statically + configured -- for example, using the Network Configuration + Protocol (NETCONF) or a command line interface."; + } + enum dhcp { + description + "Indicates an address that has been assigned to this + system by a DHCP server."; + } + enum link-layer { + description + "Indicates an address created by IPv6 stateless + autoconfiguration that embeds a link-layer address in its + interface identifier."; + } + enum random { + description + "Indicates an address chosen by the system at + random, e.g., an IPv4 address within 169.254/16, a + temporary address as described in RFC 4941, or a + semantically opaque address as described in RFC 7217."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + RFC 7217: A Method for Generating Semantically Opaque + Interface Identifiers with IPv6 Stateless + Address Autoconfiguration (SLAAC)"; + } + } + description + "The origin of an address."; + } + + typedef neighbor-origin { + type enumeration { + enum other { + description + "None of the following."; + } + enum static { + description + "Indicates that the mapping has been statically + configured -- for example, using NETCONF or a command line + interface."; + } + + enum dynamic { + description + "Indicates that the mapping has been dynamically resolved + using, for example, IPv4 ARP or the IPv6 Neighbor + Discovery protocol."; + } + } + description + "The origin of a neighbor entry."; + } + + /* + * Data nodes + */ + + augment "/if:interfaces/if:interface" { + description + "IP parameters on interfaces. + + If an interface is not capable of running IP, the server + must not allow the client to configure these parameters."; + + container ipv4 { + presence + "Enables IPv4 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv4 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv4 is enabled or disabled on this + interface. When IPv4 is enabled, this interface is + connected to an IPv4 stack, and the interface can send + and receive IPv4 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv4 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv4 routers + forward datagrams. IPv4 hosts do not (except those + source-routed via the host)."; + } + + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + choice subnet { + mandatory true; + description + "The subnet can be specified as a prefix length or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + + leaf origin { + type ip-address-origin; + config false; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + Entries in this list in the intended configuration are + used as static entries in the ARP Cache. + + In the operational state, this list represents the ARP + Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + config false; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence + "Enables IPv6 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv6 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv6 is enabled or disabled on this + interface. When IPv6 is enabled, this interface is + connected to an IPv6 stack, and the interface can send + and receive IPv6 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv6 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv6 routers + forward datagrams. IPv6 hosts do not (except those + source-routed via the host)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + Section 5"; + } + + list address { + key "ip"; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + config false; + description + "The origin of this address."; + } + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + config false; + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + Entries in this list in the intended configuration are + used as static entries in the Neighbor Cache. + + In the operational state, this list represents the + Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node. + + In the operational state, if the neighbor's 'state' leaf + is 'incomplete', this leaf is not instantiated."; + } + leaf origin { + type neighbor-origin; + config false; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + config false; + description + "Indicates that the neighbor node acts as a router."; + } + + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the + link-layer address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + config false; + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + + leaf dup-addr-detect-transmits { + type uint32; + default 1; + description + "The number of consecutive Neighbor Solicitation messages + sent while performing Duplicate Address Detection on a + tentative address. A value of zero indicates that + Duplicate Address Detection is not performed on + tentative addresses. A value of one indicates a single + transmission with no follow-up retransmissions."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + container autoconf { + description + "Parameters to control the autoconfiguration of IPv6 + addresses, as described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + + leaf create-global-addresses { + type boolean; + default true; + description + "If enabled, the host creates global addresses as + described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration + Section 5.5"; + } + leaf create-temporary-addresses { + if-feature ipv6-privacy-autoconf; + type boolean; + default false; + description + "If enabled, the host creates temporary addresses as + described in RFC 4941."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + leaf temporary-valid-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 604800; + description + "The time period during which the temporary address + is valid."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_VALID_LIFETIME"; + } + leaf temporary-preferred-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 86400; + description + "The time period during which the temporary address is + preferred."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_PREFERRED_LIFETIME"; + } + } + } + } + + /* + * Legacy operational state data nodes + */ + + augment "/if:interfaces-state/if:interface" { + status deprecated; + description + "Data nodes for the operational state of IP on interfaces."; + + container ipv4 { + presence + "Present if IPv4 is enabled on this interface"; + config false; + status deprecated; + description + "Interface-specific parameters for the IPv4 address family."; + + leaf forwarding { + type boolean; + status deprecated; + description + "Indicates whether IPv4 packet forwarding is enabled or + disabled on this interface."; + } + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + status deprecated; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + status deprecated; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + status deprecated; + description + "The IPv4 address on the interface."; + } + choice subnet { + status deprecated; + description + "The subnet can be specified as a prefix length or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + status deprecated; + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + status deprecated; + description + "The subnet specified as a netmask."; + } + } + leaf origin { + type ip-address-origin; + status deprecated; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + status deprecated; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + This list represents the ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + status deprecated; + description + "The IPv4 address of the neighbor node."; + } + + leaf link-layer-address { + type yang:phys-address; + status deprecated; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + status deprecated; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence + "Present if IPv6 is enabled on this interface"; + config false; + status deprecated; + description + "Parameters for the IPv6 address family."; + + leaf forwarding { + type boolean; + default false; + status deprecated; + description + "Indicates whether IPv6 packet forwarding is enabled or + disabled on this interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + status deprecated; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + Section 5"; + } + list address { + key "ip"; + status deprecated; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + status deprecated; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + status deprecated; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + status deprecated; + description + "The origin of this address."; + } + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + status deprecated; + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + status deprecated; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + This list represents the Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + status deprecated; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + status deprecated; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + status deprecated; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + status deprecated; + description + "Indicates that the neighbor node acts as a router."; + } + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the + link-layer address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + status deprecated; + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ip@2014-06-16.yang b/models/ietf/RFC/ietf-ip@2014-06-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..51276a5cd09d89dfb5178b2be0aa3abff0e71002 --- /dev/null +++ b/models/ietf/RFC/ietf-ip@2014-06-16.yang @@ -0,0 +1,701 @@ +module ietf-ip { + + namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; + prefix ip; + + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "This module contains a collection of YANG definitions for + configuring IP implementations. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7277; see + the RFC itself for full legal notices."; + + revision 2014-06-16 { + description + "Initial revision."; + reference + "RFC 7277: A YANG Data Model for IP Management"; + } + + /* + + * Features + */ + + feature ipv4-non-contiguous-netmasks { + description + "Indicates support for configuring non-contiguous + subnet masks."; + } + + feature ipv6-privacy-autoconf { + description + "Indicates support for Privacy Extensions for Stateless Address + Autoconfiguration in IPv6."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + /* + * Typedefs + */ + + typedef ip-address-origin { + type enumeration { + enum other { + description + "None of the following."; + } + enum static { + description + "Indicates that the address has been statically + configured - for example, using NETCONF or a Command Line + Interface."; + } + enum dhcp { + description + "Indicates an address that has been assigned to this + system by a DHCP server."; + } + enum link-layer { + description + "Indicates an address created by IPv6 stateless + autoconfiguration that embeds a link-layer address in its + interface identifier."; + } + enum random { + description + "Indicates an address chosen by the system at + + random, e.g., an IPv4 address within 169.254/16, an + RFC 4941 temporary address, or an RFC 7217 semantically + opaque address."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + RFC 7217: A Method for Generating Semantically Opaque + Interface Identifiers with IPv6 Stateless + Address Autoconfiguration (SLAAC)"; + } + } + description + "The origin of an address."; + } + + typedef neighbor-origin { + type enumeration { + enum other { + description + "None of the following."; + } + enum static { + description + "Indicates that the mapping has been statically + configured - for example, using NETCONF or a Command Line + Interface."; + } + enum dynamic { + description + "Indicates that the mapping has been dynamically resolved + using, e.g., IPv4 ARP or the IPv6 Neighbor Discovery + protocol."; + } + } + description + "The origin of a neighbor entry."; + } + + /* + * Configuration data nodes + */ + + augment "/if:interfaces/if:interface" { + description + "Parameters for configuring IP on interfaces. + + If an interface is not capable of running IP, the server + must not allow the client to configure these parameters."; + + container ipv4 { + presence + "Enables IPv4 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv4 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv4 is enabled or disabled on this + interface. When IPv4 is enabled, this interface is + connected to an IPv4 stack, and the interface can send + and receive IPv4 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv4 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv4 routers + forward datagrams. IPv4 hosts do not (except those + source-routed via the host)."; + } + leaf mtu { + type uint16 { + range "68..max"; + } + units octets; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + description + "The list of configured IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + + choice subnet { + mandatory true; + description + "The subnet can be specified as a prefix-length, or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + Entries in this list are used as static entries in the + ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + } + + } + + container ipv6 { + presence + "Enables IPv6 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv6 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv6 is enabled or disabled on this + interface. When IPv6 is enabled, this interface is + connected to an IPv6 stack, and the interface can send + and receive IPv6 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv6 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv6 routers + forward datagrams. IPv6 hosts do not (except those + source-routed via the host)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units octets; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + Section 5"; + } + + list address { + key "ip"; + description + "The list of configured IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + Entries in this list are used as static entries in the + Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + } + + leaf dup-addr-detect-transmits { + type uint32; + default 1; + description + "The number of consecutive Neighbor Solicitation messages + sent while performing Duplicate Address Detection on a + tentative address. A value of zero indicates that + Duplicate Address Detection is not performed on + tentative addresses. A value of one indicates a single + transmission with no follow-up retransmissions."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + container autoconf { + description + "Parameters to control the autoconfiguration of IPv6 + addresses, as described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + + leaf create-global-addresses { + type boolean; + default true; + description + "If enabled, the host creates global addresses as + described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration + Section 5.5"; + } + leaf create-temporary-addresses { + if-feature ipv6-privacy-autoconf; + type boolean; + default false; + description + "If enabled, the host creates temporary addresses as + described in RFC 4941."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + leaf temporary-valid-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 604800; + description + "The time period during which the temporary address + is valid."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_VALID_LIFETIME"; + } + leaf temporary-preferred-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 86400; + description + "The time period during which the temporary address is + preferred."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_PREFERRED_LIFETIME"; + } + } + } + } + + /* + * Operational state data nodes + */ + + augment "/if:interfaces-state/if:interface" { + description + "Data nodes for the operational state of IP on interfaces."; + + container ipv4 { + presence "Present if IPv4 is enabled on this interface"; + config false; + description + "Interface-specific parameters for the IPv4 address family."; + + leaf forwarding { + type boolean; + description + "Indicates whether IPv4 packet forwarding is enabled or + disabled on this interface."; + } + leaf mtu { + type uint16 { + range "68..max"; + } + units octets; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + choice subnet { + description + "The subnet can be specified as a prefix-length, or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + + leaf origin { + type ip-address-origin; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + This list represents the ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + description + "The origin of this neighbor entry."; + } + } + + } + + container ipv6 { + presence "Present if IPv6 is enabled on this interface"; + config false; + description + "Parameters for the IPv6 address family."; + + leaf forwarding { + type boolean; + default false; + description + "Indicates whether IPv6 packet forwarding is enabled or + disabled on this interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units octets; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive."; + reference + "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + Section 5"; + } + list address { + key "ip"; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + description + "The origin of this address."; + } + + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + This list represents the Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + description + "Indicates that the neighbor node acts as a router."; + } + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the link-layer + address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ip@2018-02-22.yang b/models/ietf/RFC/ietf-ip@2018-02-22.yang new file mode 100644 index 0000000000000000000000000000000000000000..a270f67b6fec6c7930362d98f2bbca8a339f4100 --- /dev/null +++ b/models/ietf/RFC/ietf-ip@2018-02-22.yang @@ -0,0 +1,876 @@ +module ietf-ip { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; + prefix ip; + + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module contains a collection of YANG definitions for + managing IP implementations. + + Copyright (c) 2018 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 Simplified 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 8344; see + the RFC itself for full legal notices."; + + revision 2018-02-22 { + description + "Updated to support NMDA."; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + + revision 2014-06-16 { + description + "Initial revision."; + reference + "RFC 7277: A YANG Data Model for IP Management"; + } + + /* + * Features + */ + + feature ipv4-non-contiguous-netmasks { + description + "Indicates support for configuring non-contiguous + subnet masks."; + } + + feature ipv6-privacy-autoconf { + description + "Indicates support for privacy extensions for stateless address + autoconfiguration in IPv6."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + /* + * Typedefs + */ + + typedef ip-address-origin { + type enumeration { + enum other { + description + "None of the following."; + } + + enum static { + description + "Indicates that the address has been statically + configured -- for example, using the Network Configuration + Protocol (NETCONF) or a command line interface."; + } + enum dhcp { + description + "Indicates an address that has been assigned to this + system by a DHCP server."; + } + enum link-layer { + description + "Indicates an address created by IPv6 stateless + autoconfiguration that embeds a link-layer address in its + interface identifier."; + } + enum random { + description + "Indicates an address chosen by the system at + random, e.g., an IPv4 address within 169.254/16, a + temporary address as described in RFC 4941, or a + semantically opaque address as described in RFC 7217."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + RFC 7217: A Method for Generating Semantically Opaque + Interface Identifiers with IPv6 Stateless + Address Autoconfiguration (SLAAC)"; + } + } + description + "The origin of an address."; + } + + typedef neighbor-origin { + type enumeration { + enum other { + description + "None of the following."; + } + enum static { + description + "Indicates that the mapping has been statically + configured -- for example, using NETCONF or a command line + interface."; + } + + enum dynamic { + description + "Indicates that the mapping has been dynamically resolved + using, for example, IPv4 ARP or the IPv6 Neighbor + Discovery protocol."; + } + } + description + "The origin of a neighbor entry."; + } + + /* + * Data nodes + */ + + augment "/if:interfaces/if:interface" { + description + "IP parameters on interfaces. + + If an interface is not capable of running IP, the server + must not allow the client to configure these parameters."; + + container ipv4 { + presence + "Enables IPv4 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv4 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv4 is enabled or disabled on this + interface. When IPv4 is enabled, this interface is + connected to an IPv4 stack, and the interface can send + and receive IPv4 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv4 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv4 routers + forward datagrams. IPv4 hosts do not (except those + source-routed via the host)."; + } + + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + choice subnet { + mandatory true; + description + "The subnet can be specified as a prefix length or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + + leaf origin { + type ip-address-origin; + config false; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + Entries in this list in the intended configuration are + used as static entries in the ARP Cache. + + In the operational state, this list represents the ARP + Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + config false; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence + "Enables IPv6 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv6 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv6 is enabled or disabled on this + interface. When IPv6 is enabled, this interface is + connected to an IPv6 stack, and the interface can send + and receive IPv6 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv6 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv6 routers + forward datagrams. IPv6 hosts do not (except those + source-routed via the host)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + Section 5"; + } + + list address { + key "ip"; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + config false; + description + "The origin of this address."; + } + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + config false; + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + Entries in this list in the intended configuration are + used as static entries in the Neighbor Cache. + + In the operational state, this list represents the + Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node. + + In the operational state, if the neighbor's 'state' leaf + is 'incomplete', this leaf is not instantiated."; + } + leaf origin { + type neighbor-origin; + config false; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + config false; + description + "Indicates that the neighbor node acts as a router."; + } + + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the + link-layer address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + config false; + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + + leaf dup-addr-detect-transmits { + type uint32; + default 1; + description + "The number of consecutive Neighbor Solicitation messages + sent while performing Duplicate Address Detection on a + tentative address. A value of zero indicates that + Duplicate Address Detection is not performed on + tentative addresses. A value of one indicates a single + transmission with no follow-up retransmissions."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + container autoconf { + description + "Parameters to control the autoconfiguration of IPv6 + addresses, as described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + + leaf create-global-addresses { + type boolean; + default true; + description + "If enabled, the host creates global addresses as + described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration + Section 5.5"; + } + leaf create-temporary-addresses { + if-feature ipv6-privacy-autoconf; + type boolean; + default false; + description + "If enabled, the host creates temporary addresses as + described in RFC 4941."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + leaf temporary-valid-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 604800; + description + "The time period during which the temporary address + is valid."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_VALID_LIFETIME"; + } + leaf temporary-preferred-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 86400; + description + "The time period during which the temporary address is + preferred."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_PREFERRED_LIFETIME"; + } + } + } + } + + /* + * Legacy operational state data nodes + */ + + augment "/if:interfaces-state/if:interface" { + status deprecated; + description + "Data nodes for the operational state of IP on interfaces."; + + container ipv4 { + presence + "Present if IPv4 is enabled on this interface"; + config false; + status deprecated; + description + "Interface-specific parameters for the IPv4 address family."; + + leaf forwarding { + type boolean; + status deprecated; + description + "Indicates whether IPv4 packet forwarding is enabled or + disabled on this interface."; + } + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + status deprecated; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + status deprecated; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + status deprecated; + description + "The IPv4 address on the interface."; + } + choice subnet { + status deprecated; + description + "The subnet can be specified as a prefix length or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + status deprecated; + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + status deprecated; + description + "The subnet specified as a netmask."; + } + } + leaf origin { + type ip-address-origin; + status deprecated; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + status deprecated; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + This list represents the ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + status deprecated; + description + "The IPv4 address of the neighbor node."; + } + + leaf link-layer-address { + type yang:phys-address; + status deprecated; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + status deprecated; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence + "Present if IPv6 is enabled on this interface"; + config false; + status deprecated; + description + "Parameters for the IPv6 address family."; + + leaf forwarding { + type boolean; + default false; + status deprecated; + description + "Indicates whether IPv6 packet forwarding is enabled or + disabled on this interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + status deprecated; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + Section 5"; + } + list address { + key "ip"; + status deprecated; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + status deprecated; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + status deprecated; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + status deprecated; + description + "The origin of this address."; + } + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + status deprecated; + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + status deprecated; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + This list represents the Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + status deprecated; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + status deprecated; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + status deprecated; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + status deprecated; + description + "Indicates that the neighbor node acts as a router."; + } + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the + link-layer address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + status deprecated; + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ipfix-psamp.yang b/models/ietf/RFC/ietf-ipfix-psamp.yang new file mode 100644 index 0000000000000000000000000000000000000000..744f0964809a354d217e87f1c8ba96631a6633ad --- /dev/null +++ b/models/ietf/RFC/ietf-ipfix-psamp.yang @@ -0,0 +1,2232 @@ +module ietf-ipfix-psamp { + namespace "urn:ietf:params:xml:ns:yang:ietf-ipfix-psamp"; + prefix ipfix; + + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + + organization + "IETF IPFIX Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/ipfix/> + WG List: <ipfix@ietf.org> + + WG Chair: Nevil Brownlee + <n.brownlee@auckland.ac.nz> + + WG Chair: Juergen Quittek + <quittek@neclab.eu> + + Editor: Gerhard Muenz + <muenz@net.in.tum.de>"; + + description + "IPFIX/PSAMP Configuration Data Model + + Copyright (c) 2012 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info)."; + + revision 2012-09-05 { + description "Initial version"; + reference "RFC 6728: Configuration Data Model for the IP Flow + Information Export (IPFIX) and Packet Sampling (PSAMP) + Protocols"; + } + + /***************************************************************** + * Features + *****************************************************************/ + + feature exporter { + description "If supported, the Monitoring Device can be used as + an Exporter. Exporting Processes can be configured."; + } + + feature collector { + description "If supported, the Monitoring Device can be used as + a Collector. Collecting Processes can be configured."; + } + + feature meter { + description "If supported, Observation Points, Selection + Processes, and Caches can be configured."; + } + + feature psampSampCountBased { + description "If supported, the Monitoring Device supports + count-based Sampling. The Selector method sampCountBased can + be configured."; + } + + feature psampSampTimeBased { + description "If supported, the Monitoring Device supports + time-based Sampling. The Selector method sampTimeBased can + be configured."; + } + + feature psampSampRandOutOfN { + description "If supported, the Monitoring Device supports + random n-out-of-N Sampling. The Selector method + sampRandOutOfN can be configured."; + } + + feature psampSampUniProb { + description "If supported, the Monitoring Device supports + uniform probabilistic Sampling. The Selector method + sampUniProb can be configured."; + } + + feature psampFilterMatch { + description "If supported, the Monitoring Device supports + property match Filtering. The Selector method filterMatch + can be configured."; + } + + feature psampFilterHash { + description "If supported, the Monitoring Device supports + hash-based Filtering. The Selector method filterHash can be + configured."; + } + + feature immediateCache { + description "If supported, the Monitoring Device supports + Caches generating PSAMP Packet Reports by configuration with + immediateCache."; + } + + feature timeoutCache { + description "If supported, the Monitoring Device supports + Caches generating IPFIX Flow Records by configuration with + timeoutCache."; + } + + feature naturalCache { + description "If supported, the Monitoring Device supports + Caches generating IPFIX Flow Records by configuration with + naturalCache."; + } + + feature permanentCache { + description "If supported, the Monitoring Device supports + Caches generating IPFIX Flow Records by configuration with + permanentCache."; + } + + feature udpTransport { + description "If supported, the Monitoring Device supports UDP + as the transport protocol."; + } + + feature tcpTransport { + description "If supported, the Monitoring Device supports TCP + as the transport protocol."; + } + + feature fileReader { + description "If supported, the Monitoring Device supports the + configuration of Collecting Processes as File Readers."; + } + + feature fileWriter { + description "If supported, the Monitoring Device supports the + configuration of Exporting Processes as File Writers."; + } + + /***************************************************************** + * Identities + *****************************************************************/ + + /*** Hash function identities ***/ + identity hashFunction { + description "Base identity for all hash functions used for + hash-based packet Filtering. Identities derived from + this base are used by the leaf + /ipfix/selectionProcess/selector/filterHash/hashFunction."; + } + identity BOB { + base "hashFunction"; + description "BOB hash function"; + reference "RFC 5475, Section 6.2.4.1."; + } + identity IPSX { + base "hashFunction"; + description "IPSX hash function"; + reference "RFC 5475, Section 6.2.4.1."; + } + identity CRC { + base "hashFunction"; + description "CRC hash function"; + reference "RFC 5475, Section 6.2.4.1."; + } + + /*** Export mode identities ***/ + identity exportMode { + description "Base identity for different usages of export + destinations configured for an Exporting Process. + Identities derived from this base are used by the leaf + /ipfix/exportingProcess/exportMode."; + } + identity parallel { + base "exportMode"; + description "Parallel export of Data Records to all + destinations configured for the Exporting Process."; + } + identity loadBalancing { + base "exportMode"; + description "Load-balancing between the different destinations + configured for the Exporting Process."; + } + identity fallback { + base "exportMode"; + description "Export to the primary destination (i.e., the first + SCTP, UDP, TCP, or file destination configured for the + Exporting Process). If the export to the primary destination + fails, the Exporting Process tries to export to the secondary + destination. If the secondary destination fails as well, it + continues with the tertiary, etc."; + } + + /*** Options type identities ***/ + identity optionsType { + description "Base identity for report types exported with + options. Identities derived from this base are used by the leaf + /ipfix/exportingProcess/options/optionsType."; + } + identity meteringStatistics { + base "optionsType"; + description "Metering Process Statistics."; + reference "RFC 5101, Section 4.1."; + } + identity meteringReliability { + base "optionsType"; + description "Metering Process Reliability Statistics."; + reference "RFC 5101, Section 4.2."; + } + identity exportingReliability { + base "optionsType"; + description "Exporting Process Reliability + Statistics."; + reference "RFC 5101, Section 4.3."; + } + identity flowKeys { + base "optionsType"; + description "Flow Keys."; + reference "RFC 5101, Section 4.4."; + } + identity selectionSequence { + base "optionsType"; + description "Selection Sequence and Selector Reports."; + reference "RFC 5476, Sections 6.5.1 and 6.5.2."; + } + identity selectionStatistics { + base "optionsType"; + description "Selection Sequence Statistics Report."; + reference "RFC 5476, Sections 6.5.3."; + } + identity accuracy { + base "optionsType"; + description "Accuracy Report."; + reference "RFC 5476, Section 6.5.4."; + } + identity reducingRedundancy { + base "optionsType"; + description "Enables the utilization of Options Templates to + reduce redundancy in the exported Data Records."; + reference "RFC 5473."; + } + identity extendedTypeInformation { + base "optionsType"; + description "Export of extended type information for + enterprise-specific Information Elements used in the + exported Templates."; + reference "RFC 5610."; + } + + /***************************************************************** + * Type definitions + *****************************************************************/ + + typedef ieNameType { + type string { + length "1..max"; + pattern "\S+"; + } + description "Type for Information Element names. Whitespaces + are not allowed."; + } + + typedef ieIdType { + type uint16 { + range "1..32767" { + description "Valid range of Information Element + identifiers."; + reference "RFC 5102, Section 4."; + } + } + description "Type for Information Element identifiers."; + } + + typedef nameType { + type string { + length "1..max"; + pattern "\S(.*\S)?"; + } + description "Type for 'name' leafs, which are used to identify + specific instances within lists, etc. + Leading and trailing whitespaces are not allowed."; + } + + typedef ifNameType { + type string { + length "1..255"; + } + description "This corresponds to the DisplayString textual + convention of SNMPv2-TC, which is used for ifName in the IF + MIB module."; + reference "RFC 2863 (ifName)."; + } + + typedef direction { + type enumeration { + enum ingress { + description "This value is used for monitoring incoming + packets."; + } + enum egress { + description "This value is used for monitoring outgoing + packets."; + } + enum both { + description "This value is used for monitoring incoming and + outgoing packets."; + } + } + description "Direction of packets going through an interface or + linecard."; + } + + typedef transportSessionStatus { + type enumeration { + enum inactive { + description "This value MUST be used for Transport Sessions + that are specified in the system but currently not active. + The value can be used for Transport Sessions that are + backup (secondary) sessions."; + } + enum active { + description "This value MUST be used for Transport Sessions + that are currently active and transmitting or receiving + data."; + } + enum unknown { + description "This value MUST be used if the status of the + Transport Sessions cannot be detected by the device. This + value should be avoided as far as possible."; + } + } + description "Status of a Transport Session."; + reference "RFC 6615, Section 8 (ipfixTransportSessionStatus)."; + } + + /***************************************************************** + * Groupings + *****************************************************************/ + + grouping observationPointParameters { + description "Interface as input to Observation Point."; + leaf observationPointId { + type uint32; + config false; + description "Observation Point ID (i.e., the value of the + Information Element observationPointId) assigned by the + Monitoring Device."; + reference "IANA registry for IPFIX Entities, + http://www.iana.org/assignments/ipfix."; + } + leaf observationDomainId { + type uint32; + mandatory true; + description "The Observation Domain ID associates the + Observation Point to an Observation Domain. Observation + Points with identical Observation Domain IDs belong to the + same Observation Domain. + Note that this parameter corresponds to + ipfixObservationPointObservationDomainId in the IPFIX MIB + module."; + reference "RFC 5101; RFC 6615, Section 8 + (ipfixObservationPointObservationDomainId)."; + } + leaf-list ifName { + type ifNameType; + description "List of names identifying interfaces of the + Monitoring Device. The Observation Point observes packets at + the specified interfaces."; + } + leaf-list ifIndex { + type uint32; + description "List of ifIndex values pointing to entries in the + ifTable of the IF-MIB module maintained by the Monitoring + Device. The Observation Point observes packets at the + specified interfaces. + This parameter SHOULD only be used if an SNMP agent enables + access to the ifTable. + Note that this parameter corresponds to + ipfixObservationPointPhysicalInterface in the IPFIX MIB + module."; + reference "RFC 2863; RFC 6615, Section 8 + (ipfixObservationPointPhysicalInterface)."; + } + leaf-list entPhysicalName { + type string; + description "List of names identifying physical entities of the + Monitoring Device. The Observation Point observes packets at + the specified entities."; + } + leaf-list entPhysicalIndex { + type uint32; + description "List of entPhysicalIndex values pointing to + entries in the entPhysicalTable of the ENTITY-MIB module + maintained by the Monitoring Device. The Observation Point + observes packets at the specified entities. + This parameter SHOULD only be used if an SNMP agent enables + access to the entPhysicalTable. + Note that this parameter corresponds to + ipfixObservationPointPhysicalEntity in the IPFIX MIB + module."; + reference "RFC 4133; RFC 6615, Section 8 + (ipfixObservationPointPhysicalInterface)."; + } + leaf direction { + type direction; + default both; + description "Direction of packets. If not applicable (e.g., in + the case of a sniffing interface in promiscuous mode), this + parameter is ignored."; + } + } + + grouping sampCountBasedParameters { + description "Configuration parameters of a Selector applying + systematic count-based packet Sampling to the packet + stream."; + reference "RFC 5475, Section 5.1; RFC 5476, Section 6.5.2.1."; + leaf packetInterval { + type uint32; + units packets; + mandatory true; + description "The number of packets that are consecutively + sampled between gaps of length packetSpace. + This parameter corresponds to the Information Element + samplingPacketInterval and to psampSampCountBasedInterval + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.2; RFC 6727, Section 6 + (psampSampCountBasedInterval)."; + } + leaf packetSpace { + type uint32; + units packets; + mandatory true; + description "The number of unsampled packets between two + Sampling intervals. + This parameter corresponds to the Information Element + samplingPacketSpace and to psampSampCountBasedSpace + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.3; RFC 6727, Section 6 + (psampSampCountBasedSpace)."; + } + } + + grouping sampTimeBasedParameters { + description "Configuration parameters of a Selector applying + systematic time-based packet Sampling to the packet + stream."; + reference "RFC 5475, Section 5.1; RFC 5476, Section 6.5.2.2."; + leaf timeInterval { + type uint32; + units microseconds; + mandatory true; + description "The time interval in microseconds during + which all arriving packets are sampled between gaps + of length timeSpace. + This parameter corresponds to the Information Element + samplingTimeInterval and to psampSampTimeBasedInterval + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.4; RFC 6727, Section 6 + (psampSampTimeBasedInterval)."; + } + leaf timeSpace { + type uint32; + units microseconds; + mandatory true; + description "The time interval in microseconds during + which no packets are sampled between two Sampling + intervals specified by timeInterval. + This parameter corresponds to the Information Element + samplingTimeInterval and to psampSampTimeBasedSpace + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.5; RFC 6727, Section 6 + (psampSampTimeBasedSpace)."; + } + } + + grouping sampRandOutOfNParameters { + description "Configuration parameters of a Selector applying + n-out-of-N packet Sampling to the packet stream."; + reference "RFC 5475, Section 5.2.1; RFC 5476, Section 6.5.2.3."; + leaf size { + type uint32; + units packets; + mandatory true; + description "The number of elements taken from the parent + population. + This parameter corresponds to the Information Element + samplingSize and to psampSampRandOutOfNSize in the PSAMP + MIB module."; + reference "RFC 5477, Section 8.2.6; RFC 6727, Section 6 + (psampSampRandOutOfNSize)."; + } + leaf population { + type uint32; + units packets; + mandatory true; + description "The number of elements in the parent + population. + This parameter corresponds to the Information Element + samplingPopulation and to psampSampRandOutOfNPopulation + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.7; RFC 6727, Section 6 + (psampSampRandOutOfNPopulation)."; + } + } + + grouping sampUniProbParameters { + description "Configuration parameters of a Selector applying + uniform probabilistic packet Sampling (with equal + probability per packet) to the packet stream."; + reference "RFC 5475, Section 5.2.2.1; + RFC 5476, Section 6.5.2.4."; + leaf probability { + type decimal64 { + fraction-digits 18; + range "0..1"; + } + mandatory true; + description "Probability that a packet is sampled, + expressed as a value between 0 and 1. The probability + is equal for every packet. + This parameter corresponds to the Information Element + samplingProbability and to psampSampUniProbProbability + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.8; RFC 6727, Section 6 + (psampSampUniProbProbability)."; + } + } + + grouping filterMatchParameters { + description "Configuration parameters of a Selector applying + property match Filtering to the packet stream. + The field to be matched is specified as an Information + Element."; + reference "RFC 5475, Section 6.1; RFC 5476, Section 6.5.2.5."; + choice nameOrId { + mandatory true; + description "The field to be matched is specified by + either the name or the identifier of the Information + Element."; + leaf ieName { + type ieNameType; + description "Name of the Information Element."; + } + leaf ieId { + type ieIdType; + description "Identifier of the Information Element."; + } + } + leaf ieEnterpriseNumber { + type uint32; + default 0; + description "If this parameter is zero, the Information + Element is registered in the IANA registry of IPFIX + Information Elements. + If this parameter is configured with a non-zero private + enterprise number, the Information Element is + enterprise-specific."; + reference "IANA registry for Private Enterprise Numbers, + http://www.iana.org/assignments/enterprise-numbers; + IANA registry for IPFIX Entities, + http://www.iana.org/assignments/ipfix."; + } + leaf value { + type string; + mandatory true; + description "Matching value of the Information Element."; + } + } + + grouping filterHashParameters { + description "Configuration parameters of a Selector applying + hash-based Filtering to the packet stream."; + reference "RFC 5475, Section 6.2; RFC 5476, Section 6.5.2.6."; + leaf hashFunction { + type identityref { + base "hashFunction"; + } + default BOB; + description "Hash function to be applied. According to + RFC 5475, Section 6.2.4.1, 'BOB' must be used in order to + be compliant with PSAMP. + This parameter functionally corresponds to + psampFiltHashFunction in the PSAMP MIB module."; + reference "RFC 6727, Section 6 (psampFiltHashFunction)"; + } + leaf initializerValue { + type uint64; + description "Initializer value to the hash function. + If not configured by the user, the Monitoring Device + arbitrarily chooses an initializer value. + This parameter corresponds to the Information Element + hashInitialiserValue and to psampFiltHashInitializerValue + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.9; RFC 6727, Section 6 + (psampFiltHashInitializerValue)."; + } + leaf ipPayloadOffset { + type uint64; + units octets; + default 0; + description "IP payload offset indicating the position of + the first payload byte considered as input to the hash + function. + Default value 0 corresponds to the minimum offset that + must be configurable according to RFC 5476, Section + 6.5.2.6. + This parameter corresponds to the Information Element + hashIPPayloadOffset and to psampFiltHashIpPayloadOffset + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.2; RFC 6727, Section 6 + (psampFiltHashIpPayloadOffset)."; + } + leaf ipPayloadSize { + type uint64; + units octets; + default 8; + description "Number of IP payload bytes used as input to + the hash function, counted from the payload offset. + If the IP payload is shorter than the payload range, + all available payload octets are used as input. + Default value 8 corresponds to the minimum IP payload + size that must be configurable according to RFC 5476, + Section 6.5.2.6. + This parameter corresponds to the Information Element + hashIPPayloadSize and to psampFiltHashIpPayloadSize + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.3; RFC 6727, Section 6 + (psampFiltHashIpPayloadSize)."; + } + leaf digestOutput { + type boolean; + default false; + description "If true, the output from this Selector is + included in the Packet Report as a packet digest. + Therefore, the configured Cache Layout needs to contain + a digestHashValue field. + This parameter corresponds to the Information Element + hashDigestOutput."; + reference "RFC 5477, Section 8.3.8."; + } + leaf outputRangeMin { + type uint64; + config false; + description "Beginning of the hash function's potential + range. + This parameter corresponds to the Information Element + hashOutputRangeMin and to psampFiltHashOutputRangeMin + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.4; RFC 6727, Section 6 + (psampFiltHashOutputRangeMin)."; + } + leaf outputRangeMax { + type uint64; + config false; + description "End of the hash function's potential range. + This parameter corresponds to the Information Element + hashOutputRangeMax and to psampFiltHashOutputRangeMax + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.5; RFC 6727, Section 6 + (psampFiltHashOutputRangeMax)."; + } + list selectedRange { + key name; + min-elements 1; + description "List of hash function return ranges for + which packets are selected."; + leaf name { + type nameType; + description "Key of this list."; + } + leaf min { + type uint64; + description "Beginning of the hash function's selected + range. + This parameter corresponds to the Information Element + hashSelectedRangeMin and to psampFiltHashSelectedRangeMin + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.6; RFC 6727, Section 6 + (psampFiltHashSelectedRangeMin)."; + } + leaf max { + type uint64; + description "End of the hash function's selected range. + This parameter corresponds to the Information Element + hashSelectedRangeMax and to psampFiltHashSelectedRangeMax + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.7; RFC 6727, Section 6 + (psampFiltHashSelectedRangeMax)."; + } + } + } + + grouping selectorParameters { + description "Configuration and state parameters of a Selector."; + choice Method { + mandatory true; + description "Packet selection method applied by the Selector."; + leaf selectAll { + type empty; + description "Method that selects all packets."; + } + container sampCountBased { + if-feature psampSampCountBased; + description "Systematic count-based packet Sampling."; + uses sampCountBasedParameters; + } + container sampTimeBased { + if-feature psampSampTimeBased; + description "Systematic time-based packet Sampling."; + uses sampTimeBasedParameters; + } + container sampRandOutOfN { + if-feature psampSampRandOutOfN; + description "n-out-of-N packet Sampling."; + uses sampRandOutOfNParameters; + } + container sampUniProb { + if-feature psampSampUniProb; + description "Uniform probabilistic packet Sampling."; + uses sampUniProbParameters; + } + container filterMatch { + if-feature psampFilterMatch; + description "Property match Filtering."; + uses filterMatchParameters; + } + container filterHash { + if-feature psampFilterHash; + description "Hash-based Filtering."; + uses filterHashParameters; + } + } + leaf packetsObserved { + type yang:counter64; + config false; + description "The number of packets observed at the input of + the Selector. + If this is the first Selector in the Selection Process, + this counter corresponds to the total number of packets in + all Observed Packet Streams at the input of the Selection + Process. Otherwise, the counter corresponds to the total + number of packets at the output of the preceding Selector. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + selectorDiscontinuityTime. + Note that this parameter corresponds to + ipfixSelectorStatsPacketsObserved in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixSelectorStatsPacketsObserved)."; + } + leaf packetsDropped { + type yang:counter64; + config false; + description "The total number of packets discarded by the + Selector. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + selectorDiscontinuityTime. + Note that this parameter corresponds to + ipfixSelectorStatsPacketsDropped in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixSelectorStatsPacketsDropped)."; + } + leaf selectorDiscontinuityTime { + type yang:date-and-time; + config false; + description "Timestamp of the most recent occasion at which + one or more of the Selector counters suffered a + discontinuity. + Note that this parameter functionally corresponds to + ipfixSelectionProcessStatsDiscontinuityTime in the IPFIX + MIB module. In contrast to + ipfixSelectionProcessStatsDiscontinuityTime, the time is + absolute and not relative to sysUpTime."; + reference "RFC 6615, Section 8 + (ipfixSelectionProcessStatsDiscontinuityTime)."; + } + } + grouping cacheLayoutParameters { + description "Cache Layout parameters used by immediateCache, + timeoutCache, naturalCache, and permanentCache."; + container cacheLayout { + description "Cache Layout parameters."; + list cacheField { + key name; + min-elements 1; + description "Superset of fields that are included in the + Packet Reports or Flow Records generated by the Cache."; + leaf name { + type nameType; + description "Key of this list."; + } + choice nameOrId { + mandatory true; + description "Name or identifier of the Information + Element."; + reference "RFC 5102, Section 2; IANA registry for IPFIX + Entities, http://www.iana.org/assignments/ipfix."; + leaf ieName { + type ieNameType; + description "Name of the Information Element."; + } + leaf ieId { + type ieIdType; + description "Identifier of the Information Element."; + } + } + leaf ieLength { + type uint16; + units octets; + description "Length of the field in which the Information + Element is encoded. A value of 65535 specifies a + variable-length Information Element. For Information + Elements of integer and float type, the field length MAY + be set to a smaller value than the standard length of + the abstract data type if the rules of reduced size + encoding are fulfilled. + If not configured by the user, this parameter is set by + the Monitoring Device."; + reference "RFC 5101, Section 6.2."; + } + leaf ieEnterpriseNumber { + type uint32; + default 0; + description "If this parameter is zero, the Information + Element is registered in the IANA registry of IPFIX + Information Elements. + If this parameter is configured with a non-zero private + enterprise number, the Information Element is + enterprise-specific. + If the enterprise number is set to 29305, this field + contains a Reverse Information Element. In this case, + the Cache MUST generate Data Records in accordance to + RFC 5103."; + reference "RFC 5101; RFC 5103; + IANA registry for Private Enterprise Numbers, + http://www.iana.org/assignments/enterprise-numbers; + IANA registry for IPFIX Entities, + http://www.iana.org/assignments/ipfix."; + } + leaf isFlowKey { + when "(name(../../..) != 'immediateCache') + and + ((count(../ieEnterpriseNumber) = 0) + or + (../ieEnterpriseNumber != 29305))" { + description "This parameter is not available for + Reverse Information Elements (which have enterprise + number 29305). It is also not available for + immediateCache."; + } + type empty; + description "If present, this is a flow key."; + } + } + } + } + + grouping flowCacheParameters { + description "Configuration and state parameters of a Cache + generating Flow Records."; + leaf maxFlows { + type uint32; + units flows; + description "This parameter configures the maximum number of + Flows in the Cache, which is the maximum number of Flows + that can be measured simultaneously. + The Monitoring Device MUST ensure that sufficient resources + are available to store the configured maximum number of + Flows. + If the maximum number of Flows is measured, an additional + Flow can be measured only if an existing entry is removed. + However, traffic that pertains to existing Flows can + continue to be measured."; + } + leaf activeTimeout { + when "(name(..) = 'timeoutCache') or + (name(..) = 'naturalCache')" { + description "This parameter is only available for + timeoutCache and naturalCache."; + } + type uint32; + units seconds; + description "This parameter configures the time in + seconds after which a Flow is expired even though packets + matching this Flow are still received by the Cache. + The parameter value zero indicates infinity, meaning that + there is no active timeout. + If not configured by the user, the Monitoring Device sets + this parameter. + Note that this parameter corresponds to + ipfixMeteringProcessCacheActiveTimeout in the IPFIX + MIB module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessCacheActiveTimeout)."; + } + leaf idleTimeout { + when "(name(..) = 'timeoutCache') or + (name(..) = 'naturalCache')" { + description "This parameter is only available for + timeoutCache and naturalCache."; + } + type uint32; + units seconds; + description "This parameter configures the time in + seconds after which a Flow is expired if no more packets + matching this Flow are received by the Cache. + The parameter value zero indicates infinity, meaning that + there is no idle timeout. + If not configured by the user, the Monitoring Device sets + this parameter. + Note that this parameter corresponds to + ipfixMeteringProcessCacheIdleTimeout in the IPFIX + MIB module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessCacheIdleTimeout)."; + } + leaf exportInterval { + when "name(..) = 'permanentCache'" { + description "This parameter is only available for + permanentCache."; + } + type uint32; + units seconds; + description "This parameter configures the interval (in + seconds) for periodical export of Flow Records. + If not configured by the user, the Monitoring Device sets + this parameter."; + } + leaf activeFlows { + type yang:gauge32; + units flows; + config false; + description "The number of Flows currently active in this + Cache. + Note that this parameter corresponds to + ipfixMeteringProcessCacheActiveFlows in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessCacheActiveFlows)."; + } + leaf unusedCacheEntries { + type yang:gauge32; + units flows; + config false; + description "The number of unused Cache entries in this + Cache. + Note that this parameter corresponds to + ipfixMeteringProcessCacheUnusedCacheEntries in the IPFIX + MIB module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessCacheUnusedCacheEntries)."; + } + } + + grouping exportingProcessParameters { + description "Parameters of an Exporting Process."; + leaf exportingProcessId { + type uint32; + config false; + description "The identifier of the Exporting Process. + This parameter corresponds to the Information Element + exportingProcessId. Its occurrence helps to associate + Exporting Process parameters with Exporing Process + statistics exported by the Monitoring Device using the + Exporting Process Reliability Statistics Template as + defined by the IPFIX protocol specification."; + reference "RFC 5101, Section 4.3; IANA registry for IPFIX + Entities, http://www.iana.org/assignments/ipfix."; + } + leaf exportMode { + type identityref { + base "exportMode"; + } + default parallel; + description "This parameter determines to which configured + destination(s) the incoming Data Records are exported."; + } + list destination { + key name; + min-elements 1; + description "List of export destinations."; + leaf name { + type nameType; + description "Key of this list."; + } + choice DestinationParameters { + mandatory true; + description "Configuration parameters depend on whether + SCTP, UDP, or TCP is used as transport protocol, and + whether the destination is a file."; + container sctpExporter { + description "SCTP parameters."; + uses sctpExporterParameters; + } + container udpExporter { + if-feature udpTransport; + description "UDP parameters."; + uses udpExporterParameters; + } + container tcpExporter { + if-feature tcpTransport; + description "TCP parameters."; + uses tcpExporterParameters; + } + container fileWriter { + if-feature fileWriter; + description "File Writer parameters."; + uses fileWriterParameters; + } + } + } + list options { + key name; + description "List of options reported by the Exporting + Process."; + leaf name { + type nameType; + description "Key of this list."; + } + uses optionsParameters; + } + } + + grouping commonExporterParameters { + description "Parameters of en export destination that are + common to all transport protocols."; + leaf ipfixVersion { + type uint16; + default 10; + description "IPFIX version number."; + reference "RFC 5101."; + } + leaf destinationPort { + type inet:port-number; + description "If not configured by the user, the Monitoring + Device uses the default port number for IPFIX, which is + 4739 without TLS or DTLS and 4740 if TLS or DTLS is + activated."; + } + choice indexOrName { + description "Index or name of the interface as stored in the + ifTable of IF-MIB. + If configured, the Exporting Process MUST use the given + interface to export IPFIX Messages to the export + destination. + If omitted, the Exporting Process selects the outgoing + interface based on local routing decision and accepts + return traffic, such as transport-layer acknowledgments, + on all available interfaces."; + reference "RFC 2863."; + leaf ifIndex { + type uint32; + description "Index of an interface as stored in the ifTable + of IF-MIB."; + reference "RFC 2863."; + } + leaf ifName { + type string; + description "Name of an interface as stored in the ifTable + of IF-MIB."; + reference "RFC 2863."; + } + } + leaf sendBufferSize { + type uint32; + units bytes; + description "Size of the socket send buffer. + If not configured by the user, this parameter is set by + the Monitoring Device."; + } + leaf rateLimit { + type uint32; + units "bytes per second"; + description "Maximum number of bytes per second the Exporting + Process may export to the given destination. The number of + bytes is calculated from the lengths of the IPFIX Messages + exported. If not configured, no rate limiting is performed."; + reference "RFC 5476, Section 6.3."; + } + container transportLayerSecurity { + presence "If transportLayerSecurity is present, DTLS is + enabled if the transport protocol is SCTP or UDP, and TLS + is enabled if the transport protocol is TCP."; + description "TLS or DTLS configuration."; + uses transportLayerSecurityParameters; + } + container transportSession { + config false; + description "State parameters of the Transport Session + directed to the given destination."; + uses transportSessionParameters; + } + } + + grouping sctpExporterParameters { + description "SCTP-specific export destination parameters."; + uses commonExporterParameters; + leaf-list sourceIPAddress { + type inet:ip-address; + description "List of source IP addresses used by the + Exporting Process. + If configured, the specified addresses are eligible local + IP addresses of the multihomed SCTP endpoint. + If not configured, all locally assigned IP addresses are + eligible local IP addresses."; + reference "RFC 4960, Section 6.4."; + } + leaf-list destinationIPAddress { + type inet:ip-address; + min-elements 1; + description "One or more IP addresses of the Collecting + Process to which IPFIX Messages are sent. + The user MUST ensure that all configured IP addresses + belong to the same Collecting Process. + The Exporting Process tries to establish an SCTP + association to any of the configured destination IP + addresses."; + reference "RFC 4960, Section 6.4."; + } + leaf timedReliability { + type uint32; + units milliseconds; + default 0; + description "Lifetime in milliseconds until an IPFIX + Message containing Data Sets only is 'abandoned' due to + the timed reliability mechanism of PR-SCTP. + If this parameter is set to zero, reliable SCTP + transport is used for all Data Records. + Regardless of the value of this parameter, the Exporting + Process MAY use reliable SCTP transport for Data Sets + associated with Options Templates."; + reference "RFC 3758; RFC 4960."; + } + } + + grouping udpExporterParameters { + description "Parameters of a UDP export destination."; + uses commonExporterParameters; + leaf sourceIPAddress { + type inet:ip-address; + description "Source IP address used by the Exporting Process. + If not configured, the IP address assigned to the outgoing + interface is used as source IP address."; + } + leaf destinationIPAddress { + type inet:ip-address; + mandatory true; + description "IP address of the Collection Process to which + IPFIX Messages are sent."; + } + leaf maxPacketSize { + type uint16; + units octets; + description "This parameter specifies the maximum size of + IP packets sent to the Collector. If set to zero, the + Exporting Device MUST derive the maximum packet size + from path MTU discovery mechanisms. + If not configured by the user, this parameter is set by + the Monitoring Device."; + } + leaf templateRefreshTimeout { + type uint32; + units seconds; + default 600; + description "Sets time after which Templates are resent in the + UDP Transport Session. + Note that the configured lifetime MUST be adapted to the + templateLifeTime parameter value at the receiving Collecting + Process. + Note that this parameter corresponds to + ipfixTransportSessionTemplateRefreshTimeout in the IPFIX + MIB module."; + reference "RFC 5101, Section 10.3.6; RFC 6615, Section 8 + (ipfixTransportSessionTemplateRefreshTimeout)."; + } + leaf optionsTemplateRefreshTimeout { + type uint32; + units seconds; + default 600; + description "Sets time after which Options Templates are + resent in the UDP Transport Session. + Note that the configured lifetime MUST be adapted to the + optionsTemplateLifeTime parameter value at the receiving + Collecting Process. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplateRefreshTimeout in the + IPFIX MIB module."; + reference "RFC 5101, Section 10.3.6; RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplateRefreshTimeout)."; + } + leaf templateRefreshPacket { + type uint32; + units "IPFIX Messages"; + description "Sets number of IPFIX Messages after which + Templates are resent in the UDP Transport Session. + Note that this parameter corresponds to + ipfixTransportSessionTemplateRefreshPacket in the IPFIX + MIB module. + If omitted, Templates are only resent after timeout."; + reference "RFC 5101, Section 10.3.6; RFC 6615, Section 8 + (ipfixTransportSessionTemplateRefreshPacket)."; + } + leaf optionsTemplateRefreshPacket { + type uint32; + units "IPFIX Messages"; + description "Sets number of IPFIX Messages after which + Options Templates are resent in the UDP Transport Session + protocol. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplateRefreshPacket in the + IPFIX MIB module. + If omitted, Templates are only resent after timeout."; + reference "RFC 5101, Section 10.3.6; RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplateRefreshPacket)."; + } + } + + grouping tcpExporterParameters { + description "Parameters of a TCP export destination."; + uses commonExporterParameters; + leaf sourceIPAddress { + type inet:ip-address; + description "Source IP address used by the Exporting Process. + If not configured by the user, this parameter is set by + the Monitoring Device to an IP address assigned to the + outgoing interface."; + } + leaf destinationIPAddress { + type inet:ip-address; + mandatory true; + description "IP address of the Collection Process to which + IPFIX Messages are sent."; + } + } + + grouping fileWriterParameters { + description "File Writer parameters."; + leaf ipfixVersion { + type uint16; + default 10; + description "IPFIX version number."; + reference "RFC 5101."; + } + leaf file { + type inet:uri; + mandatory true; + description "URI specifying the location of the file."; + } + leaf bytes { + type yang:counter64; + units octets; + config false; + description "The number of bytes written by the File Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf messages { + type yang:counter64; + units "IPFIX Messages"; + config false; + description "The number of IPFIX Messages written by the File + Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf discardedMessages { + type yang:counter64; + units "IPFIX Messages"; + config false; + description "The number of IPFIX Messages that could not be + written by the File Writer due to internal buffer + overflows, limited storage capacity, etc. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf records { + type yang:counter64; + units "Data Records"; + config false; + description "The number of Data Records written by the File + Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf templates { + type yang:counter32; + units "Templates"; + config false; + description "The number of Template Records (excluding + Options Template Records) written by the File Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf optionsTemplates { + type yang:counter32; + units "Options Templates"; + config false; + description "The number of Options Template Records written + by the File Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf fileWriterDiscontinuityTime { + type yang:date-and-time; + config false; + description "Timestamp of the most recent occasion at which + one or more File Writer counters suffered a discontinuity. + In contrast to discontinuity times in the IPFIX MIB module, + the time is absolute and not relative to sysUpTime."; + } + list template { + config false; + description "This list contains the Templates and Options + Templates that have been written by the File Reader. + Withdrawn or invalidated (Options) Templates MUST be removed + from this list."; + uses templateParameters; + } + } + + grouping optionsParameters { + description "Parameters specifying the data export using an + Options Template."; + leaf optionsType { + type identityref { + base "optionsType"; + } + mandatory true; + description "Type of the exported options data."; + } + leaf optionsTimeout { + type uint32; + units milliseconds; + description "Time interval for periodic export of the options + data. If set to zero, the export is triggered when the + options data has changed. + If not configured by the user, this parameter is set by the + Monitoring Device."; + } + } + + grouping collectingProcessParameters { + description "Parameters of a Collecting Process."; + list sctpCollector { + key name; + description "List of SCTP receivers (sockets) on which the + Collecting Process receives IPFIX Messages."; + leaf name { + type nameType; + description "Key of this list."; + } + uses sctpCollectorParameters; + } + list udpCollector { + if-feature udpTransport; + key name; + description "List of UDP receivers (sockets) on which the + Collecting Process receives IPFIX Messages."; + leaf name { + type nameType; + description "Key of this list."; + } + uses udpCollectorParameters; + } + list tcpCollector { + if-feature tcpTransport; + key name; + description "List of TCP receivers (sockets) on which the + Collecting Process receives IPFIX Messages."; + leaf name { + type nameType; + description "Key of this list."; + } + uses tcpCollectorParameters; + } + list fileReader { + if-feature fileReader; + key name; + description "List of File Readers from which the Collecting + Process reads IPFIX Messages."; + leaf name { + type nameType; + description "Key of this list."; + } + uses fileReaderParameters; + } + } + + grouping commonCollectorParameters { + description "Parameters of a Collecting Process that are + common to all transport protocols."; + leaf localPort { + type inet:port-number; + description "If not configured, the Monitoring Device uses the + default port number for IPFIX, which is 4739 without + TLS or DTLS and 4740 if TLS or DTLS is activated."; + } + container transportLayerSecurity { + presence "If transportLayerSecurity is present, DTLS is enabled + if the transport protocol is SCTP or UDP, and TLS is enabled + if the transport protocol is TCP."; + description "TLS or DTLS configuration."; + uses transportLayerSecurityParameters; + } + list transportSession { + config false; + description "This list contains the currently established + Transport Sessions terminating at the given socket."; + uses transportSessionParameters; + } + } + + grouping sctpCollectorParameters { + description "Parameters of a listening SCTP socket at a + Collecting Process."; + uses commonCollectorParameters; + leaf-list localIPAddress { + type inet:ip-address; + description "List of local IP addresses on which the + Collecting Process listens for IPFIX Messages. The IP + addresses are used as eligible local IP addresses of the + multihomed SCTP endpoint."; + reference "RFC 4960, Section 6.4."; + } + } + + grouping udpCollectorParameters { + description "Parameters of a listening UDP socket at a + Collecting Process."; + uses commonCollectorParameters; + leaf-list localIPAddress { + type inet:ip-address; + description "List of local IP addresses on which the Collecting + Process listens for IPFIX Messages."; + } + leaf templateLifeTime { + type uint32; + units seconds; + default 1800; + description "Sets the lifetime of Templates for all UDP + Transport Sessions terminating at this UDP socket. + Templates that are not received again within the configured + lifetime become invalid at the Collecting Process. + As specified in RFC 5101, the Template lifetime MUST be at + least three times higher than the templateRefreshTimeout + parameter value configured on the corresponding Exporting + Processes. + Note that this parameter corresponds to + ipfixTransportSessionTemplateRefreshTimeout in the IPFIX + MIB module."; + reference "RFC 5101, Section 10.3.7; RFC 6615, Section 8 + (ipfixTransportSessionTemplateRefreshTimeout)."; + } + leaf optionsTemplateLifeTime { + type uint32; + units seconds; + default 1800; + description "Sets the lifetime of Options Templates for all + UDP Transport Sessions terminating at this UDP socket. + Options Templates that are not received again within the + configured lifetime become invalid at the Collecting + Process. + As specified in RFC 5101, the Options Template lifetime MUST + be at least three times higher than the + optionsTemplateRefreshTimeout parameter value configured on + the corresponding Exporting Processes. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplateRefreshTimeout in the + IPFIX MIB module."; + reference "RFC 5101, Section 10.3.7; RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplateRefreshTimeout)."; + } + leaf templateLifePacket { + type uint32; + units "IPFIX Messages"; + description "If this parameter is configured, Templates + defined in a UDP Transport Session become invalid if they + are neither included in a sequence of more than this number + of IPFIX Messages nor received again within the period of + time specified by templateLifeTime. + Note that this parameter corresponds to + ipfixTransportSessionTemplateRefreshPacket in the IPFIX + MIB module."; + reference "RFC 5101, Section 10.3.7; RFC 6615, Section 8 + (ipfixTransportSessionTemplateRefreshPacket)."; + } + leaf optionsTemplateLifePacket { + type uint32; + units "IPFIX Messages"; + description "If this parameter is configured, Options + Templates defined in a UDP Transport Session become + invalid if they are neither included in a sequence of more + than this number of IPFIX Messages nor received again + within the period of time specified by + optionsTemplateLifeTime. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplateRefreshPacket in the + IPFIX MIB module."; + reference "RFC 5101, Section 10.3.7; RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplateRefreshPacket)."; + } + } + + grouping tcpCollectorParameters { + description "Parameters of a listening TCP socket at a + Collecting Process."; + uses commonCollectorParameters; + leaf-list localIPAddress { + type inet:ip-address; + description "List of local IP addresses on which the Collecting + Process listens for IPFIX Messages."; + } + } + + grouping fileReaderParameters { + description "File Reader parameters."; + leaf file { + type inet:uri; + mandatory true; + description "URI specifying the location of the file."; + } + leaf bytes { + type yang:counter64; + units octets; + config false; + description "The number of bytes read by the File Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf messages { + type yang:counter64; + units "IPFIX Messages"; + config false; + description "The number of IPFIX Messages read by the File + Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf records { + type yang:counter64; + units "Data Records"; + config false; + description "The number of Data Records read by the File + Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf templates { + type yang:counter32; + units "Templates"; + config false; + description "The number of Template Records (excluding + Options Template Records) read by the File Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf optionsTemplates { + type yang:counter32; + units "Options Templates"; + config false; + description "The number of Options Template Records read by + the File Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf fileReaderDiscontinuityTime { + type yang:date-and-time; + config false; + description "Timestamp of the most recent occasion at which + one or more File Reader counters suffered a discontinuity. + In contrast to discontinuity times in the IPFIX MIB module, + the time is absolute and not relative to sysUpTime."; + } + list template { + config false; + description "This list contains the Templates and Options + Templates that have been read by the File Reader. + Withdrawn or invalidated (Options) Template MUST be removed + from this list."; + uses templateParameters; + } + } + + grouping transportLayerSecurityParameters { + description "TLS or DTLS parameters."; + leaf-list localCertificationAuthorityDN { + type string; + description "Distinguished names of certification authorities + whose certificates may be used to identify the local + endpoint."; + reference "RFC 5280."; + } + leaf-list localSubjectDN { + type string; + description "Distinguished names that may be used in the + certificates to identify the local endpoint."; + reference "RFC 5280."; + } + leaf-list localSubjectFQDN { + type inet:domain-name; + description "Fully qualified domain names that may be used to + in the certificates to identify the local endpoint."; + reference "RFC 5280."; + } + leaf-list remoteCertificationAuthorityDN { + type string; + description "Distinguished names of certification authorities + whose certificates are accepted to authorize remote + endpoints."; + reference "RFC 5280."; + } + leaf-list remoteSubjectDN { + type string; + description "Distinguished names which are accepted in + certificates to authorize remote endpoints."; + reference "RFC 5280."; + } + leaf-list remoteSubjectFQDN { + type inet:domain-name; + description "Fully qualified domain names that are accepted in + certificates to authorize remote endpoints."; + reference "RFC 5280."; + } + } + + grouping templateParameters { + description "State parameters of a Template used by an Exporting + Process or received by a Collecting Process in a specific + Transport Session. Parameter names and semantics correspond to + the managed objects in IPFIX-MIB"; + reference "RFC 5101; RFC 6615, Section 8 (ipfixTemplateEntry, + ipfixTemplateDefinitionEntry, ipfixTemplateStatsEntry)"; + leaf observationDomainId { + type uint32; + description "The ID of the Observation Domain for which this + Template is defined. + Note that this parameter corresponds to + ipfixTemplateObservationDomainId in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTemplateObservationDomainId)."; + } + leaf templateId { + type uint16 { + range "256..65535" { + description "Valid range of Template IDs."; + reference "RFC 5101"; + } + } + description "This number indicates the Template ID in the IPFIX + message. + Note that this parameter corresponds to ipfixTemplateId in + the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTemplateId)."; + } + leaf setId { + type uint16; + description "This number indicates the Set ID of the Template. + Currently, there are two values defined. The value 2 is used + for Sets containing Template definitions. The value 3 is + used for Sets containing Options Template definitions. + Note that this parameter corresponds to ipfixTemplateSetId + in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTemplateSetId)."; + } + leaf accessTime { + type yang:date-and-time; + description "Used for Exporting Processes, this parameter + contains the time when this (Options) Template was last + sent to the Collector(s) or written to the file. + Used for Collecting Processes, this parameter contains the + time when this (Options) Template was last received from the + Exporter or read from the file. + Note that this parameter corresponds to + ipfixTemplateAccessTime in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTemplateAccessTime)."; + } + leaf templateDataRecords { + type yang:counter64; + description "The number of transmitted or received Data + Records defined by this (Options) Template. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + templateDiscontinuityTime. + Note that this parameter corresponds to + ipfixTemplateDataRecords in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTemplateDataRecords)."; + } + leaf templateDiscontinuityTime { + type yang:date-and-time; + description "Timestamp of the most recent occasion at which + the counter templateDataRecords suffered a discontinuity. + Note that this parameter functionally corresponds to + ipfixTemplateDiscontinuityTime in the IPFIX MIB module. + In contrast to ipfixTemplateDiscontinuityTime, the time + is absolute and not relative to sysUpTime."; + reference "RFC 6615, Section 8 + (ipfixTemplateDiscontinuityTime)."; + } + list field { + description "This list contains the (Options) Template + fields of which the (Options) Template is defined. + The order of the list corresponds to the order of the fields + in the (Option) Template Record."; + leaf ieId { + type ieIdType; + description "This parameter indicates the Information + Element identifier of the field. + Note that this parameter corresponds to + ipfixTemplateDefinitionIeId in the IPFIX MIB module."; + reference "RFC 5101; RFC 6615, Section 8 + (ipfixTemplateDefinitionIeId)."; + } + leaf ieLength { + type uint16; + units octets; + description "This parameter indicates the length of the + Information Element of the field. + Note that this parameter corresponds to + ipfixTemplateDefinitionIeLength in the IPFIX MIB + module."; + reference "RFC 5101; RFC 6615, Section 8 + (ipfixTemplateDefinitionIeLength)."; + } + leaf ieEnterpriseNumber { + type uint32; + description "This parameter indicates the IANA enterprise + number of the authority defining the Information Element + identifier. + If the Information Element is not enterprise-specific, + this state parameter is zero. + Note that this parameter corresponds to + ipfixTemplateDefinitionIeEnterpriseNumber in the IPFIX + MIB module."; + reference "RFC 6615, Section 8 + (ipfixTemplateDefinitionIeEnterpriseNumber); + IANA registry for Private Enterprise Numbers, + http://www.iana.org/assignments/enterprise-numbers."; + } + leaf isFlowKey { + when "../../setId = 2" { + description "This parameter is available for non-Options + Templates (Set ID is 2)."; + } + type empty; + description "If present, this is a Flow Key field. + Note that this corresponds to flowKey(1) being set in + ipfixTemplateDefinitionFlags."; + reference "RFC 6615, Section 8 + (ipfixTemplateDefinitionFlags)."; + } + leaf isScope { + when "../../setId = 3" { + description "This parameter is available for Options + Templates (Set ID is 3)."; + } + type empty; + description "If present, this is a scope field. + Note that this corresponds to scope(0) being set in + ipfixTemplateDefinitionFlags."; + reference "RFC 6615, Section 8 + (ipfixTemplateDefinitionFlags)."; + } + } + } + + grouping transportSessionParameters { + description "State parameters of a Transport Session originating + from an Exporting Process or terminating at a Collecting + Process. Parameter names and semantics correspond to the + managed objects in IPFIX-MIB."; + reference "RFC 5101; RFC 6615, Section 8 + (ipfixTransportSessionEntry, + ipfixTransportSessionStatsEntry)."; + leaf ipfixVersion { + type uint16; + description "Used for Exporting Processes, this parameter + contains the version number of the IPFIX protocol that the + Exporter uses to export its data in this Transport Session. + Hence, it is identical to the value of the configuration + parameter ipfixVersion of the outer SctpExporter, + UdpExporter, or TcpExporter node. + Used for Collecting Processes, this parameter contains the + version number of the IPFIX protocol it receives for + this Transport Session. If IPFIX Messages of different + IPFIX protocol versions are received, this parameter + contains the maximum version number. + Note that this parameter corresponds to + ipfixTransportSessionIpfixVersion in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionIpfixVersion)."; + } + leaf sourceAddress { + type inet:ip-address; + description "The source address of the Exporter of the + IPFIX Transport Session. + If the transport protocol is SCTP, this is one of the + potentially many IP addresses of the Exporter. + Preferably, the source IP address of the path that is + usually selected by the Exporter to send IPFIX Messages to + the Collector SHOULD be used. + Note that this parameter functionally corresponds to + ipfixTransportSessionSourceAddressType and + ipfixTransportSessionSourceAddress in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionSourceAddressType, + ipfixTransportSessionSourceAddress); + RFC 4960, Section 6.4."; + } + leaf destinationAddress { + type inet:ip-address; + description "The destination address of the Collector of + the IPFIX Transport Session. + If the transport protocol is SCTP, this is one of the + potentially many IP addresses of the Collector. + Preferably, the destination IP address of the path that is + usually selected by the Exporter to send IPFIX Messages to + the Collector SHOULD be used. + Note that this parameter functionally corresponds to + ipfixTransportSessionDestinationAddressType and + ipfixTransportSessionDestinationAddress in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionDestinationAddressType, + ipfixTransportSessionDestinationAddress); + RFC 4960, Section 6.4."; + } + leaf sourcePort { + type inet:port-number; + description "The transport-protocol port number of the + Exporter of the IPFIX Transport Session. + Note that this parameter corresponds to + ipfixTransportSessionSourcePort in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionSourcePort)."; + } + leaf destinationPort { + type inet:port-number; + description "The transport-protocol port number of the + Collector of the IPFIX Transport Session. + Note that this parameter corresponds to + ipfixTransportSessionDestinationPort in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionDestinationPort)."; + } + leaf sctpAssocId { + type uint32; + description "The association ID used for the SCTP session + between the Exporter and the Collector of the IPFIX + Transport Session. It is equal to the sctpAssocId entry + in the sctpAssocTable defined in the SCTP-MIB. + This parameter is only available if the transport protocol + is SCTP and if an SNMP agent on the same Monitoring Device + enables access to the corresponding MIB objects in the + sctpAssocTable. + Note that this parameter corresponds to + ipfixTransportSessionSctpAssocId in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionSctpAssocId); + RFC 3871"; + } + leaf status { + type transportSessionStatus; + description "Status of the Transport Session. + Note that this parameter corresponds to + ipfixTransportSessionStatus in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTransportSessionStatus)."; + } + leaf rate { + type yang:gauge32; + units "bytes per second"; + description "The number of bytes per second transmitted by the + Exporting Process or received by the Collecting Process. + This parameter is updated every second. + Note that this parameter corresponds to + ipfixTransportSessionRate in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTransportSessionRate)."; + } + leaf bytes { + type yang:counter64; + units bytes; + description "The number of bytes transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionBytes in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTransportSessionBytes)."; + } + leaf messages { + type yang:counter64; + units "IPFIX Messages"; + description "The number of messages transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionMessages in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionMessages)."; + } + leaf discardedMessages { + type yang:counter64; + units "IPFIX Messages"; + description "Used for Exporting Processes, this parameter + indicates the number of messages that could not be sent due + to internal buffer overflows, network congestion, routing + issues, etc. Used for Collecting Process, this parameter + indicates the number of received IPFIX Message that are + malformed, cannot be decoded, are received in the wrong + order or are missing according to the sequence number. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionDiscardedMessages in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionDiscardedMessages)."; + } + leaf records { + type yang:counter64; + units "Data Records"; + description "The number of Data Records transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionRecords in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionRecords)."; + } + leaf templates { + type yang:counter32; + units "Templates"; + description "The number of Templates transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionTemplates in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionTemplates)."; + } + leaf optionsTemplates { + type yang:counter32; + units "Options Templates"; + description "The number of Option Templates transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplates in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplates)."; + } + leaf transportSessionStartTime { + type yang:date-and-time; + description "Timestamp of the start of the given Transport + Session. + This state parameter does not correspond to any object in + the IPFIX MIB module."; + } + leaf transportSessionDiscontinuityTime { + type yang:date-and-time; + description "Timestamp of the most recent occasion at which + one or more of the Transport Session counters suffered a + discontinuity. + Note that this parameter functionally corresponds to + ipfixTransportSessionDiscontinuityTime in the IPFIX MIB + module. In contrast to + ipfixTransportSessionDiscontinuityTime, the time is + absolute and not relative to sysUpTime."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionDiscontinuityTime)."; + } + list template { + description "This list contains the Templates and Options + Templates that are transmitted by the Exporting Process + or received by the Collecting Process. + Withdrawn or invalidated (Options) Templates MUST be removed + from this list."; + uses templateParameters; + } + } + + /***************************************************************** + * Main container + *****************************************************************/ + + container ipfix { + description "Top-level node of the IPFIX/PSAMP configuration + data model."; + list collectingProcess { + if-feature collector; + key name; + description "Collecting Process of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + uses collectingProcessParameters; + leaf-list exportingProcess { + if-feature exporter; + type leafref { path "/ipfix/exportingProcess/name"; } + description "Export of received records without any + modifications. Records are processed by all Exporting + Processes in the list."; + } + } + + list observationPoint { + if-feature meter; + key name; + description "Observation Point of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + uses observationPointParameters; + leaf-list selectionProcess { + type leafref { path "/ipfix/selectionProcess/name"; } + description "Selection Processes in this list process + packets in parallel."; + } + } + + list selectionProcess { + if-feature meter; + key name; + description "Selection Process of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + list selector { + key name; + min-elements 1; + ordered-by user; + description "List of Selectors that define the action of the + Selection Process on a single packet. The Selectors are + serially invoked in the same order as they appear in this + list."; + leaf name { + type nameType; + description "Key of this list."; + } + uses selectorParameters; + } + list selectionSequence { + config false; + description "This list contains the Selection Sequence IDs + that are assigned by the Monitoring Device to distinguish + different Selection Sequences passing through the + Selection Process. + As Selection Sequence IDs are unique per Observation + Domain, the corresponding Observation Domain IDs are + included as well. + With this information, it is possible to associate + Selection Sequence (Statistics) Report Interpretations + exported according to the PSAMP protocol with a Selection + Process in the configuration data."; + reference "RFC 5476."; + leaf observationDomainId { + type uint32; + description "Observation Domain ID for which the + Selection Sequence ID is assigned."; + } + leaf selectionSequenceId { + type uint64; + description "Selection Sequence ID used in the Selection + Sequence (Statistics) Report Interpretation."; + } + } + leaf cache { + type leafref { path "/ipfix/cache/name"; } + description "Cache that receives the output of the + Selection Process."; + } + } + + list cache { + if-feature meter; + key name; + description "Cache of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + leaf meteringProcessId { + type uint32; + config false; + description "The identifier of the Metering Process this + Cache belongs to. + This parameter corresponds to the Information Element + meteringProcessId. Its occurrence helps to associate + Cache parameters with Metering Process statistics + exported by the Monitoring Device using the Metering + Process (Reliability) Statistics Template as + defined by the IPFIX protocol specification."; + reference "RFC 5101, Sections 4.1 and 4.2; + IANA registry for IPFIX Entities, + http://www.iana.org/assignments/ipfix."; + } + leaf dataRecords { + type yang:counter64; + units "Data Records"; + config false; + description "The number of Data Records generated by this + Cache. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + cacheDiscontinuityTime. + Note that this parameter corresponds to + ipfixMeteringProcessDataRecords in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessDataRecords)."; + } + leaf cacheDiscontinuityTime { + type yang:date-and-time; + config false; + description "Timestamp of the most recent occasion at which + the counter dataRecords suffered a discontinuity. + Note that this parameter functionally corresponds to + ipfixMeteringProcessDiscontinuityTime in the IPFIX MIB + module. In contrast to + ipfixMeteringProcessDiscontinuityTime, the time is + absolute and not relative to sysUpTime."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessDiscontinuityTime)."; + } + choice CacheType { + mandatory true; + description "Type of Cache and specific parameters."; + container immediateCache { + if-feature immediateCache; + description "Flow expiration after the first packet; + generation of Packet Records."; + uses cacheLayoutParameters; + } + container timeoutCache { + if-feature timeoutCache; + description "Flow expiration after active and idle + timeout; generation of Flow Records."; + uses flowCacheParameters; + uses cacheLayoutParameters; + } + container naturalCache { + if-feature naturalCache; + description "Flow expiration after active and idle + timeout, or on natural termination (e.g., TCP FIN or + TCP RST) of the Flow; generation of Flow Records."; + uses flowCacheParameters; + uses cacheLayoutParameters; + } + container permanentCache { + if-feature permanentCache; + description "No flow expiration, periodical export with + time interval exportInterval; generation of Flow + Records."; + uses flowCacheParameters; + uses cacheLayoutParameters; + } + } + leaf-list exportingProcess { + if-feature exporter; + type leafref { path "/ipfix/exportingProcess/name"; } + description "Records are exported by all Exporting Processes + in the list."; + } + } + + list exportingProcess { + if-feature exporter; + key name; + description "Exporting Process of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + uses exportingProcessParameters; + } + } +} diff --git a/models/ietf/RFC/ietf-ipfix-psamp@2012-09-05.yang b/models/ietf/RFC/ietf-ipfix-psamp@2012-09-05.yang new file mode 100644 index 0000000000000000000000000000000000000000..744f0964809a354d217e87f1c8ba96631a6633ad --- /dev/null +++ b/models/ietf/RFC/ietf-ipfix-psamp@2012-09-05.yang @@ -0,0 +1,2232 @@ +module ietf-ipfix-psamp { + namespace "urn:ietf:params:xml:ns:yang:ietf-ipfix-psamp"; + prefix ipfix; + + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + + organization + "IETF IPFIX Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/ipfix/> + WG List: <ipfix@ietf.org> + + WG Chair: Nevil Brownlee + <n.brownlee@auckland.ac.nz> + + WG Chair: Juergen Quittek + <quittek@neclab.eu> + + Editor: Gerhard Muenz + <muenz@net.in.tum.de>"; + + description + "IPFIX/PSAMP Configuration Data Model + + Copyright (c) 2012 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info)."; + + revision 2012-09-05 { + description "Initial version"; + reference "RFC 6728: Configuration Data Model for the IP Flow + Information Export (IPFIX) and Packet Sampling (PSAMP) + Protocols"; + } + + /***************************************************************** + * Features + *****************************************************************/ + + feature exporter { + description "If supported, the Monitoring Device can be used as + an Exporter. Exporting Processes can be configured."; + } + + feature collector { + description "If supported, the Monitoring Device can be used as + a Collector. Collecting Processes can be configured."; + } + + feature meter { + description "If supported, Observation Points, Selection + Processes, and Caches can be configured."; + } + + feature psampSampCountBased { + description "If supported, the Monitoring Device supports + count-based Sampling. The Selector method sampCountBased can + be configured."; + } + + feature psampSampTimeBased { + description "If supported, the Monitoring Device supports + time-based Sampling. The Selector method sampTimeBased can + be configured."; + } + + feature psampSampRandOutOfN { + description "If supported, the Monitoring Device supports + random n-out-of-N Sampling. The Selector method + sampRandOutOfN can be configured."; + } + + feature psampSampUniProb { + description "If supported, the Monitoring Device supports + uniform probabilistic Sampling. The Selector method + sampUniProb can be configured."; + } + + feature psampFilterMatch { + description "If supported, the Monitoring Device supports + property match Filtering. The Selector method filterMatch + can be configured."; + } + + feature psampFilterHash { + description "If supported, the Monitoring Device supports + hash-based Filtering. The Selector method filterHash can be + configured."; + } + + feature immediateCache { + description "If supported, the Monitoring Device supports + Caches generating PSAMP Packet Reports by configuration with + immediateCache."; + } + + feature timeoutCache { + description "If supported, the Monitoring Device supports + Caches generating IPFIX Flow Records by configuration with + timeoutCache."; + } + + feature naturalCache { + description "If supported, the Monitoring Device supports + Caches generating IPFIX Flow Records by configuration with + naturalCache."; + } + + feature permanentCache { + description "If supported, the Monitoring Device supports + Caches generating IPFIX Flow Records by configuration with + permanentCache."; + } + + feature udpTransport { + description "If supported, the Monitoring Device supports UDP + as the transport protocol."; + } + + feature tcpTransport { + description "If supported, the Monitoring Device supports TCP + as the transport protocol."; + } + + feature fileReader { + description "If supported, the Monitoring Device supports the + configuration of Collecting Processes as File Readers."; + } + + feature fileWriter { + description "If supported, the Monitoring Device supports the + configuration of Exporting Processes as File Writers."; + } + + /***************************************************************** + * Identities + *****************************************************************/ + + /*** Hash function identities ***/ + identity hashFunction { + description "Base identity for all hash functions used for + hash-based packet Filtering. Identities derived from + this base are used by the leaf + /ipfix/selectionProcess/selector/filterHash/hashFunction."; + } + identity BOB { + base "hashFunction"; + description "BOB hash function"; + reference "RFC 5475, Section 6.2.4.1."; + } + identity IPSX { + base "hashFunction"; + description "IPSX hash function"; + reference "RFC 5475, Section 6.2.4.1."; + } + identity CRC { + base "hashFunction"; + description "CRC hash function"; + reference "RFC 5475, Section 6.2.4.1."; + } + + /*** Export mode identities ***/ + identity exportMode { + description "Base identity for different usages of export + destinations configured for an Exporting Process. + Identities derived from this base are used by the leaf + /ipfix/exportingProcess/exportMode."; + } + identity parallel { + base "exportMode"; + description "Parallel export of Data Records to all + destinations configured for the Exporting Process."; + } + identity loadBalancing { + base "exportMode"; + description "Load-balancing between the different destinations + configured for the Exporting Process."; + } + identity fallback { + base "exportMode"; + description "Export to the primary destination (i.e., the first + SCTP, UDP, TCP, or file destination configured for the + Exporting Process). If the export to the primary destination + fails, the Exporting Process tries to export to the secondary + destination. If the secondary destination fails as well, it + continues with the tertiary, etc."; + } + + /*** Options type identities ***/ + identity optionsType { + description "Base identity for report types exported with + options. Identities derived from this base are used by the leaf + /ipfix/exportingProcess/options/optionsType."; + } + identity meteringStatistics { + base "optionsType"; + description "Metering Process Statistics."; + reference "RFC 5101, Section 4.1."; + } + identity meteringReliability { + base "optionsType"; + description "Metering Process Reliability Statistics."; + reference "RFC 5101, Section 4.2."; + } + identity exportingReliability { + base "optionsType"; + description "Exporting Process Reliability + Statistics."; + reference "RFC 5101, Section 4.3."; + } + identity flowKeys { + base "optionsType"; + description "Flow Keys."; + reference "RFC 5101, Section 4.4."; + } + identity selectionSequence { + base "optionsType"; + description "Selection Sequence and Selector Reports."; + reference "RFC 5476, Sections 6.5.1 and 6.5.2."; + } + identity selectionStatistics { + base "optionsType"; + description "Selection Sequence Statistics Report."; + reference "RFC 5476, Sections 6.5.3."; + } + identity accuracy { + base "optionsType"; + description "Accuracy Report."; + reference "RFC 5476, Section 6.5.4."; + } + identity reducingRedundancy { + base "optionsType"; + description "Enables the utilization of Options Templates to + reduce redundancy in the exported Data Records."; + reference "RFC 5473."; + } + identity extendedTypeInformation { + base "optionsType"; + description "Export of extended type information for + enterprise-specific Information Elements used in the + exported Templates."; + reference "RFC 5610."; + } + + /***************************************************************** + * Type definitions + *****************************************************************/ + + typedef ieNameType { + type string { + length "1..max"; + pattern "\S+"; + } + description "Type for Information Element names. Whitespaces + are not allowed."; + } + + typedef ieIdType { + type uint16 { + range "1..32767" { + description "Valid range of Information Element + identifiers."; + reference "RFC 5102, Section 4."; + } + } + description "Type for Information Element identifiers."; + } + + typedef nameType { + type string { + length "1..max"; + pattern "\S(.*\S)?"; + } + description "Type for 'name' leafs, which are used to identify + specific instances within lists, etc. + Leading and trailing whitespaces are not allowed."; + } + + typedef ifNameType { + type string { + length "1..255"; + } + description "This corresponds to the DisplayString textual + convention of SNMPv2-TC, which is used for ifName in the IF + MIB module."; + reference "RFC 2863 (ifName)."; + } + + typedef direction { + type enumeration { + enum ingress { + description "This value is used for monitoring incoming + packets."; + } + enum egress { + description "This value is used for monitoring outgoing + packets."; + } + enum both { + description "This value is used for monitoring incoming and + outgoing packets."; + } + } + description "Direction of packets going through an interface or + linecard."; + } + + typedef transportSessionStatus { + type enumeration { + enum inactive { + description "This value MUST be used for Transport Sessions + that are specified in the system but currently not active. + The value can be used for Transport Sessions that are + backup (secondary) sessions."; + } + enum active { + description "This value MUST be used for Transport Sessions + that are currently active and transmitting or receiving + data."; + } + enum unknown { + description "This value MUST be used if the status of the + Transport Sessions cannot be detected by the device. This + value should be avoided as far as possible."; + } + } + description "Status of a Transport Session."; + reference "RFC 6615, Section 8 (ipfixTransportSessionStatus)."; + } + + /***************************************************************** + * Groupings + *****************************************************************/ + + grouping observationPointParameters { + description "Interface as input to Observation Point."; + leaf observationPointId { + type uint32; + config false; + description "Observation Point ID (i.e., the value of the + Information Element observationPointId) assigned by the + Monitoring Device."; + reference "IANA registry for IPFIX Entities, + http://www.iana.org/assignments/ipfix."; + } + leaf observationDomainId { + type uint32; + mandatory true; + description "The Observation Domain ID associates the + Observation Point to an Observation Domain. Observation + Points with identical Observation Domain IDs belong to the + same Observation Domain. + Note that this parameter corresponds to + ipfixObservationPointObservationDomainId in the IPFIX MIB + module."; + reference "RFC 5101; RFC 6615, Section 8 + (ipfixObservationPointObservationDomainId)."; + } + leaf-list ifName { + type ifNameType; + description "List of names identifying interfaces of the + Monitoring Device. The Observation Point observes packets at + the specified interfaces."; + } + leaf-list ifIndex { + type uint32; + description "List of ifIndex values pointing to entries in the + ifTable of the IF-MIB module maintained by the Monitoring + Device. The Observation Point observes packets at the + specified interfaces. + This parameter SHOULD only be used if an SNMP agent enables + access to the ifTable. + Note that this parameter corresponds to + ipfixObservationPointPhysicalInterface in the IPFIX MIB + module."; + reference "RFC 2863; RFC 6615, Section 8 + (ipfixObservationPointPhysicalInterface)."; + } + leaf-list entPhysicalName { + type string; + description "List of names identifying physical entities of the + Monitoring Device. The Observation Point observes packets at + the specified entities."; + } + leaf-list entPhysicalIndex { + type uint32; + description "List of entPhysicalIndex values pointing to + entries in the entPhysicalTable of the ENTITY-MIB module + maintained by the Monitoring Device. The Observation Point + observes packets at the specified entities. + This parameter SHOULD only be used if an SNMP agent enables + access to the entPhysicalTable. + Note that this parameter corresponds to + ipfixObservationPointPhysicalEntity in the IPFIX MIB + module."; + reference "RFC 4133; RFC 6615, Section 8 + (ipfixObservationPointPhysicalInterface)."; + } + leaf direction { + type direction; + default both; + description "Direction of packets. If not applicable (e.g., in + the case of a sniffing interface in promiscuous mode), this + parameter is ignored."; + } + } + + grouping sampCountBasedParameters { + description "Configuration parameters of a Selector applying + systematic count-based packet Sampling to the packet + stream."; + reference "RFC 5475, Section 5.1; RFC 5476, Section 6.5.2.1."; + leaf packetInterval { + type uint32; + units packets; + mandatory true; + description "The number of packets that are consecutively + sampled between gaps of length packetSpace. + This parameter corresponds to the Information Element + samplingPacketInterval and to psampSampCountBasedInterval + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.2; RFC 6727, Section 6 + (psampSampCountBasedInterval)."; + } + leaf packetSpace { + type uint32; + units packets; + mandatory true; + description "The number of unsampled packets between two + Sampling intervals. + This parameter corresponds to the Information Element + samplingPacketSpace and to psampSampCountBasedSpace + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.3; RFC 6727, Section 6 + (psampSampCountBasedSpace)."; + } + } + + grouping sampTimeBasedParameters { + description "Configuration parameters of a Selector applying + systematic time-based packet Sampling to the packet + stream."; + reference "RFC 5475, Section 5.1; RFC 5476, Section 6.5.2.2."; + leaf timeInterval { + type uint32; + units microseconds; + mandatory true; + description "The time interval in microseconds during + which all arriving packets are sampled between gaps + of length timeSpace. + This parameter corresponds to the Information Element + samplingTimeInterval and to psampSampTimeBasedInterval + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.4; RFC 6727, Section 6 + (psampSampTimeBasedInterval)."; + } + leaf timeSpace { + type uint32; + units microseconds; + mandatory true; + description "The time interval in microseconds during + which no packets are sampled between two Sampling + intervals specified by timeInterval. + This parameter corresponds to the Information Element + samplingTimeInterval and to psampSampTimeBasedSpace + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.5; RFC 6727, Section 6 + (psampSampTimeBasedSpace)."; + } + } + + grouping sampRandOutOfNParameters { + description "Configuration parameters of a Selector applying + n-out-of-N packet Sampling to the packet stream."; + reference "RFC 5475, Section 5.2.1; RFC 5476, Section 6.5.2.3."; + leaf size { + type uint32; + units packets; + mandatory true; + description "The number of elements taken from the parent + population. + This parameter corresponds to the Information Element + samplingSize and to psampSampRandOutOfNSize in the PSAMP + MIB module."; + reference "RFC 5477, Section 8.2.6; RFC 6727, Section 6 + (psampSampRandOutOfNSize)."; + } + leaf population { + type uint32; + units packets; + mandatory true; + description "The number of elements in the parent + population. + This parameter corresponds to the Information Element + samplingPopulation and to psampSampRandOutOfNPopulation + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.7; RFC 6727, Section 6 + (psampSampRandOutOfNPopulation)."; + } + } + + grouping sampUniProbParameters { + description "Configuration parameters of a Selector applying + uniform probabilistic packet Sampling (with equal + probability per packet) to the packet stream."; + reference "RFC 5475, Section 5.2.2.1; + RFC 5476, Section 6.5.2.4."; + leaf probability { + type decimal64 { + fraction-digits 18; + range "0..1"; + } + mandatory true; + description "Probability that a packet is sampled, + expressed as a value between 0 and 1. The probability + is equal for every packet. + This parameter corresponds to the Information Element + samplingProbability and to psampSampUniProbProbability + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.2.8; RFC 6727, Section 6 + (psampSampUniProbProbability)."; + } + } + + grouping filterMatchParameters { + description "Configuration parameters of a Selector applying + property match Filtering to the packet stream. + The field to be matched is specified as an Information + Element."; + reference "RFC 5475, Section 6.1; RFC 5476, Section 6.5.2.5."; + choice nameOrId { + mandatory true; + description "The field to be matched is specified by + either the name or the identifier of the Information + Element."; + leaf ieName { + type ieNameType; + description "Name of the Information Element."; + } + leaf ieId { + type ieIdType; + description "Identifier of the Information Element."; + } + } + leaf ieEnterpriseNumber { + type uint32; + default 0; + description "If this parameter is zero, the Information + Element is registered in the IANA registry of IPFIX + Information Elements. + If this parameter is configured with a non-zero private + enterprise number, the Information Element is + enterprise-specific."; + reference "IANA registry for Private Enterprise Numbers, + http://www.iana.org/assignments/enterprise-numbers; + IANA registry for IPFIX Entities, + http://www.iana.org/assignments/ipfix."; + } + leaf value { + type string; + mandatory true; + description "Matching value of the Information Element."; + } + } + + grouping filterHashParameters { + description "Configuration parameters of a Selector applying + hash-based Filtering to the packet stream."; + reference "RFC 5475, Section 6.2; RFC 5476, Section 6.5.2.6."; + leaf hashFunction { + type identityref { + base "hashFunction"; + } + default BOB; + description "Hash function to be applied. According to + RFC 5475, Section 6.2.4.1, 'BOB' must be used in order to + be compliant with PSAMP. + This parameter functionally corresponds to + psampFiltHashFunction in the PSAMP MIB module."; + reference "RFC 6727, Section 6 (psampFiltHashFunction)"; + } + leaf initializerValue { + type uint64; + description "Initializer value to the hash function. + If not configured by the user, the Monitoring Device + arbitrarily chooses an initializer value. + This parameter corresponds to the Information Element + hashInitialiserValue and to psampFiltHashInitializerValue + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.9; RFC 6727, Section 6 + (psampFiltHashInitializerValue)."; + } + leaf ipPayloadOffset { + type uint64; + units octets; + default 0; + description "IP payload offset indicating the position of + the first payload byte considered as input to the hash + function. + Default value 0 corresponds to the minimum offset that + must be configurable according to RFC 5476, Section + 6.5.2.6. + This parameter corresponds to the Information Element + hashIPPayloadOffset and to psampFiltHashIpPayloadOffset + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.2; RFC 6727, Section 6 + (psampFiltHashIpPayloadOffset)."; + } + leaf ipPayloadSize { + type uint64; + units octets; + default 8; + description "Number of IP payload bytes used as input to + the hash function, counted from the payload offset. + If the IP payload is shorter than the payload range, + all available payload octets are used as input. + Default value 8 corresponds to the minimum IP payload + size that must be configurable according to RFC 5476, + Section 6.5.2.6. + This parameter corresponds to the Information Element + hashIPPayloadSize and to psampFiltHashIpPayloadSize + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.3; RFC 6727, Section 6 + (psampFiltHashIpPayloadSize)."; + } + leaf digestOutput { + type boolean; + default false; + description "If true, the output from this Selector is + included in the Packet Report as a packet digest. + Therefore, the configured Cache Layout needs to contain + a digestHashValue field. + This parameter corresponds to the Information Element + hashDigestOutput."; + reference "RFC 5477, Section 8.3.8."; + } + leaf outputRangeMin { + type uint64; + config false; + description "Beginning of the hash function's potential + range. + This parameter corresponds to the Information Element + hashOutputRangeMin and to psampFiltHashOutputRangeMin + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.4; RFC 6727, Section 6 + (psampFiltHashOutputRangeMin)."; + } + leaf outputRangeMax { + type uint64; + config false; + description "End of the hash function's potential range. + This parameter corresponds to the Information Element + hashOutputRangeMax and to psampFiltHashOutputRangeMax + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.5; RFC 6727, Section 6 + (psampFiltHashOutputRangeMax)."; + } + list selectedRange { + key name; + min-elements 1; + description "List of hash function return ranges for + which packets are selected."; + leaf name { + type nameType; + description "Key of this list."; + } + leaf min { + type uint64; + description "Beginning of the hash function's selected + range. + This parameter corresponds to the Information Element + hashSelectedRangeMin and to psampFiltHashSelectedRangeMin + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.6; RFC 6727, Section 6 + (psampFiltHashSelectedRangeMin)."; + } + leaf max { + type uint64; + description "End of the hash function's selected range. + This parameter corresponds to the Information Element + hashSelectedRangeMax and to psampFiltHashSelectedRangeMax + in the PSAMP MIB module."; + reference "RFC 5477, Section 8.3.7; RFC 6727, Section 6 + (psampFiltHashSelectedRangeMax)."; + } + } + } + + grouping selectorParameters { + description "Configuration and state parameters of a Selector."; + choice Method { + mandatory true; + description "Packet selection method applied by the Selector."; + leaf selectAll { + type empty; + description "Method that selects all packets."; + } + container sampCountBased { + if-feature psampSampCountBased; + description "Systematic count-based packet Sampling."; + uses sampCountBasedParameters; + } + container sampTimeBased { + if-feature psampSampTimeBased; + description "Systematic time-based packet Sampling."; + uses sampTimeBasedParameters; + } + container sampRandOutOfN { + if-feature psampSampRandOutOfN; + description "n-out-of-N packet Sampling."; + uses sampRandOutOfNParameters; + } + container sampUniProb { + if-feature psampSampUniProb; + description "Uniform probabilistic packet Sampling."; + uses sampUniProbParameters; + } + container filterMatch { + if-feature psampFilterMatch; + description "Property match Filtering."; + uses filterMatchParameters; + } + container filterHash { + if-feature psampFilterHash; + description "Hash-based Filtering."; + uses filterHashParameters; + } + } + leaf packetsObserved { + type yang:counter64; + config false; + description "The number of packets observed at the input of + the Selector. + If this is the first Selector in the Selection Process, + this counter corresponds to the total number of packets in + all Observed Packet Streams at the input of the Selection + Process. Otherwise, the counter corresponds to the total + number of packets at the output of the preceding Selector. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + selectorDiscontinuityTime. + Note that this parameter corresponds to + ipfixSelectorStatsPacketsObserved in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixSelectorStatsPacketsObserved)."; + } + leaf packetsDropped { + type yang:counter64; + config false; + description "The total number of packets discarded by the + Selector. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + selectorDiscontinuityTime. + Note that this parameter corresponds to + ipfixSelectorStatsPacketsDropped in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixSelectorStatsPacketsDropped)."; + } + leaf selectorDiscontinuityTime { + type yang:date-and-time; + config false; + description "Timestamp of the most recent occasion at which + one or more of the Selector counters suffered a + discontinuity. + Note that this parameter functionally corresponds to + ipfixSelectionProcessStatsDiscontinuityTime in the IPFIX + MIB module. In contrast to + ipfixSelectionProcessStatsDiscontinuityTime, the time is + absolute and not relative to sysUpTime."; + reference "RFC 6615, Section 8 + (ipfixSelectionProcessStatsDiscontinuityTime)."; + } + } + grouping cacheLayoutParameters { + description "Cache Layout parameters used by immediateCache, + timeoutCache, naturalCache, and permanentCache."; + container cacheLayout { + description "Cache Layout parameters."; + list cacheField { + key name; + min-elements 1; + description "Superset of fields that are included in the + Packet Reports or Flow Records generated by the Cache."; + leaf name { + type nameType; + description "Key of this list."; + } + choice nameOrId { + mandatory true; + description "Name or identifier of the Information + Element."; + reference "RFC 5102, Section 2; IANA registry for IPFIX + Entities, http://www.iana.org/assignments/ipfix."; + leaf ieName { + type ieNameType; + description "Name of the Information Element."; + } + leaf ieId { + type ieIdType; + description "Identifier of the Information Element."; + } + } + leaf ieLength { + type uint16; + units octets; + description "Length of the field in which the Information + Element is encoded. A value of 65535 specifies a + variable-length Information Element. For Information + Elements of integer and float type, the field length MAY + be set to a smaller value than the standard length of + the abstract data type if the rules of reduced size + encoding are fulfilled. + If not configured by the user, this parameter is set by + the Monitoring Device."; + reference "RFC 5101, Section 6.2."; + } + leaf ieEnterpriseNumber { + type uint32; + default 0; + description "If this parameter is zero, the Information + Element is registered in the IANA registry of IPFIX + Information Elements. + If this parameter is configured with a non-zero private + enterprise number, the Information Element is + enterprise-specific. + If the enterprise number is set to 29305, this field + contains a Reverse Information Element. In this case, + the Cache MUST generate Data Records in accordance to + RFC 5103."; + reference "RFC 5101; RFC 5103; + IANA registry for Private Enterprise Numbers, + http://www.iana.org/assignments/enterprise-numbers; + IANA registry for IPFIX Entities, + http://www.iana.org/assignments/ipfix."; + } + leaf isFlowKey { + when "(name(../../..) != 'immediateCache') + and + ((count(../ieEnterpriseNumber) = 0) + or + (../ieEnterpriseNumber != 29305))" { + description "This parameter is not available for + Reverse Information Elements (which have enterprise + number 29305). It is also not available for + immediateCache."; + } + type empty; + description "If present, this is a flow key."; + } + } + } + } + + grouping flowCacheParameters { + description "Configuration and state parameters of a Cache + generating Flow Records."; + leaf maxFlows { + type uint32; + units flows; + description "This parameter configures the maximum number of + Flows in the Cache, which is the maximum number of Flows + that can be measured simultaneously. + The Monitoring Device MUST ensure that sufficient resources + are available to store the configured maximum number of + Flows. + If the maximum number of Flows is measured, an additional + Flow can be measured only if an existing entry is removed. + However, traffic that pertains to existing Flows can + continue to be measured."; + } + leaf activeTimeout { + when "(name(..) = 'timeoutCache') or + (name(..) = 'naturalCache')" { + description "This parameter is only available for + timeoutCache and naturalCache."; + } + type uint32; + units seconds; + description "This parameter configures the time in + seconds after which a Flow is expired even though packets + matching this Flow are still received by the Cache. + The parameter value zero indicates infinity, meaning that + there is no active timeout. + If not configured by the user, the Monitoring Device sets + this parameter. + Note that this parameter corresponds to + ipfixMeteringProcessCacheActiveTimeout in the IPFIX + MIB module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessCacheActiveTimeout)."; + } + leaf idleTimeout { + when "(name(..) = 'timeoutCache') or + (name(..) = 'naturalCache')" { + description "This parameter is only available for + timeoutCache and naturalCache."; + } + type uint32; + units seconds; + description "This parameter configures the time in + seconds after which a Flow is expired if no more packets + matching this Flow are received by the Cache. + The parameter value zero indicates infinity, meaning that + there is no idle timeout. + If not configured by the user, the Monitoring Device sets + this parameter. + Note that this parameter corresponds to + ipfixMeteringProcessCacheIdleTimeout in the IPFIX + MIB module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessCacheIdleTimeout)."; + } + leaf exportInterval { + when "name(..) = 'permanentCache'" { + description "This parameter is only available for + permanentCache."; + } + type uint32; + units seconds; + description "This parameter configures the interval (in + seconds) for periodical export of Flow Records. + If not configured by the user, the Monitoring Device sets + this parameter."; + } + leaf activeFlows { + type yang:gauge32; + units flows; + config false; + description "The number of Flows currently active in this + Cache. + Note that this parameter corresponds to + ipfixMeteringProcessCacheActiveFlows in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessCacheActiveFlows)."; + } + leaf unusedCacheEntries { + type yang:gauge32; + units flows; + config false; + description "The number of unused Cache entries in this + Cache. + Note that this parameter corresponds to + ipfixMeteringProcessCacheUnusedCacheEntries in the IPFIX + MIB module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessCacheUnusedCacheEntries)."; + } + } + + grouping exportingProcessParameters { + description "Parameters of an Exporting Process."; + leaf exportingProcessId { + type uint32; + config false; + description "The identifier of the Exporting Process. + This parameter corresponds to the Information Element + exportingProcessId. Its occurrence helps to associate + Exporting Process parameters with Exporing Process + statistics exported by the Monitoring Device using the + Exporting Process Reliability Statistics Template as + defined by the IPFIX protocol specification."; + reference "RFC 5101, Section 4.3; IANA registry for IPFIX + Entities, http://www.iana.org/assignments/ipfix."; + } + leaf exportMode { + type identityref { + base "exportMode"; + } + default parallel; + description "This parameter determines to which configured + destination(s) the incoming Data Records are exported."; + } + list destination { + key name; + min-elements 1; + description "List of export destinations."; + leaf name { + type nameType; + description "Key of this list."; + } + choice DestinationParameters { + mandatory true; + description "Configuration parameters depend on whether + SCTP, UDP, or TCP is used as transport protocol, and + whether the destination is a file."; + container sctpExporter { + description "SCTP parameters."; + uses sctpExporterParameters; + } + container udpExporter { + if-feature udpTransport; + description "UDP parameters."; + uses udpExporterParameters; + } + container tcpExporter { + if-feature tcpTransport; + description "TCP parameters."; + uses tcpExporterParameters; + } + container fileWriter { + if-feature fileWriter; + description "File Writer parameters."; + uses fileWriterParameters; + } + } + } + list options { + key name; + description "List of options reported by the Exporting + Process."; + leaf name { + type nameType; + description "Key of this list."; + } + uses optionsParameters; + } + } + + grouping commonExporterParameters { + description "Parameters of en export destination that are + common to all transport protocols."; + leaf ipfixVersion { + type uint16; + default 10; + description "IPFIX version number."; + reference "RFC 5101."; + } + leaf destinationPort { + type inet:port-number; + description "If not configured by the user, the Monitoring + Device uses the default port number for IPFIX, which is + 4739 without TLS or DTLS and 4740 if TLS or DTLS is + activated."; + } + choice indexOrName { + description "Index or name of the interface as stored in the + ifTable of IF-MIB. + If configured, the Exporting Process MUST use the given + interface to export IPFIX Messages to the export + destination. + If omitted, the Exporting Process selects the outgoing + interface based on local routing decision and accepts + return traffic, such as transport-layer acknowledgments, + on all available interfaces."; + reference "RFC 2863."; + leaf ifIndex { + type uint32; + description "Index of an interface as stored in the ifTable + of IF-MIB."; + reference "RFC 2863."; + } + leaf ifName { + type string; + description "Name of an interface as stored in the ifTable + of IF-MIB."; + reference "RFC 2863."; + } + } + leaf sendBufferSize { + type uint32; + units bytes; + description "Size of the socket send buffer. + If not configured by the user, this parameter is set by + the Monitoring Device."; + } + leaf rateLimit { + type uint32; + units "bytes per second"; + description "Maximum number of bytes per second the Exporting + Process may export to the given destination. The number of + bytes is calculated from the lengths of the IPFIX Messages + exported. If not configured, no rate limiting is performed."; + reference "RFC 5476, Section 6.3."; + } + container transportLayerSecurity { + presence "If transportLayerSecurity is present, DTLS is + enabled if the transport protocol is SCTP or UDP, and TLS + is enabled if the transport protocol is TCP."; + description "TLS or DTLS configuration."; + uses transportLayerSecurityParameters; + } + container transportSession { + config false; + description "State parameters of the Transport Session + directed to the given destination."; + uses transportSessionParameters; + } + } + + grouping sctpExporterParameters { + description "SCTP-specific export destination parameters."; + uses commonExporterParameters; + leaf-list sourceIPAddress { + type inet:ip-address; + description "List of source IP addresses used by the + Exporting Process. + If configured, the specified addresses are eligible local + IP addresses of the multihomed SCTP endpoint. + If not configured, all locally assigned IP addresses are + eligible local IP addresses."; + reference "RFC 4960, Section 6.4."; + } + leaf-list destinationIPAddress { + type inet:ip-address; + min-elements 1; + description "One or more IP addresses of the Collecting + Process to which IPFIX Messages are sent. + The user MUST ensure that all configured IP addresses + belong to the same Collecting Process. + The Exporting Process tries to establish an SCTP + association to any of the configured destination IP + addresses."; + reference "RFC 4960, Section 6.4."; + } + leaf timedReliability { + type uint32; + units milliseconds; + default 0; + description "Lifetime in milliseconds until an IPFIX + Message containing Data Sets only is 'abandoned' due to + the timed reliability mechanism of PR-SCTP. + If this parameter is set to zero, reliable SCTP + transport is used for all Data Records. + Regardless of the value of this parameter, the Exporting + Process MAY use reliable SCTP transport for Data Sets + associated with Options Templates."; + reference "RFC 3758; RFC 4960."; + } + } + + grouping udpExporterParameters { + description "Parameters of a UDP export destination."; + uses commonExporterParameters; + leaf sourceIPAddress { + type inet:ip-address; + description "Source IP address used by the Exporting Process. + If not configured, the IP address assigned to the outgoing + interface is used as source IP address."; + } + leaf destinationIPAddress { + type inet:ip-address; + mandatory true; + description "IP address of the Collection Process to which + IPFIX Messages are sent."; + } + leaf maxPacketSize { + type uint16; + units octets; + description "This parameter specifies the maximum size of + IP packets sent to the Collector. If set to zero, the + Exporting Device MUST derive the maximum packet size + from path MTU discovery mechanisms. + If not configured by the user, this parameter is set by + the Monitoring Device."; + } + leaf templateRefreshTimeout { + type uint32; + units seconds; + default 600; + description "Sets time after which Templates are resent in the + UDP Transport Session. + Note that the configured lifetime MUST be adapted to the + templateLifeTime parameter value at the receiving Collecting + Process. + Note that this parameter corresponds to + ipfixTransportSessionTemplateRefreshTimeout in the IPFIX + MIB module."; + reference "RFC 5101, Section 10.3.6; RFC 6615, Section 8 + (ipfixTransportSessionTemplateRefreshTimeout)."; + } + leaf optionsTemplateRefreshTimeout { + type uint32; + units seconds; + default 600; + description "Sets time after which Options Templates are + resent in the UDP Transport Session. + Note that the configured lifetime MUST be adapted to the + optionsTemplateLifeTime parameter value at the receiving + Collecting Process. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplateRefreshTimeout in the + IPFIX MIB module."; + reference "RFC 5101, Section 10.3.6; RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplateRefreshTimeout)."; + } + leaf templateRefreshPacket { + type uint32; + units "IPFIX Messages"; + description "Sets number of IPFIX Messages after which + Templates are resent in the UDP Transport Session. + Note that this parameter corresponds to + ipfixTransportSessionTemplateRefreshPacket in the IPFIX + MIB module. + If omitted, Templates are only resent after timeout."; + reference "RFC 5101, Section 10.3.6; RFC 6615, Section 8 + (ipfixTransportSessionTemplateRefreshPacket)."; + } + leaf optionsTemplateRefreshPacket { + type uint32; + units "IPFIX Messages"; + description "Sets number of IPFIX Messages after which + Options Templates are resent in the UDP Transport Session + protocol. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplateRefreshPacket in the + IPFIX MIB module. + If omitted, Templates are only resent after timeout."; + reference "RFC 5101, Section 10.3.6; RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplateRefreshPacket)."; + } + } + + grouping tcpExporterParameters { + description "Parameters of a TCP export destination."; + uses commonExporterParameters; + leaf sourceIPAddress { + type inet:ip-address; + description "Source IP address used by the Exporting Process. + If not configured by the user, this parameter is set by + the Monitoring Device to an IP address assigned to the + outgoing interface."; + } + leaf destinationIPAddress { + type inet:ip-address; + mandatory true; + description "IP address of the Collection Process to which + IPFIX Messages are sent."; + } + } + + grouping fileWriterParameters { + description "File Writer parameters."; + leaf ipfixVersion { + type uint16; + default 10; + description "IPFIX version number."; + reference "RFC 5101."; + } + leaf file { + type inet:uri; + mandatory true; + description "URI specifying the location of the file."; + } + leaf bytes { + type yang:counter64; + units octets; + config false; + description "The number of bytes written by the File Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf messages { + type yang:counter64; + units "IPFIX Messages"; + config false; + description "The number of IPFIX Messages written by the File + Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf discardedMessages { + type yang:counter64; + units "IPFIX Messages"; + config false; + description "The number of IPFIX Messages that could not be + written by the File Writer due to internal buffer + overflows, limited storage capacity, etc. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf records { + type yang:counter64; + units "Data Records"; + config false; + description "The number of Data Records written by the File + Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf templates { + type yang:counter32; + units "Templates"; + config false; + description "The number of Template Records (excluding + Options Template Records) written by the File Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf optionsTemplates { + type yang:counter32; + units "Options Templates"; + config false; + description "The number of Options Template Records written + by the File Writer. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileWriterDiscontinuityTime."; + } + leaf fileWriterDiscontinuityTime { + type yang:date-and-time; + config false; + description "Timestamp of the most recent occasion at which + one or more File Writer counters suffered a discontinuity. + In contrast to discontinuity times in the IPFIX MIB module, + the time is absolute and not relative to sysUpTime."; + } + list template { + config false; + description "This list contains the Templates and Options + Templates that have been written by the File Reader. + Withdrawn or invalidated (Options) Templates MUST be removed + from this list."; + uses templateParameters; + } + } + + grouping optionsParameters { + description "Parameters specifying the data export using an + Options Template."; + leaf optionsType { + type identityref { + base "optionsType"; + } + mandatory true; + description "Type of the exported options data."; + } + leaf optionsTimeout { + type uint32; + units milliseconds; + description "Time interval for periodic export of the options + data. If set to zero, the export is triggered when the + options data has changed. + If not configured by the user, this parameter is set by the + Monitoring Device."; + } + } + + grouping collectingProcessParameters { + description "Parameters of a Collecting Process."; + list sctpCollector { + key name; + description "List of SCTP receivers (sockets) on which the + Collecting Process receives IPFIX Messages."; + leaf name { + type nameType; + description "Key of this list."; + } + uses sctpCollectorParameters; + } + list udpCollector { + if-feature udpTransport; + key name; + description "List of UDP receivers (sockets) on which the + Collecting Process receives IPFIX Messages."; + leaf name { + type nameType; + description "Key of this list."; + } + uses udpCollectorParameters; + } + list tcpCollector { + if-feature tcpTransport; + key name; + description "List of TCP receivers (sockets) on which the + Collecting Process receives IPFIX Messages."; + leaf name { + type nameType; + description "Key of this list."; + } + uses tcpCollectorParameters; + } + list fileReader { + if-feature fileReader; + key name; + description "List of File Readers from which the Collecting + Process reads IPFIX Messages."; + leaf name { + type nameType; + description "Key of this list."; + } + uses fileReaderParameters; + } + } + + grouping commonCollectorParameters { + description "Parameters of a Collecting Process that are + common to all transport protocols."; + leaf localPort { + type inet:port-number; + description "If not configured, the Monitoring Device uses the + default port number for IPFIX, which is 4739 without + TLS or DTLS and 4740 if TLS or DTLS is activated."; + } + container transportLayerSecurity { + presence "If transportLayerSecurity is present, DTLS is enabled + if the transport protocol is SCTP or UDP, and TLS is enabled + if the transport protocol is TCP."; + description "TLS or DTLS configuration."; + uses transportLayerSecurityParameters; + } + list transportSession { + config false; + description "This list contains the currently established + Transport Sessions terminating at the given socket."; + uses transportSessionParameters; + } + } + + grouping sctpCollectorParameters { + description "Parameters of a listening SCTP socket at a + Collecting Process."; + uses commonCollectorParameters; + leaf-list localIPAddress { + type inet:ip-address; + description "List of local IP addresses on which the + Collecting Process listens for IPFIX Messages. The IP + addresses are used as eligible local IP addresses of the + multihomed SCTP endpoint."; + reference "RFC 4960, Section 6.4."; + } + } + + grouping udpCollectorParameters { + description "Parameters of a listening UDP socket at a + Collecting Process."; + uses commonCollectorParameters; + leaf-list localIPAddress { + type inet:ip-address; + description "List of local IP addresses on which the Collecting + Process listens for IPFIX Messages."; + } + leaf templateLifeTime { + type uint32; + units seconds; + default 1800; + description "Sets the lifetime of Templates for all UDP + Transport Sessions terminating at this UDP socket. + Templates that are not received again within the configured + lifetime become invalid at the Collecting Process. + As specified in RFC 5101, the Template lifetime MUST be at + least three times higher than the templateRefreshTimeout + parameter value configured on the corresponding Exporting + Processes. + Note that this parameter corresponds to + ipfixTransportSessionTemplateRefreshTimeout in the IPFIX + MIB module."; + reference "RFC 5101, Section 10.3.7; RFC 6615, Section 8 + (ipfixTransportSessionTemplateRefreshTimeout)."; + } + leaf optionsTemplateLifeTime { + type uint32; + units seconds; + default 1800; + description "Sets the lifetime of Options Templates for all + UDP Transport Sessions terminating at this UDP socket. + Options Templates that are not received again within the + configured lifetime become invalid at the Collecting + Process. + As specified in RFC 5101, the Options Template lifetime MUST + be at least three times higher than the + optionsTemplateRefreshTimeout parameter value configured on + the corresponding Exporting Processes. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplateRefreshTimeout in the + IPFIX MIB module."; + reference "RFC 5101, Section 10.3.7; RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplateRefreshTimeout)."; + } + leaf templateLifePacket { + type uint32; + units "IPFIX Messages"; + description "If this parameter is configured, Templates + defined in a UDP Transport Session become invalid if they + are neither included in a sequence of more than this number + of IPFIX Messages nor received again within the period of + time specified by templateLifeTime. + Note that this parameter corresponds to + ipfixTransportSessionTemplateRefreshPacket in the IPFIX + MIB module."; + reference "RFC 5101, Section 10.3.7; RFC 6615, Section 8 + (ipfixTransportSessionTemplateRefreshPacket)."; + } + leaf optionsTemplateLifePacket { + type uint32; + units "IPFIX Messages"; + description "If this parameter is configured, Options + Templates defined in a UDP Transport Session become + invalid if they are neither included in a sequence of more + than this number of IPFIX Messages nor received again + within the period of time specified by + optionsTemplateLifeTime. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplateRefreshPacket in the + IPFIX MIB module."; + reference "RFC 5101, Section 10.3.7; RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplateRefreshPacket)."; + } + } + + grouping tcpCollectorParameters { + description "Parameters of a listening TCP socket at a + Collecting Process."; + uses commonCollectorParameters; + leaf-list localIPAddress { + type inet:ip-address; + description "List of local IP addresses on which the Collecting + Process listens for IPFIX Messages."; + } + } + + grouping fileReaderParameters { + description "File Reader parameters."; + leaf file { + type inet:uri; + mandatory true; + description "URI specifying the location of the file."; + } + leaf bytes { + type yang:counter64; + units octets; + config false; + description "The number of bytes read by the File Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf messages { + type yang:counter64; + units "IPFIX Messages"; + config false; + description "The number of IPFIX Messages read by the File + Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf records { + type yang:counter64; + units "Data Records"; + config false; + description "The number of Data Records read by the File + Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf templates { + type yang:counter32; + units "Templates"; + config false; + description "The number of Template Records (excluding + Options Template Records) read by the File Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf optionsTemplates { + type yang:counter32; + units "Options Templates"; + config false; + description "The number of Options Template Records read by + the File Reader. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + fileReaderDiscontinuityTime."; + } + leaf fileReaderDiscontinuityTime { + type yang:date-and-time; + config false; + description "Timestamp of the most recent occasion at which + one or more File Reader counters suffered a discontinuity. + In contrast to discontinuity times in the IPFIX MIB module, + the time is absolute and not relative to sysUpTime."; + } + list template { + config false; + description "This list contains the Templates and Options + Templates that have been read by the File Reader. + Withdrawn or invalidated (Options) Template MUST be removed + from this list."; + uses templateParameters; + } + } + + grouping transportLayerSecurityParameters { + description "TLS or DTLS parameters."; + leaf-list localCertificationAuthorityDN { + type string; + description "Distinguished names of certification authorities + whose certificates may be used to identify the local + endpoint."; + reference "RFC 5280."; + } + leaf-list localSubjectDN { + type string; + description "Distinguished names that may be used in the + certificates to identify the local endpoint."; + reference "RFC 5280."; + } + leaf-list localSubjectFQDN { + type inet:domain-name; + description "Fully qualified domain names that may be used to + in the certificates to identify the local endpoint."; + reference "RFC 5280."; + } + leaf-list remoteCertificationAuthorityDN { + type string; + description "Distinguished names of certification authorities + whose certificates are accepted to authorize remote + endpoints."; + reference "RFC 5280."; + } + leaf-list remoteSubjectDN { + type string; + description "Distinguished names which are accepted in + certificates to authorize remote endpoints."; + reference "RFC 5280."; + } + leaf-list remoteSubjectFQDN { + type inet:domain-name; + description "Fully qualified domain names that are accepted in + certificates to authorize remote endpoints."; + reference "RFC 5280."; + } + } + + grouping templateParameters { + description "State parameters of a Template used by an Exporting + Process or received by a Collecting Process in a specific + Transport Session. Parameter names and semantics correspond to + the managed objects in IPFIX-MIB"; + reference "RFC 5101; RFC 6615, Section 8 (ipfixTemplateEntry, + ipfixTemplateDefinitionEntry, ipfixTemplateStatsEntry)"; + leaf observationDomainId { + type uint32; + description "The ID of the Observation Domain for which this + Template is defined. + Note that this parameter corresponds to + ipfixTemplateObservationDomainId in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTemplateObservationDomainId)."; + } + leaf templateId { + type uint16 { + range "256..65535" { + description "Valid range of Template IDs."; + reference "RFC 5101"; + } + } + description "This number indicates the Template ID in the IPFIX + message. + Note that this parameter corresponds to ipfixTemplateId in + the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTemplateId)."; + } + leaf setId { + type uint16; + description "This number indicates the Set ID of the Template. + Currently, there are two values defined. The value 2 is used + for Sets containing Template definitions. The value 3 is + used for Sets containing Options Template definitions. + Note that this parameter corresponds to ipfixTemplateSetId + in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTemplateSetId)."; + } + leaf accessTime { + type yang:date-and-time; + description "Used for Exporting Processes, this parameter + contains the time when this (Options) Template was last + sent to the Collector(s) or written to the file. + Used for Collecting Processes, this parameter contains the + time when this (Options) Template was last received from the + Exporter or read from the file. + Note that this parameter corresponds to + ipfixTemplateAccessTime in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTemplateAccessTime)."; + } + leaf templateDataRecords { + type yang:counter64; + description "The number of transmitted or received Data + Records defined by this (Options) Template. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + templateDiscontinuityTime. + Note that this parameter corresponds to + ipfixTemplateDataRecords in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTemplateDataRecords)."; + } + leaf templateDiscontinuityTime { + type yang:date-and-time; + description "Timestamp of the most recent occasion at which + the counter templateDataRecords suffered a discontinuity. + Note that this parameter functionally corresponds to + ipfixTemplateDiscontinuityTime in the IPFIX MIB module. + In contrast to ipfixTemplateDiscontinuityTime, the time + is absolute and not relative to sysUpTime."; + reference "RFC 6615, Section 8 + (ipfixTemplateDiscontinuityTime)."; + } + list field { + description "This list contains the (Options) Template + fields of which the (Options) Template is defined. + The order of the list corresponds to the order of the fields + in the (Option) Template Record."; + leaf ieId { + type ieIdType; + description "This parameter indicates the Information + Element identifier of the field. + Note that this parameter corresponds to + ipfixTemplateDefinitionIeId in the IPFIX MIB module."; + reference "RFC 5101; RFC 6615, Section 8 + (ipfixTemplateDefinitionIeId)."; + } + leaf ieLength { + type uint16; + units octets; + description "This parameter indicates the length of the + Information Element of the field. + Note that this parameter corresponds to + ipfixTemplateDefinitionIeLength in the IPFIX MIB + module."; + reference "RFC 5101; RFC 6615, Section 8 + (ipfixTemplateDefinitionIeLength)."; + } + leaf ieEnterpriseNumber { + type uint32; + description "This parameter indicates the IANA enterprise + number of the authority defining the Information Element + identifier. + If the Information Element is not enterprise-specific, + this state parameter is zero. + Note that this parameter corresponds to + ipfixTemplateDefinitionIeEnterpriseNumber in the IPFIX + MIB module."; + reference "RFC 6615, Section 8 + (ipfixTemplateDefinitionIeEnterpriseNumber); + IANA registry for Private Enterprise Numbers, + http://www.iana.org/assignments/enterprise-numbers."; + } + leaf isFlowKey { + when "../../setId = 2" { + description "This parameter is available for non-Options + Templates (Set ID is 2)."; + } + type empty; + description "If present, this is a Flow Key field. + Note that this corresponds to flowKey(1) being set in + ipfixTemplateDefinitionFlags."; + reference "RFC 6615, Section 8 + (ipfixTemplateDefinitionFlags)."; + } + leaf isScope { + when "../../setId = 3" { + description "This parameter is available for Options + Templates (Set ID is 3)."; + } + type empty; + description "If present, this is a scope field. + Note that this corresponds to scope(0) being set in + ipfixTemplateDefinitionFlags."; + reference "RFC 6615, Section 8 + (ipfixTemplateDefinitionFlags)."; + } + } + } + + grouping transportSessionParameters { + description "State parameters of a Transport Session originating + from an Exporting Process or terminating at a Collecting + Process. Parameter names and semantics correspond to the + managed objects in IPFIX-MIB."; + reference "RFC 5101; RFC 6615, Section 8 + (ipfixTransportSessionEntry, + ipfixTransportSessionStatsEntry)."; + leaf ipfixVersion { + type uint16; + description "Used for Exporting Processes, this parameter + contains the version number of the IPFIX protocol that the + Exporter uses to export its data in this Transport Session. + Hence, it is identical to the value of the configuration + parameter ipfixVersion of the outer SctpExporter, + UdpExporter, or TcpExporter node. + Used for Collecting Processes, this parameter contains the + version number of the IPFIX protocol it receives for + this Transport Session. If IPFIX Messages of different + IPFIX protocol versions are received, this parameter + contains the maximum version number. + Note that this parameter corresponds to + ipfixTransportSessionIpfixVersion in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionIpfixVersion)."; + } + leaf sourceAddress { + type inet:ip-address; + description "The source address of the Exporter of the + IPFIX Transport Session. + If the transport protocol is SCTP, this is one of the + potentially many IP addresses of the Exporter. + Preferably, the source IP address of the path that is + usually selected by the Exporter to send IPFIX Messages to + the Collector SHOULD be used. + Note that this parameter functionally corresponds to + ipfixTransportSessionSourceAddressType and + ipfixTransportSessionSourceAddress in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionSourceAddressType, + ipfixTransportSessionSourceAddress); + RFC 4960, Section 6.4."; + } + leaf destinationAddress { + type inet:ip-address; + description "The destination address of the Collector of + the IPFIX Transport Session. + If the transport protocol is SCTP, this is one of the + potentially many IP addresses of the Collector. + Preferably, the destination IP address of the path that is + usually selected by the Exporter to send IPFIX Messages to + the Collector SHOULD be used. + Note that this parameter functionally corresponds to + ipfixTransportSessionDestinationAddressType and + ipfixTransportSessionDestinationAddress in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionDestinationAddressType, + ipfixTransportSessionDestinationAddress); + RFC 4960, Section 6.4."; + } + leaf sourcePort { + type inet:port-number; + description "The transport-protocol port number of the + Exporter of the IPFIX Transport Session. + Note that this parameter corresponds to + ipfixTransportSessionSourcePort in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionSourcePort)."; + } + leaf destinationPort { + type inet:port-number; + description "The transport-protocol port number of the + Collector of the IPFIX Transport Session. + Note that this parameter corresponds to + ipfixTransportSessionDestinationPort in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionDestinationPort)."; + } + leaf sctpAssocId { + type uint32; + description "The association ID used for the SCTP session + between the Exporter and the Collector of the IPFIX + Transport Session. It is equal to the sctpAssocId entry + in the sctpAssocTable defined in the SCTP-MIB. + This parameter is only available if the transport protocol + is SCTP and if an SNMP agent on the same Monitoring Device + enables access to the corresponding MIB objects in the + sctpAssocTable. + Note that this parameter corresponds to + ipfixTransportSessionSctpAssocId in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionSctpAssocId); + RFC 3871"; + } + leaf status { + type transportSessionStatus; + description "Status of the Transport Session. + Note that this parameter corresponds to + ipfixTransportSessionStatus in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTransportSessionStatus)."; + } + leaf rate { + type yang:gauge32; + units "bytes per second"; + description "The number of bytes per second transmitted by the + Exporting Process or received by the Collecting Process. + This parameter is updated every second. + Note that this parameter corresponds to + ipfixTransportSessionRate in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTransportSessionRate)."; + } + leaf bytes { + type yang:counter64; + units bytes; + description "The number of bytes transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionBytes in the IPFIX MIB module."; + reference "RFC 6615, Section 8 (ipfixTransportSessionBytes)."; + } + leaf messages { + type yang:counter64; + units "IPFIX Messages"; + description "The number of messages transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionMessages in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionMessages)."; + } + leaf discardedMessages { + type yang:counter64; + units "IPFIX Messages"; + description "Used for Exporting Processes, this parameter + indicates the number of messages that could not be sent due + to internal buffer overflows, network congestion, routing + issues, etc. Used for Collecting Process, this parameter + indicates the number of received IPFIX Message that are + malformed, cannot be decoded, are received in the wrong + order or are missing according to the sequence number. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionDiscardedMessages in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionDiscardedMessages)."; + } + leaf records { + type yang:counter64; + units "Data Records"; + description "The number of Data Records transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionRecords in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionRecords)."; + } + leaf templates { + type yang:counter32; + units "Templates"; + description "The number of Templates transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionTemplates in the IPFIX MIB module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionTemplates)."; + } + leaf optionsTemplates { + type yang:counter32; + units "Options Templates"; + description "The number of Option Templates transmitted by the + Exporting Process or received by the Collecting Process. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + transportSessionDiscontinuityTime. + Note that this parameter corresponds to + ipfixTransportSessionOptionsTemplates in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionOptionsTemplates)."; + } + leaf transportSessionStartTime { + type yang:date-and-time; + description "Timestamp of the start of the given Transport + Session. + This state parameter does not correspond to any object in + the IPFIX MIB module."; + } + leaf transportSessionDiscontinuityTime { + type yang:date-and-time; + description "Timestamp of the most recent occasion at which + one or more of the Transport Session counters suffered a + discontinuity. + Note that this parameter functionally corresponds to + ipfixTransportSessionDiscontinuityTime in the IPFIX MIB + module. In contrast to + ipfixTransportSessionDiscontinuityTime, the time is + absolute and not relative to sysUpTime."; + reference "RFC 6615, Section 8 + (ipfixTransportSessionDiscontinuityTime)."; + } + list template { + description "This list contains the Templates and Options + Templates that are transmitted by the Exporting Process + or received by the Collecting Process. + Withdrawn or invalidated (Options) Templates MUST be removed + from this list."; + uses templateParameters; + } + } + + /***************************************************************** + * Main container + *****************************************************************/ + + container ipfix { + description "Top-level node of the IPFIX/PSAMP configuration + data model."; + list collectingProcess { + if-feature collector; + key name; + description "Collecting Process of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + uses collectingProcessParameters; + leaf-list exportingProcess { + if-feature exporter; + type leafref { path "/ipfix/exportingProcess/name"; } + description "Export of received records without any + modifications. Records are processed by all Exporting + Processes in the list."; + } + } + + list observationPoint { + if-feature meter; + key name; + description "Observation Point of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + uses observationPointParameters; + leaf-list selectionProcess { + type leafref { path "/ipfix/selectionProcess/name"; } + description "Selection Processes in this list process + packets in parallel."; + } + } + + list selectionProcess { + if-feature meter; + key name; + description "Selection Process of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + list selector { + key name; + min-elements 1; + ordered-by user; + description "List of Selectors that define the action of the + Selection Process on a single packet. The Selectors are + serially invoked in the same order as they appear in this + list."; + leaf name { + type nameType; + description "Key of this list."; + } + uses selectorParameters; + } + list selectionSequence { + config false; + description "This list contains the Selection Sequence IDs + that are assigned by the Monitoring Device to distinguish + different Selection Sequences passing through the + Selection Process. + As Selection Sequence IDs are unique per Observation + Domain, the corresponding Observation Domain IDs are + included as well. + With this information, it is possible to associate + Selection Sequence (Statistics) Report Interpretations + exported according to the PSAMP protocol with a Selection + Process in the configuration data."; + reference "RFC 5476."; + leaf observationDomainId { + type uint32; + description "Observation Domain ID for which the + Selection Sequence ID is assigned."; + } + leaf selectionSequenceId { + type uint64; + description "Selection Sequence ID used in the Selection + Sequence (Statistics) Report Interpretation."; + } + } + leaf cache { + type leafref { path "/ipfix/cache/name"; } + description "Cache that receives the output of the + Selection Process."; + } + } + + list cache { + if-feature meter; + key name; + description "Cache of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + leaf meteringProcessId { + type uint32; + config false; + description "The identifier of the Metering Process this + Cache belongs to. + This parameter corresponds to the Information Element + meteringProcessId. Its occurrence helps to associate + Cache parameters with Metering Process statistics + exported by the Monitoring Device using the Metering + Process (Reliability) Statistics Template as + defined by the IPFIX protocol specification."; + reference "RFC 5101, Sections 4.1 and 4.2; + IANA registry for IPFIX Entities, + http://www.iana.org/assignments/ipfix."; + } + leaf dataRecords { + type yang:counter64; + units "Data Records"; + config false; + description "The number of Data Records generated by this + Cache. + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of + cacheDiscontinuityTime. + Note that this parameter corresponds to + ipfixMeteringProcessDataRecords in the IPFIX MIB + module."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessDataRecords)."; + } + leaf cacheDiscontinuityTime { + type yang:date-and-time; + config false; + description "Timestamp of the most recent occasion at which + the counter dataRecords suffered a discontinuity. + Note that this parameter functionally corresponds to + ipfixMeteringProcessDiscontinuityTime in the IPFIX MIB + module. In contrast to + ipfixMeteringProcessDiscontinuityTime, the time is + absolute and not relative to sysUpTime."; + reference "RFC 6615, Section 8 + (ipfixMeteringProcessDiscontinuityTime)."; + } + choice CacheType { + mandatory true; + description "Type of Cache and specific parameters."; + container immediateCache { + if-feature immediateCache; + description "Flow expiration after the first packet; + generation of Packet Records."; + uses cacheLayoutParameters; + } + container timeoutCache { + if-feature timeoutCache; + description "Flow expiration after active and idle + timeout; generation of Flow Records."; + uses flowCacheParameters; + uses cacheLayoutParameters; + } + container naturalCache { + if-feature naturalCache; + description "Flow expiration after active and idle + timeout, or on natural termination (e.g., TCP FIN or + TCP RST) of the Flow; generation of Flow Records."; + uses flowCacheParameters; + uses cacheLayoutParameters; + } + container permanentCache { + if-feature permanentCache; + description "No flow expiration, periodical export with + time interval exportInterval; generation of Flow + Records."; + uses flowCacheParameters; + uses cacheLayoutParameters; + } + } + leaf-list exportingProcess { + if-feature exporter; + type leafref { path "/ipfix/exportingProcess/name"; } + description "Records are exported by all Exporting Processes + in the list."; + } + } + + list exportingProcess { + if-feature exporter; + key name; + description "Exporting Process of the Monitoring Device."; + leaf name { + type nameType; + description "Key of this list."; + } + uses exportingProcessParameters; + } + } +} diff --git a/models/ietf/RFC/ietf-ipv4-unicast-routing.yang b/models/ietf/RFC/ietf-ipv4-unicast-routing.yang new file mode 100644 index 0000000000000000000000000000000000000000..7db3fc9ce9b9c11ac46116ab88e57e99eb5587bb --- /dev/null +++ b/models/ietf/RFC/ietf-ipv4-unicast-routing.yang @@ -0,0 +1,377 @@ +module ietf-ipv4-unicast-routing { + yang-version "1.1"; + namespace + "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing"; + prefix "v4ur"; + + import ietf-routing { + prefix "rt"; + description + "An 'ietf-routing' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-inet-types { + prefix "inet"; + } + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com>"; + + description + "This YANG module augments the 'ietf-routing' module with basic + parameters for IPv4 unicast routing. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Identities */ + + identity ipv4-unicast { + base rt:ipv4; + description + "This identity represents the IPv4 unicast address family."; + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This leaf augments an IPv4 unicast route."; + leaf destination-prefix { + type inet:ipv4-prefix; + description + "IPv4 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'simple-next-hop' case in IPv4 unicast routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This leaf augments the 'next-hop-list' case of IPv4 unicast + routes."; + leaf address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment + "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast RIBs."; + } + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv4-address; + description + "IPv4 destination address."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv4-prefix; + description + "IPv4 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:static-routes" { + description + "This augment defines the 'static' pseudo-protocol + with data specific to IPv4 unicast."; + container ipv4 { + description + "Support for a 'static' pseudo-protocol instance + consists of a list of routes."; + list route { + key "destination-prefix"; + description + "A list of static routes."; + leaf destination-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "IPv4 destination prefix."; + } + leaf description { + type string; + description + "Textual description of the route."; + } + container next-hop { + description + "Support for next-hop."; + uses rt:next-hop-content { + augment "next-hop-options/simple-next-hop" { + description + "Augments the 'simple-next-hop' case in IPv4 static + routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + augment "next-hop-options/next-hop-list/next-hop-list/" + + "next-hop" { + description + "Augments the 'next-hop-list' case in IPv4 static + routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This leaf augments an IPv4 unicast route."; + leaf destination-prefix { + type inet:ipv4-prefix; + status obsolete; + description + "IPv4 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self( + ../../../rt:address-family, 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in IPv4 unicast routes."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This leaf augments the 'next-hop-list' case of IPv4 unicast + routes."; + leaf address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:input" { + when "derived-from-or-self(../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast RIBs."; + } + status obsolete; + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 destination address."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv4-prefix; + status obsolete; + description + "IPv4 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } +} diff --git a/models/ietf/RFC/ietf-ipv4-unicast-routing@2016-11-04.yang b/models/ietf/RFC/ietf-ipv4-unicast-routing@2016-11-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..6ba659a05ae5c5040132f5d10b5555de7eb976f4 --- /dev/null +++ b/models/ietf/RFC/ietf-ipv4-unicast-routing@2016-11-04.yang @@ -0,0 +1,249 @@ +module ietf-ipv4-unicast-routing { + + yang-version "1.1"; + + namespace "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing"; + + prefix "v4ur"; + + import ietf-routing { + prefix "rt"; + } + + import ietf-inet-types { + prefix "inet"; + } + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Lou Berger + <mailto:lberger@labn.net> + + WG Chair: Kent Watsen + <mailto:kwatsen@juniper.net> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + + Editor: Acee Lindem + <mailto:acee@cisco.com>"; + + description + "This YANG module augments the 'ietf-routing' module with basic + configuration and state data for IPv4 unicast routing. + + Copyright (c) 2016 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and + 'OPTIONAL' in the module text are to be interpreted as described + in RFC 2119. + + This version of this YANG module is part of RFC 8022; + see the RFC itself for full legal notices."; + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Identities */ + + identity ipv4-unicast { + base rt:ipv4; + description + "This identity represents the IPv4 unicast address family."; + } + + /* State data */ + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This leaf augments an IPv4 unicast route."; + leaf destination-prefix { + type inet:ipv4-prefix; + description + "IPv4 destination prefix."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augment 'simple-next-hop' case in IPv4 unicast routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This leaf augments the 'next-hop-list' case of IPv4 unicast + routes."; + leaf address { + type inet:ipv4-address; + description + "IPv4 address of the next-hop."; + } + } + + augment + "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast RIBs."; + } + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv4-address; + description + "IPv4 destination address."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv4-prefix; + description + "IPv4 destination prefix."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augment 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augment 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + /* Configuration data */ + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:static-routes" { + description + "This augment defines the configuration of the 'static' + pseudo-protocol with data specific to IPv4 unicast."; + container ipv4 { + description + "Configuration of a 'static' pseudo-protocol instance + consists of a list of routes."; + list route { + key "destination-prefix"; + description + "A list of static routes."; + leaf destination-prefix { + type inet:ipv4-prefix; + mandatory "true"; + description + "IPv4 destination prefix."; + } + leaf description { + type string; + description + "Textual description of the route."; + } + container next-hop { + description + "Configuration of next-hop."; + uses rt:next-hop-content { + augment "next-hop-options/simple-next-hop" { + description + "Augment 'simple-next-hop' case in IPv4 static + routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + augment "next-hop-options/next-hop-list/next-hop-list/" + + "next-hop" { + description + "Augment 'next-hop-list' case in IPv4 static + routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ipv4-unicast-routing@2018-03-13.yang b/models/ietf/RFC/ietf-ipv4-unicast-routing@2018-03-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..7db3fc9ce9b9c11ac46116ab88e57e99eb5587bb --- /dev/null +++ b/models/ietf/RFC/ietf-ipv4-unicast-routing@2018-03-13.yang @@ -0,0 +1,377 @@ +module ietf-ipv4-unicast-routing { + yang-version "1.1"; + namespace + "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing"; + prefix "v4ur"; + + import ietf-routing { + prefix "rt"; + description + "An 'ietf-routing' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-inet-types { + prefix "inet"; + } + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com>"; + + description + "This YANG module augments the 'ietf-routing' module with basic + parameters for IPv4 unicast routing. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Identities */ + + identity ipv4-unicast { + base rt:ipv4; + description + "This identity represents the IPv4 unicast address family."; + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This leaf augments an IPv4 unicast route."; + leaf destination-prefix { + type inet:ipv4-prefix; + description + "IPv4 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'simple-next-hop' case in IPv4 unicast routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This leaf augments the 'next-hop-list' case of IPv4 unicast + routes."; + leaf address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment + "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast RIBs."; + } + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv4-address; + description + "IPv4 destination address."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv4-prefix; + description + "IPv4 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:static-routes" { + description + "This augment defines the 'static' pseudo-protocol + with data specific to IPv4 unicast."; + container ipv4 { + description + "Support for a 'static' pseudo-protocol instance + consists of a list of routes."; + list route { + key "destination-prefix"; + description + "A list of static routes."; + leaf destination-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "IPv4 destination prefix."; + } + leaf description { + type string; + description + "Textual description of the route."; + } + container next-hop { + description + "Support for next-hop."; + uses rt:next-hop-content { + augment "next-hop-options/simple-next-hop" { + description + "Augments the 'simple-next-hop' case in IPv4 static + routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + augment "next-hop-options/next-hop-list/next-hop-list/" + + "next-hop" { + description + "Augments the 'next-hop-list' case in IPv4 static + routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This leaf augments an IPv4 unicast route."; + leaf destination-prefix { + type inet:ipv4-prefix; + status obsolete; + description + "IPv4 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self( + ../../../rt:address-family, 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in IPv4 unicast routes."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This leaf augments the 'next-hop-list' case of IPv4 unicast + routes."; + leaf address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:input" { + when "derived-from-or-self(../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast RIBs."; + } + status obsolete; + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 destination address."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv4-prefix; + status obsolete; + description + "IPv4 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } +} diff --git a/models/ietf/RFC/ietf-ipv6-router-advertisements.yang b/models/ietf/RFC/ietf-ipv6-router-advertisements.yang new file mode 100644 index 0000000000000000000000000000000000000000..294e231d764c3a915d7da420cd2078d68659270c --- /dev/null +++ b/models/ietf/RFC/ietf-ipv6-router-advertisements.yang @@ -0,0 +1,501 @@ +submodule ietf-ipv6-router-advertisements { + yang-version "1.1"; + + belongs-to ietf-ipv6-unicast-routing { + prefix "v6ur"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-interfaces { + prefix "if"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-ip { + prefix "ip"; + description + "An 'ietf-ip' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com>"; + + description + "This YANG module augments the 'ietf-ip' module with + parameters for IPv6 Router Advertisements. The model fully + conforms to the Network Management Datastore + Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8349; see + the RFC itself for full legal notices."; + + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + augment "/if:interfaces/if:interface/ip:ipv6" { + description + "Augments interface configuration with parameters of IPv6 + Router Advertisements."; + container ipv6-router-advertisements { + description + "Support for IPv6 Router Advertisements."; + leaf send-advertisements { + type boolean; + default "false"; + description + "A flag indicating whether or not the router sends + periodic Router Advertisements and responds to + Router Solicitations."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvSendAdvertisements"; + } + leaf max-rtr-adv-interval { + type uint16 { + range "4..65535"; + } + units "seconds"; + default "600"; + description + "The maximum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - MaxRtrAdvInterval"; + } + leaf min-rtr-adv-interval { + type uint16 { + range "3..1350"; + } + units "seconds"; + must ". <= 0.75 * ../max-rtr-adv-interval" { + description + "The value MUST NOT be greater than 75% of + 'max-rtr-adv-interval'."; + } + description + "The minimum time allowed between sending unsolicited + multicast Router Advertisements from the interface. + + The default value to be used operationally if this + leaf is not configured is determined as follows: + + - if max-rtr-adv-interval >= 9 seconds, the default + value is 0.33 * max-rtr-adv-interval; + + - otherwise, it is 0.75 * max-rtr-adv-interval."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - MinRtrAdvInterval"; + } + leaf managed-flag { + type boolean; + default "false"; + description + "The value to be placed in the 'Managed address + configuration' flag field in the Router + Advertisement."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvManagedFlag"; + } + leaf other-config-flag { + type boolean; + default "false"; + description + "The value to be placed in the 'Other configuration' + flag field in the Router Advertisement."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvOtherConfigFlag"; + } + leaf link-mtu { + type uint32; + default "0"; + description + "The value to be placed in MTU options sent by the + router. A value of zero indicates that no MTU options + are sent."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvLinkMTU"; + } + leaf reachable-time { + type uint32 { + range "0..3600000"; + } + units "milliseconds"; + default "0"; + description + "The value to be placed in the Reachable Time field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvReachableTime"; + } + leaf retrans-timer { + type uint32; + units "milliseconds"; + default "0"; + description + "The value to be placed in the Retrans Timer field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvRetransTimer"; + } + leaf cur-hop-limit { + type uint8; + description + "The value to be placed in the Cur Hop Limit field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router). + + If this parameter is not configured, the device SHOULD + use the IANA-specified value for the default IPv4 + Time to Live (TTL) parameter that was in effect at the + time of implementation."; + reference + "RFC 3232: Assigned Numbers: RFC 1700 is Replaced by + an On-line Database + RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvCurHopLimit + IANA: IP Parameters + (https://www.iana.org/assignments/ip-parameters)"; + } + leaf default-lifetime { + type uint16 { + range "0..65535"; + } + units "seconds"; + description + "The value to be placed in the Router Lifetime field of + Router Advertisements sent from the interface, in + seconds. It MUST be either zero or between + max-rtr-adv-interval and 9000 seconds. A value of zero + indicates that the router is not to be used as a + default router. These limits may be overridden by + specific documents that describe how IPv6 operates over + different link layers. + + If this parameter is not configured, the device SHOULD + use a value of 3 * max-rtr-adv-interval."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvDefaultLifetime"; + } + container prefix-list { + description + "Support for prefixes to be placed in Prefix + Information options in Router Advertisement messages + sent from the interface. + + Prefixes that are advertised by default but do not + have their entries in the child 'prefix' list are + advertised with the default values of all parameters. + + The link-local prefix SHOULD NOT be included in the + list of advertised prefixes."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvPrefixList"; + list prefix { + key "prefix-spec"; + description + "Support for an advertised prefix entry."; + leaf prefix-spec { + type inet:ipv6-prefix; + description + "IPv6 address prefix."; + } + choice control-adv-prefixes { + default "advertise"; + description + "Either (1) the prefix is explicitly removed from the + set of advertised prefixes or (2) the parameters with + which the prefix is advertised are specified (default + case)."; + leaf no-advertise { + type empty; + description + "The prefix will not be advertised. + + This can be used for removing the prefix from + the default set of advertised prefixes."; + } + case advertise { + leaf valid-lifetime { + type uint32; + units "seconds"; + default "2592000"; + description + "The value to be placed in the Valid Lifetime + in the Prefix Information option. The + designated value of all 1's (0xffffffff) + represents infinity."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvValidLifetime"; + } + leaf on-link-flag { + type boolean; + default "true"; + description + "The value to be placed in the on-link flag + ('L-bit') field in the Prefix Information + option."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvOnLinkFlag"; + } + leaf preferred-lifetime { + type uint32; + units "seconds"; + must ". <= ../valid-lifetime" { + description + "This value MUST NOT be greater than + valid-lifetime."; + } + default "604800"; + description + "The value to be placed in the Preferred + Lifetime in the Prefix Information option. + The designated value of all 1's (0xffffffff) + represents infinity."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvPreferredLifetime"; + } + leaf autonomous-flag { + type boolean; + default "true"; + description + "The value to be placed in the Autonomous Flag + field in the Prefix Information option."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvAutonomousFlag"; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/if:interfaces-state/if:interface/ip:ipv6" { + status obsolete; + description + "Augments interface state data with parameters of IPv6 + Router Advertisements."; + container ipv6-router-advertisements { + status obsolete; + description + "Parameters of IPv6 Router Advertisements."; + leaf send-advertisements { + type boolean; + status obsolete; + description + "A flag indicating whether or not the router sends + periodic Router Advertisements and responds to + Router Solicitations."; + } + leaf max-rtr-adv-interval { + type uint16 { + range "4..1800"; + } + units "seconds"; + status obsolete; + description + "The maximum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + } + leaf min-rtr-adv-interval { + type uint16 { + range "3..1350"; + } + units "seconds"; + status obsolete; + description + "The minimum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + } + leaf managed-flag { + type boolean; + status obsolete; + description + "The value that is placed in the 'Managed address + configuration' flag field in the Router Advertisement."; + } + leaf other-config-flag { + type boolean; + status obsolete; + description + "The value that is placed in the 'Other configuration' flag + field in the Router Advertisement."; + } + leaf link-mtu { + type uint32; + status obsolete; + description + "The value that is placed in MTU options sent by the + router. A value of zero indicates that no MTU options + are sent."; + } + leaf reachable-time { + type uint32 { + range "0..3600000"; + } + units "milliseconds"; + status obsolete; + description + "The value that is placed in the Reachable Time field in + the Router Advertisement messages sent by the router. A + value of zero means unspecified (by this router)."; + } + leaf retrans-timer { + type uint32; + units "milliseconds"; + status obsolete; + description + "The value that is placed in the Retrans Timer field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + } + leaf cur-hop-limit { + type uint8; + status obsolete; + description + "The value that is placed in the Cur Hop Limit field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + } + leaf default-lifetime { + type uint16 { + range "0..9000"; + } + units "seconds"; + status obsolete; + description + "The value that is placed in the Router Lifetime field of + Router Advertisements sent from the interface, in seconds. + A value of zero indicates that the router is not to be + used as a default router."; + } + container prefix-list { + status obsolete; + description + "A list of prefixes that are placed in Prefix Information + options in Router Advertisement messages sent from the + interface. + + By default, these are all prefixes that the router + advertises via routing protocols as being on-link for the + interface from which the advertisement is sent."; + list prefix { + key "prefix-spec"; + status obsolete; + description + "Advertised prefix entry and its parameters."; + leaf prefix-spec { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 address prefix."; + } + leaf valid-lifetime { + type uint32; + units "seconds"; + status obsolete; + description + "The value that is placed in the Valid Lifetime in the + Prefix Information option. The designated value of + all 1's (0xffffffff) represents infinity. + + An implementation SHOULD keep this value constant in + consecutive advertisements, except when it is + explicitly changed in configuration."; + } + leaf on-link-flag { + type boolean; + status obsolete; + description + "The value that is placed in the on-link flag ('L-bit') + field in the Prefix Information option."; + } + leaf preferred-lifetime { + type uint32; + units "seconds"; + status obsolete; + description + "The value that is placed in the Preferred Lifetime in + the Prefix Information option, in seconds. The + designated value of all 1's (0xffffffff) represents + infinity. + + An implementation SHOULD keep this value constant in + consecutive advertisements, except when it is + explicitly changed in configuration."; + } + leaf autonomous-flag { + type boolean; + status obsolete; + description + "The value that is placed in the Autonomous Flag field + in the Prefix Information option."; + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ipv6-router-advertisements@2016-11-04.yang b/models/ietf/RFC/ietf-ipv6-router-advertisements@2016-11-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..4f9b8774b2f5bb8fcd403990a1b7cb5ba28520d4 --- /dev/null +++ b/models/ietf/RFC/ietf-ipv6-router-advertisements@2016-11-04.yang @@ -0,0 +1,469 @@ +submodule ietf-ipv6-router-advertisements { + + yang-version "1.1"; + + belongs-to ietf-ipv6-unicast-routing { + prefix "v6ur"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-interfaces { + prefix "if"; + } + + import ietf-ip { + prefix "ip"; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Lou Berger + <mailto:lberger@labn.net> + + WG Chair: Kent Watsen + <mailto:kwatsen@juniper.net> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + + Editor: Acee Lindem + <mailto:acee@cisco.com>"; + + description + "This YANG module augments the 'ietf-ip' module with + configuration and state data of IPv6 router advertisements. + + Copyright (c) 2016 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and + 'OPTIONAL' in the module text are to be interpreted as described + in RFC 2119. + + This version of this YANG module is part of RFC 8022; + see the RFC itself for full legal notices."; + + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)."; + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* State data */ + + augment "/if:interfaces-state/if:interface/ip:ipv6" { + description + "Augment interface state data with parameters of IPv6 router + advertisements."; + container ipv6-router-advertisements { + description + "Parameters of IPv6 Router Advertisements."; + leaf send-advertisements { + type boolean; + description + "A flag indicating whether or not the router sends periodic + Router Advertisements and responds to Router + Solicitations."; + } + leaf max-rtr-adv-interval { + type uint16 { + range "4..1800"; + } + units "seconds"; + description + "The maximum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + } + leaf min-rtr-adv-interval { + type uint16 { + range "3..1350"; + } + units "seconds"; + description + "The minimum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + } + leaf managed-flag { + type boolean; + description + "The value that is placed in the 'Managed address + configuration' flag field in the Router Advertisement."; + } + leaf other-config-flag { + type boolean; + description + "The value that is placed in the 'Other configuration' flag + field in the Router Advertisement."; + } + leaf link-mtu { + type uint32; + description + "The value that is placed in MTU options sent by the + router. A value of zero indicates that no MTU options are + sent."; + } + leaf reachable-time { + type uint32 { + range "0..3600000"; + } + units "milliseconds"; + description + "The value that is placed in the Reachable Time field in + the Router Advertisement messages sent by the router. A + value of zero means unspecified (by this router)."; + } + leaf retrans-timer { + type uint32; + units "milliseconds"; + description + "The value that is placed in the Retrans Timer field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + } + + leaf cur-hop-limit { + type uint8; + description + "The value that is placed in the Cur Hop Limit field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + } + leaf default-lifetime { + type uint16 { + range "0..9000"; + } + units "seconds"; + description + "The value that is placed in the Router Lifetime field of + Router Advertisements sent from the interface, in seconds. + A value of zero indicates that the router is not to be + used as a default router."; + } + container prefix-list { + description + "A list of prefixes that are placed in Prefix Information + options in Router Advertisement messages sent from the + interface. + + By default, these are all prefixes that the router + advertises via routing protocols as being on-link for the + interface from which the advertisement is sent."; + list prefix { + key "prefix-spec"; + description + "Advertised prefix entry and its parameters."; + leaf prefix-spec { + type inet:ipv6-prefix; + description + "IPv6 address prefix."; + } + leaf valid-lifetime { + type uint32; + units "seconds"; + description + "The value that is placed in the Valid Lifetime in the + Prefix Information option. The designated value of + all 1's (0xffffffff) represents infinity. + + An implementation SHOULD keep this value constant in + consecutive advertisements except when it is + explicitly changed in configuration."; + } + leaf on-link-flag { + type boolean; + description + "The value that is placed in the on-link flag ('L-bit') + field in the Prefix Information option."; + } + leaf preferred-lifetime { + type uint32; + units "seconds"; + description + "The value that is placed in the Preferred Lifetime in + the Prefix Information option, in seconds. The + designated value of all 1's (0xffffffff) represents + infinity. + + An implementation SHOULD keep this value constant in + consecutive advertisements except when it is + explicitly changed in configuration."; + } + leaf autonomous-flag { + type boolean; + description + "The value that is placed in the Autonomous Flag field + in the Prefix Information option."; + } + } + } + } + } + + /* Configuration data */ + + augment "/if:interfaces/if:interface/ip:ipv6" { + description + "Augment interface configuration with parameters of IPv6 router + advertisements."; + container ipv6-router-advertisements { + description + "Configuration of IPv6 Router Advertisements."; + leaf send-advertisements { + type boolean; + default "false"; + description + "A flag indicating whether or not the router sends periodic + Router Advertisements and responds to Router + Solicitations."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvSendAdvertisements."; + } + leaf max-rtr-adv-interval { + type uint16 { + range "4..1800"; + } + units "seconds"; + default "600"; + description + "The maximum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + MaxRtrAdvInterval."; + } + leaf min-rtr-adv-interval { + type uint16 { + range "3..1350"; + } + units "seconds"; + must ". <= 0.75 * ../max-rtr-adv-interval" { + description + "The value MUST NOT be greater than 75% of + 'max-rtr-adv-interval'."; + } + description + "The minimum time allowed between sending unsolicited + multicast Router Advertisements from the interface. + + The default value to be used operationally if this leaf is + not configured is determined as follows: + + - if max-rtr-adv-interval >= 9 seconds, the default + value is 0.33 * max-rtr-adv-interval; + + - otherwise, it is 0.75 * max-rtr-adv-interval."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + MinRtrAdvInterval."; + } + leaf managed-flag { + type boolean; + default "false"; + description + "The value to be placed in the 'Managed address + configuration' flag field in the Router Advertisement."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvManagedFlag."; + } + leaf other-config-flag { + type boolean; + default "false"; + description + "The value to be placed in the 'Other configuration' flag + field in the Router Advertisement."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvOtherConfigFlag."; + } + leaf link-mtu { + type uint32; + default "0"; + description + "The value to be placed in MTU options sent by the router. + A value of zero indicates that no MTU options are sent."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvLinkMTU."; + } + leaf reachable-time { + type uint32 { + range "0..3600000"; + } + units "milliseconds"; + default "0"; + description + "The value to be placed in the Reachable Time field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvReachableTime."; + } + leaf retrans-timer { + type uint32; + units "milliseconds"; + default "0"; + description + "The value to be placed in the Retrans Timer field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvRetransTimer."; + } + leaf cur-hop-limit { + type uint8; + description + "The value to be placed in the Cur Hop Limit field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router). + + If this parameter is not configured, the device SHOULD use + the value specified in IANA Assigned Numbers that was in + effect at the time of implementation."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvCurHopLimit. + + IANA: IP Parameters, + http://www.iana.org/assignments/ip-parameters"; + } + leaf default-lifetime { + type uint16 { + range "0..9000"; + } + units "seconds"; + description + "The value to be placed in the Router Lifetime field of + Router Advertisements sent from the interface, in seconds. + It MUST be either zero or between max-rtr-adv-interval and + 9000 seconds. A value of zero indicates that the router + is not to be used as a default router. These limits may + be overridden by specific documents that describe how IPv6 + operates over different link layers. + + If this parameter is not configured, the device SHOULD use + a value of 3 * max-rtr-adv-interval."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvDefaultLifeTime."; + } + container prefix-list { + description + "Configuration of prefixes to be placed in Prefix + Information options in Router Advertisement messages sent + from the interface. + + Prefixes that are advertised by default but do not have + their entries in the child 'prefix' list are advertised + with the default values of all parameters. + + The link-local prefix SHOULD NOT be included in the list + of advertised prefixes."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - + AdvPrefixList."; + list prefix { + key "prefix-spec"; + description + "Configuration of an advertised prefix entry."; + leaf prefix-spec { + type inet:ipv6-prefix; + description + "IPv6 address prefix."; + } + choice control-adv-prefixes { + default "advertise"; + description + "Either the prefix is explicitly removed from the + set of advertised prefixes, or the parameters with + which it is advertised are specified (default case)."; + leaf no-advertise { + type empty; + description + "The prefix will not be advertised. + + This can be used for removing the prefix from the + default set of advertised prefixes."; + } + case advertise { + leaf valid-lifetime { + type uint32; + units "seconds"; + default "2592000"; + description + "The value to be placed in the Valid Lifetime in + the Prefix Information option. The designated + value of all 1's (0xffffffff) represents + infinity."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvValidLifetime."; + } + leaf on-link-flag { + type boolean; + default "true"; + description + "The value to be placed in the on-link flag + ('L-bit') field in the Prefix Information + option."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvOnLinkFlag."; + } + leaf preferred-lifetime { + type uint32; + units "seconds"; + must ". <= ../valid-lifetime" { + description + "This value MUST NOT be greater than + valid-lifetime."; + } + default "604800"; + description + "The value to be placed in the Preferred Lifetime + in the Prefix Information option. The designated + value of all 1's (0xffffffff) represents + infinity."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvPreferredLifetime."; + } + leaf autonomous-flag { + type boolean; + default "true"; + description + "The value to be placed in the Autonomous Flag + field in the Prefix Information option."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvAutonomousFlag."; + } + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ipv6-router-advertisements@2018-03-13.yang b/models/ietf/RFC/ietf-ipv6-router-advertisements@2018-03-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..294e231d764c3a915d7da420cd2078d68659270c --- /dev/null +++ b/models/ietf/RFC/ietf-ipv6-router-advertisements@2018-03-13.yang @@ -0,0 +1,501 @@ +submodule ietf-ipv6-router-advertisements { + yang-version "1.1"; + + belongs-to ietf-ipv6-unicast-routing { + prefix "v6ur"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-interfaces { + prefix "if"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-ip { + prefix "ip"; + description + "An 'ietf-ip' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com>"; + + description + "This YANG module augments the 'ietf-ip' module with + parameters for IPv6 Router Advertisements. The model fully + conforms to the Network Management Datastore + Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8349; see + the RFC itself for full legal notices."; + + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + augment "/if:interfaces/if:interface/ip:ipv6" { + description + "Augments interface configuration with parameters of IPv6 + Router Advertisements."; + container ipv6-router-advertisements { + description + "Support for IPv6 Router Advertisements."; + leaf send-advertisements { + type boolean; + default "false"; + description + "A flag indicating whether or not the router sends + periodic Router Advertisements and responds to + Router Solicitations."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvSendAdvertisements"; + } + leaf max-rtr-adv-interval { + type uint16 { + range "4..65535"; + } + units "seconds"; + default "600"; + description + "The maximum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - MaxRtrAdvInterval"; + } + leaf min-rtr-adv-interval { + type uint16 { + range "3..1350"; + } + units "seconds"; + must ". <= 0.75 * ../max-rtr-adv-interval" { + description + "The value MUST NOT be greater than 75% of + 'max-rtr-adv-interval'."; + } + description + "The minimum time allowed between sending unsolicited + multicast Router Advertisements from the interface. + + The default value to be used operationally if this + leaf is not configured is determined as follows: + + - if max-rtr-adv-interval >= 9 seconds, the default + value is 0.33 * max-rtr-adv-interval; + + - otherwise, it is 0.75 * max-rtr-adv-interval."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - MinRtrAdvInterval"; + } + leaf managed-flag { + type boolean; + default "false"; + description + "The value to be placed in the 'Managed address + configuration' flag field in the Router + Advertisement."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvManagedFlag"; + } + leaf other-config-flag { + type boolean; + default "false"; + description + "The value to be placed in the 'Other configuration' + flag field in the Router Advertisement."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvOtherConfigFlag"; + } + leaf link-mtu { + type uint32; + default "0"; + description + "The value to be placed in MTU options sent by the + router. A value of zero indicates that no MTU options + are sent."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvLinkMTU"; + } + leaf reachable-time { + type uint32 { + range "0..3600000"; + } + units "milliseconds"; + default "0"; + description + "The value to be placed in the Reachable Time field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvReachableTime"; + } + leaf retrans-timer { + type uint32; + units "milliseconds"; + default "0"; + description + "The value to be placed in the Retrans Timer field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvRetransTimer"; + } + leaf cur-hop-limit { + type uint8; + description + "The value to be placed in the Cur Hop Limit field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router). + + If this parameter is not configured, the device SHOULD + use the IANA-specified value for the default IPv4 + Time to Live (TTL) parameter that was in effect at the + time of implementation."; + reference + "RFC 3232: Assigned Numbers: RFC 1700 is Replaced by + an On-line Database + RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvCurHopLimit + IANA: IP Parameters + (https://www.iana.org/assignments/ip-parameters)"; + } + leaf default-lifetime { + type uint16 { + range "0..65535"; + } + units "seconds"; + description + "The value to be placed in the Router Lifetime field of + Router Advertisements sent from the interface, in + seconds. It MUST be either zero or between + max-rtr-adv-interval and 9000 seconds. A value of zero + indicates that the router is not to be used as a + default router. These limits may be overridden by + specific documents that describe how IPv6 operates over + different link layers. + + If this parameter is not configured, the device SHOULD + use a value of 3 * max-rtr-adv-interval."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvDefaultLifetime"; + } + container prefix-list { + description + "Support for prefixes to be placed in Prefix + Information options in Router Advertisement messages + sent from the interface. + + Prefixes that are advertised by default but do not + have their entries in the child 'prefix' list are + advertised with the default values of all parameters. + + The link-local prefix SHOULD NOT be included in the + list of advertised prefixes."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvPrefixList"; + list prefix { + key "prefix-spec"; + description + "Support for an advertised prefix entry."; + leaf prefix-spec { + type inet:ipv6-prefix; + description + "IPv6 address prefix."; + } + choice control-adv-prefixes { + default "advertise"; + description + "Either (1) the prefix is explicitly removed from the + set of advertised prefixes or (2) the parameters with + which the prefix is advertised are specified (default + case)."; + leaf no-advertise { + type empty; + description + "The prefix will not be advertised. + + This can be used for removing the prefix from + the default set of advertised prefixes."; + } + case advertise { + leaf valid-lifetime { + type uint32; + units "seconds"; + default "2592000"; + description + "The value to be placed in the Valid Lifetime + in the Prefix Information option. The + designated value of all 1's (0xffffffff) + represents infinity."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvValidLifetime"; + } + leaf on-link-flag { + type boolean; + default "true"; + description + "The value to be placed in the on-link flag + ('L-bit') field in the Prefix Information + option."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvOnLinkFlag"; + } + leaf preferred-lifetime { + type uint32; + units "seconds"; + must ". <= ../valid-lifetime" { + description + "This value MUST NOT be greater than + valid-lifetime."; + } + default "604800"; + description + "The value to be placed in the Preferred + Lifetime in the Prefix Information option. + The designated value of all 1's (0xffffffff) + represents infinity."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvPreferredLifetime"; + } + leaf autonomous-flag { + type boolean; + default "true"; + description + "The value to be placed in the Autonomous Flag + field in the Prefix Information option."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvAutonomousFlag"; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/if:interfaces-state/if:interface/ip:ipv6" { + status obsolete; + description + "Augments interface state data with parameters of IPv6 + Router Advertisements."; + container ipv6-router-advertisements { + status obsolete; + description + "Parameters of IPv6 Router Advertisements."; + leaf send-advertisements { + type boolean; + status obsolete; + description + "A flag indicating whether or not the router sends + periodic Router Advertisements and responds to + Router Solicitations."; + } + leaf max-rtr-adv-interval { + type uint16 { + range "4..1800"; + } + units "seconds"; + status obsolete; + description + "The maximum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + } + leaf min-rtr-adv-interval { + type uint16 { + range "3..1350"; + } + units "seconds"; + status obsolete; + description + "The minimum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + } + leaf managed-flag { + type boolean; + status obsolete; + description + "The value that is placed in the 'Managed address + configuration' flag field in the Router Advertisement."; + } + leaf other-config-flag { + type boolean; + status obsolete; + description + "The value that is placed in the 'Other configuration' flag + field in the Router Advertisement."; + } + leaf link-mtu { + type uint32; + status obsolete; + description + "The value that is placed in MTU options sent by the + router. A value of zero indicates that no MTU options + are sent."; + } + leaf reachable-time { + type uint32 { + range "0..3600000"; + } + units "milliseconds"; + status obsolete; + description + "The value that is placed in the Reachable Time field in + the Router Advertisement messages sent by the router. A + value of zero means unspecified (by this router)."; + } + leaf retrans-timer { + type uint32; + units "milliseconds"; + status obsolete; + description + "The value that is placed in the Retrans Timer field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + } + leaf cur-hop-limit { + type uint8; + status obsolete; + description + "The value that is placed in the Cur Hop Limit field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + } + leaf default-lifetime { + type uint16 { + range "0..9000"; + } + units "seconds"; + status obsolete; + description + "The value that is placed in the Router Lifetime field of + Router Advertisements sent from the interface, in seconds. + A value of zero indicates that the router is not to be + used as a default router."; + } + container prefix-list { + status obsolete; + description + "A list of prefixes that are placed in Prefix Information + options in Router Advertisement messages sent from the + interface. + + By default, these are all prefixes that the router + advertises via routing protocols as being on-link for the + interface from which the advertisement is sent."; + list prefix { + key "prefix-spec"; + status obsolete; + description + "Advertised prefix entry and its parameters."; + leaf prefix-spec { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 address prefix."; + } + leaf valid-lifetime { + type uint32; + units "seconds"; + status obsolete; + description + "The value that is placed in the Valid Lifetime in the + Prefix Information option. The designated value of + all 1's (0xffffffff) represents infinity. + + An implementation SHOULD keep this value constant in + consecutive advertisements, except when it is + explicitly changed in configuration."; + } + leaf on-link-flag { + type boolean; + status obsolete; + description + "The value that is placed in the on-link flag ('L-bit') + field in the Prefix Information option."; + } + leaf preferred-lifetime { + type uint32; + units "seconds"; + status obsolete; + description + "The value that is placed in the Preferred Lifetime in + the Prefix Information option, in seconds. The + designated value of all 1's (0xffffffff) represents + infinity. + + An implementation SHOULD keep this value constant in + consecutive advertisements, except when it is + explicitly changed in configuration."; + } + leaf autonomous-flag { + type boolean; + status obsolete; + description + "The value that is placed in the Autonomous Flag field + in the Prefix Information option."; + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ipv6-unicast-routing.yang b/models/ietf/RFC/ietf-ipv6-unicast-routing.yang new file mode 100644 index 0000000000000000000000000000000000000000..6a8e7e384f5724828c4b470c201877e0b05e33bd --- /dev/null +++ b/models/ietf/RFC/ietf-ipv6-unicast-routing.yang @@ -0,0 +1,387 @@ +module ietf-ipv6-unicast-routing { + yang-version "1.1"; + namespace + "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; + prefix "v6ur"; + + import ietf-routing { + prefix "rt"; + description + "An 'ietf-routing' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-inet-types { + prefix "inet"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + include ietf-ipv6-router-advertisements { + revision-date 2018-03-13; + } + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com>"; + + description + "This YANG module augments the 'ietf-routing' module with basic + parameters for IPv6 unicast routing. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + /* Identities */ + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + identity ipv6-unicast { + base rt:ipv6; + description + "This identity represents the IPv6 unicast address family."; + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This leaf augments an IPv6 unicast route."; + leaf destination-prefix { + type inet:ipv6-prefix; + description + "IPv6 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'simple-next-hop' case in IPv6 unicast routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This leaf augments the 'next-hop-list' case of IPv6 unicast + routes."; + leaf address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment + "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast RIBs."; + } + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv6-address; + description + "IPv6 destination address."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv6-prefix; + description + "IPv6 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + /* Data node augmentations */ + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:static-routes" { + description + "This augment defines the 'static' pseudo-protocol + with data specific to IPv6 unicast."; + container ipv6 { + description + "Support for a 'static' pseudo-protocol instance + consists of a list of routes."; + list route { + key "destination-prefix"; + description + "A list of static routes."; + leaf destination-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "IPv6 destination prefix."; + } + leaf description { + type string; + description + "Textual description of the route."; + } + container next-hop { + description + "Next hop for the route."; + uses rt:next-hop-content { + augment "next-hop-options/simple-next-hop" { + description + "Augments the 'simple-next-hop' case in IPv6 static + routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + augment "next-hop-options/next-hop-list/next-hop-list/" + + "next-hop" { + description + "Augments the 'next-hop-list' case in IPv6 static + routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This leaf augments an IPv6 unicast route."; + leaf destination-prefix { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in IPv6 unicast routes."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This leaf augments the 'next-hop-list' case of IPv6 unicast + routes."; + leaf address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/" + + "rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast RIBs."; + } + status obsolete; + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 destination address."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } +} diff --git a/models/ietf/RFC/ietf-ipv6-unicast-routing@2016-11-04.yang b/models/ietf/RFC/ietf-ipv6-unicast-routing@2016-11-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..f7e258ef1cd052441ca1ab9e3076b0ce1fa3116d --- /dev/null +++ b/models/ietf/RFC/ietf-ipv6-unicast-routing@2016-11-04.yang @@ -0,0 +1,254 @@ +module ietf-ipv6-unicast-routing { + + yang-version "1.1"; + + namespace "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; + + prefix "v6ur"; + + import ietf-routing { + prefix "rt"; + } + + import ietf-inet-types { + prefix "inet"; + } + + include ietf-ipv6-router-advertisements { + revision-date 2016-11-04; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Lou Berger + <mailto:lberger@labn.net> + + WG Chair: Kent Watsen + <mailto:kwatsen@juniper.net> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + + Editor: Acee Lindem + <mailto:acee@cisco.com>"; + + description + "This YANG module augments the 'ietf-routing' module with basic + configuration and state data for IPv6 unicast routing. + + Copyright (c) 2016 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and + 'OPTIONAL' in the module text are to be interpreted as described + in RFC 2119. + + This version of this YANG module is part of RFC 8022; + see the RFC itself for full legal notices."; + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Identities */ + + identity ipv6-unicast { + base rt:ipv6; + description + "This identity represents the IPv6 unicast address family."; + } + + /* State data */ + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This leaf augments an IPv6 unicast route."; + leaf destination-prefix { + type inet:ipv6-prefix; + description + "IPv6 destination prefix."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augment 'simple-next-hop' case in IPv6 unicast routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This leaf augments the 'next-hop-list' case of IPv6 unicast + routes."; + leaf address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment + "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast RIBs."; + } + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv6-address; + description + "IPv6 destination address."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv6-prefix; + description + "IPv6 destination prefix."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augment 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augment 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + /* Configuration data */ + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:static-routes" { + description + "This augment defines the configuration of the 'static' + pseudo-protocol with data specific to IPv6 unicast."; + container ipv6 { + description + "Configuration of a 'static' pseudo-protocol instance + consists of a list of routes."; + list route { + key "destination-prefix"; + description + "A list of static routes."; + leaf destination-prefix { + type inet:ipv6-prefix; + mandatory "true"; + description + "IPv6 destination prefix."; + } + leaf description { + type string; + description + "Textual description of the route."; + } + container next-hop { + description + "Configuration of next-hop."; + uses rt:next-hop-content { + augment "next-hop-options/simple-next-hop" { + description + "Augment 'simple-next-hop' case in IPv6 static + routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + augment "next-hop-options/next-hop-list/next-hop-list/" + + "next-hop" { + description + "Augment 'next-hop-list' case in IPv6 static + routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-ipv6-unicast-routing@2018-03-13.yang b/models/ietf/RFC/ietf-ipv6-unicast-routing@2018-03-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..6a8e7e384f5724828c4b470c201877e0b05e33bd --- /dev/null +++ b/models/ietf/RFC/ietf-ipv6-unicast-routing@2018-03-13.yang @@ -0,0 +1,387 @@ +module ietf-ipv6-unicast-routing { + yang-version "1.1"; + namespace + "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; + prefix "v6ur"; + + import ietf-routing { + prefix "rt"; + description + "An 'ietf-routing' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-inet-types { + prefix "inet"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + include ietf-ipv6-router-advertisements { + revision-date 2018-03-13; + } + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com>"; + + description + "This YANG module augments the 'ietf-routing' module with basic + parameters for IPv6 unicast routing. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + /* Identities */ + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + identity ipv6-unicast { + base rt:ipv6; + description + "This identity represents the IPv6 unicast address family."; + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This leaf augments an IPv6 unicast route."; + leaf destination-prefix { + type inet:ipv6-prefix; + description + "IPv6 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'simple-next-hop' case in IPv6 unicast routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This leaf augments the 'next-hop-list' case of IPv6 unicast + routes."; + leaf address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment + "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast RIBs."; + } + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv6-address; + description + "IPv6 destination address."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv6-prefix; + description + "IPv6 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + /* Data node augmentations */ + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:static-routes" { + description + "This augment defines the 'static' pseudo-protocol + with data specific to IPv6 unicast."; + container ipv6 { + description + "Support for a 'static' pseudo-protocol instance + consists of a list of routes."; + list route { + key "destination-prefix"; + description + "A list of static routes."; + leaf destination-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "IPv6 destination prefix."; + } + leaf description { + type string; + description + "Textual description of the route."; + } + container next-hop { + description + "Next hop for the route."; + uses rt:next-hop-content { + augment "next-hop-options/simple-next-hop" { + description + "Augments the 'simple-next-hop' case in IPv6 static + routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + augment "next-hop-options/next-hop-list/next-hop-list/" + + "next-hop" { + description + "Augments the 'next-hop-list' case in IPv6 static + routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This leaf augments an IPv6 unicast route."; + leaf destination-prefix { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in IPv6 unicast routes."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This leaf augments the 'next-hop-list' case of IPv6 unicast + routes."; + leaf address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/" + + "rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast RIBs."; + } + status obsolete; + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 destination address."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } +} diff --git a/models/ietf/RFC/ietf-key-chain.yang b/models/ietf/RFC/ietf-key-chain.yang new file mode 100644 index 0000000000000000000000000000000000000000..445d1994a5ac57366078b198200a9e143d4ccda8 --- /dev/null +++ b/models/ietf/RFC/ietf-key-chain.yang @@ -0,0 +1,382 @@ +module ietf-key-chain { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-key-chain"; + prefix key-chain; + + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/group/rtgwg> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com> + Derek Yeung + <mailto:derek@arrcus.com> + Ing-Wher Chen + <mailto:Ing-Wher_Chen@jabail.com> + Jeffrey Zhang + <mailto:zzhang@juniper.net>"; + + description + "This YANG module defines the generic configuration + data for key chains. It is intended that the module + will be extended by vendors to define vendor-specific + key chain configuration parameters. + + Copyright (c) 2017 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8177; + see the RFC itself for full legal notices."; + + reference "RFC 8177"; + + revision 2017-06-15 { + description + "Initial RFC Revision"; + reference "RFC 8177: YANG Data Model for Key Chains"; + } + + feature hex-key-string { + description + "Support hexadecimal key string."; + } + + feature accept-tolerance { + description + "Support the tolerance or acceptance limit."; + } + + feature independent-send-accept-lifetime { + description + "Support for independent send and accept key lifetimes."; + } + + feature crypto-hmac-sha-1-12 { + description + "Support for TCP HMAC-SHA-1 12-byte digest hack."; + } + + feature cleartext { + description + "Support for cleartext algorithm. Usage is + NOT RECOMMENDED."; + } + + feature aes-cmac-prf-128 { + description + "Support for AES Cipher-based Message Authentication + Code Pseudorandom Function."; + } + + feature aes-key-wrap { + description + "Support for Advanced Encryption Standard (AES) Key Wrap."; + } + + feature replay-protection-only { + description + "Provide replay protection without any authentication + as required by protocols such as Bidirectional + Forwarding Detection (BFD)."; + } + identity crypto-algorithm { + description + "Base identity of cryptographic algorithm options."; + } + + identity hmac-sha-1-12 { + base crypto-algorithm; + if-feature "crypto-hmac-sha-1-12"; + description + "The HMAC-SHA1-12 algorithm."; + } + + identity aes-cmac-prf-128 { + base crypto-algorithm; + if-feature "aes-cmac-prf-128"; + description + "The AES-CMAC-PRF-128 algorithm - required by + RFC 5926 for TCP-AO key derivation functions."; + } + + identity md5 { + base crypto-algorithm; + description + "The MD5 algorithm."; + } + + identity sha-1 { + base crypto-algorithm; + description + "The SHA-1 algorithm."; + } + + identity hmac-sha-1 { + base crypto-algorithm; + description + "HMAC-SHA-1 authentication algorithm."; + } + + identity hmac-sha-256 { + base crypto-algorithm; + description + "HMAC-SHA-256 authentication algorithm."; + } + + identity hmac-sha-384 { + base crypto-algorithm; + description + "HMAC-SHA-384 authentication algorithm."; + } + + identity hmac-sha-512 { + base crypto-algorithm; + description + "HMAC-SHA-512 authentication algorithm."; + } + + identity cleartext { + base crypto-algorithm; + if-feature "cleartext"; + description + "cleartext."; + } + + identity replay-protection-only { + base crypto-algorithm; + if-feature "replay-protection-only"; + description + "Provide replay protection without any authentication as + required by protocols such as Bidirectional Forwarding + Detection (BFD)."; + } + + typedef key-chain-ref { + type leafref { + path + "/key-chain:key-chains/key-chain:key-chain/key-chain:name"; + } + description + "This type is used by data models that need to reference + configured key chains."; + } + + grouping lifetime { + description + "Key lifetime specification."; + choice lifetime { + default "always"; + description + "Options for specifying key accept or send lifetimes"; + case always { + leaf always { + type empty; + description + "Indicates key lifetime is always valid."; + } + } + case start-end-time { + leaf start-date-time { + type yang:date-and-time; + description + "Start time."; + } + choice end-time { + default "infinite"; + description + "End-time setting."; + case infinite { + leaf no-end-time { + type empty; + description + "Indicates key lifetime end-time is infinite."; + } + } + case duration { + leaf duration { + type uint32 { + range "1..2147483646"; + } + units "seconds"; + description + "Key lifetime duration, in seconds"; + } + } + case end-date-time { + leaf end-date-time { + type yang:date-and-time; + description + "End time."; + } + } + } + } + } + } + + container key-chains { + description + "All configured key-chains on the device."; + list key-chain { + key "name"; + description + "List of key-chains."; + leaf name { + type string; + description + "Name of the key-chain."; + } + leaf description { + type string; + description + "A description of the key-chain"; + } + container accept-tolerance { + if-feature "accept-tolerance"; + description + "Tolerance for key lifetime acceptance (seconds)."; + leaf duration { + type uint32; + units "seconds"; + default "0"; + description + "Tolerance range, in seconds."; + } + } + leaf last-modified-timestamp { + type yang:date-and-time; + config false; + description + "Timestamp of the most recent update to the key-chain"; + } + list key { + key "key-id"; + description + "Single key in key chain."; + leaf key-id { + type uint64; + description + "Numeric value uniquely identifying the key"; + } + container lifetime { + description + "Specify a key's lifetime."; + choice lifetime { + description + "Options for specification of send and accept + lifetimes."; + case send-and-accept-lifetime { + description + "Send and accept key have the same lifetime."; + container send-accept-lifetime { + description + "Single lifetime specification for both + send and accept lifetimes."; + uses lifetime; + } + } + case independent-send-accept-lifetime { + if-feature "independent-send-accept-lifetime"; + description + "Independent send and accept key lifetimes."; + container send-lifetime { + description + "Separate lifetime specification for send + lifetime."; + uses lifetime; + } + container accept-lifetime { + description + "Separate lifetime specification for accept + lifetime."; + uses lifetime; + } + } + } + } + leaf crypto-algorithm { + type identityref { + base crypto-algorithm; + } + mandatory true; + description + "Cryptographic algorithm associated with key."; + } + container key-string { + description + "The key string."; + nacm:default-deny-all; + choice key-string-style { + description + "Key string styles"; + case keystring { + leaf keystring { + type string; + description + "Key string in ASCII format."; + } + } + case hexadecimal { + if-feature "hex-key-string"; + leaf hexadecimal-string { + type yang:hex-string; + description + "Key in hexadecimal string format. When compared + to ASCII, specification in hexadecimal affords + greater key entropy with the same number of + internal key-string octets. Additionally, it + discourages usage of well-known words or + numbers."; + } + } + } + } + leaf send-lifetime-active { + type boolean; + config false; + description + "Indicates if the send lifetime of the + key-chain key is currently active."; + } + leaf accept-lifetime-active { + type boolean; + config false; + description + "Indicates if the accept lifetime of the + key-chain key is currently active."; + } + } + } + container aes-key-wrap { + if-feature "aes-key-wrap"; + description + "AES Key Wrap encryption for key-chain key-strings. The + encrypted key-strings are encoded as hexadecimal key + strings using the hex-key-string leaf."; + leaf enable { + type boolean; + default "false"; + description + "Enable AES Key Wrap encryption."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-key-chain@2017-06-15.yang b/models/ietf/RFC/ietf-key-chain@2017-06-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..445d1994a5ac57366078b198200a9e143d4ccda8 --- /dev/null +++ b/models/ietf/RFC/ietf-key-chain@2017-06-15.yang @@ -0,0 +1,382 @@ +module ietf-key-chain { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-key-chain"; + prefix key-chain; + + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/group/rtgwg> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com> + Derek Yeung + <mailto:derek@arrcus.com> + Ing-Wher Chen + <mailto:Ing-Wher_Chen@jabail.com> + Jeffrey Zhang + <mailto:zzhang@juniper.net>"; + + description + "This YANG module defines the generic configuration + data for key chains. It is intended that the module + will be extended by vendors to define vendor-specific + key chain configuration parameters. + + Copyright (c) 2017 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8177; + see the RFC itself for full legal notices."; + + reference "RFC 8177"; + + revision 2017-06-15 { + description + "Initial RFC Revision"; + reference "RFC 8177: YANG Data Model for Key Chains"; + } + + feature hex-key-string { + description + "Support hexadecimal key string."; + } + + feature accept-tolerance { + description + "Support the tolerance or acceptance limit."; + } + + feature independent-send-accept-lifetime { + description + "Support for independent send and accept key lifetimes."; + } + + feature crypto-hmac-sha-1-12 { + description + "Support for TCP HMAC-SHA-1 12-byte digest hack."; + } + + feature cleartext { + description + "Support for cleartext algorithm. Usage is + NOT RECOMMENDED."; + } + + feature aes-cmac-prf-128 { + description + "Support for AES Cipher-based Message Authentication + Code Pseudorandom Function."; + } + + feature aes-key-wrap { + description + "Support for Advanced Encryption Standard (AES) Key Wrap."; + } + + feature replay-protection-only { + description + "Provide replay protection without any authentication + as required by protocols such as Bidirectional + Forwarding Detection (BFD)."; + } + identity crypto-algorithm { + description + "Base identity of cryptographic algorithm options."; + } + + identity hmac-sha-1-12 { + base crypto-algorithm; + if-feature "crypto-hmac-sha-1-12"; + description + "The HMAC-SHA1-12 algorithm."; + } + + identity aes-cmac-prf-128 { + base crypto-algorithm; + if-feature "aes-cmac-prf-128"; + description + "The AES-CMAC-PRF-128 algorithm - required by + RFC 5926 for TCP-AO key derivation functions."; + } + + identity md5 { + base crypto-algorithm; + description + "The MD5 algorithm."; + } + + identity sha-1 { + base crypto-algorithm; + description + "The SHA-1 algorithm."; + } + + identity hmac-sha-1 { + base crypto-algorithm; + description + "HMAC-SHA-1 authentication algorithm."; + } + + identity hmac-sha-256 { + base crypto-algorithm; + description + "HMAC-SHA-256 authentication algorithm."; + } + + identity hmac-sha-384 { + base crypto-algorithm; + description + "HMAC-SHA-384 authentication algorithm."; + } + + identity hmac-sha-512 { + base crypto-algorithm; + description + "HMAC-SHA-512 authentication algorithm."; + } + + identity cleartext { + base crypto-algorithm; + if-feature "cleartext"; + description + "cleartext."; + } + + identity replay-protection-only { + base crypto-algorithm; + if-feature "replay-protection-only"; + description + "Provide replay protection without any authentication as + required by protocols such as Bidirectional Forwarding + Detection (BFD)."; + } + + typedef key-chain-ref { + type leafref { + path + "/key-chain:key-chains/key-chain:key-chain/key-chain:name"; + } + description + "This type is used by data models that need to reference + configured key chains."; + } + + grouping lifetime { + description + "Key lifetime specification."; + choice lifetime { + default "always"; + description + "Options for specifying key accept or send lifetimes"; + case always { + leaf always { + type empty; + description + "Indicates key lifetime is always valid."; + } + } + case start-end-time { + leaf start-date-time { + type yang:date-and-time; + description + "Start time."; + } + choice end-time { + default "infinite"; + description + "End-time setting."; + case infinite { + leaf no-end-time { + type empty; + description + "Indicates key lifetime end-time is infinite."; + } + } + case duration { + leaf duration { + type uint32 { + range "1..2147483646"; + } + units "seconds"; + description + "Key lifetime duration, in seconds"; + } + } + case end-date-time { + leaf end-date-time { + type yang:date-and-time; + description + "End time."; + } + } + } + } + } + } + + container key-chains { + description + "All configured key-chains on the device."; + list key-chain { + key "name"; + description + "List of key-chains."; + leaf name { + type string; + description + "Name of the key-chain."; + } + leaf description { + type string; + description + "A description of the key-chain"; + } + container accept-tolerance { + if-feature "accept-tolerance"; + description + "Tolerance for key lifetime acceptance (seconds)."; + leaf duration { + type uint32; + units "seconds"; + default "0"; + description + "Tolerance range, in seconds."; + } + } + leaf last-modified-timestamp { + type yang:date-and-time; + config false; + description + "Timestamp of the most recent update to the key-chain"; + } + list key { + key "key-id"; + description + "Single key in key chain."; + leaf key-id { + type uint64; + description + "Numeric value uniquely identifying the key"; + } + container lifetime { + description + "Specify a key's lifetime."; + choice lifetime { + description + "Options for specification of send and accept + lifetimes."; + case send-and-accept-lifetime { + description + "Send and accept key have the same lifetime."; + container send-accept-lifetime { + description + "Single lifetime specification for both + send and accept lifetimes."; + uses lifetime; + } + } + case independent-send-accept-lifetime { + if-feature "independent-send-accept-lifetime"; + description + "Independent send and accept key lifetimes."; + container send-lifetime { + description + "Separate lifetime specification for send + lifetime."; + uses lifetime; + } + container accept-lifetime { + description + "Separate lifetime specification for accept + lifetime."; + uses lifetime; + } + } + } + } + leaf crypto-algorithm { + type identityref { + base crypto-algorithm; + } + mandatory true; + description + "Cryptographic algorithm associated with key."; + } + container key-string { + description + "The key string."; + nacm:default-deny-all; + choice key-string-style { + description + "Key string styles"; + case keystring { + leaf keystring { + type string; + description + "Key string in ASCII format."; + } + } + case hexadecimal { + if-feature "hex-key-string"; + leaf hexadecimal-string { + type yang:hex-string; + description + "Key in hexadecimal string format. When compared + to ASCII, specification in hexadecimal affords + greater key entropy with the same number of + internal key-string octets. Additionally, it + discourages usage of well-known words or + numbers."; + } + } + } + } + leaf send-lifetime-active { + type boolean; + config false; + description + "Indicates if the send lifetime of the + key-chain key is currently active."; + } + leaf accept-lifetime-active { + type boolean; + config false; + description + "Indicates if the accept lifetime of the + key-chain key is currently active."; + } + } + } + container aes-key-wrap { + if-feature "aes-key-wrap"; + description + "AES Key Wrap encryption for key-chain key-strings. The + encrypted key-strings are encoded as hexadecimal key + strings using the hex-key-string leaf."; + leaf enable { + type boolean; + default "false"; + description + "Enable AES Key Wrap encryption."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-l2-topology-state.yang b/models/ietf/RFC/ietf-l2-topology-state.yang new file mode 100644 index 0000000000000000000000000000000000000000..aa0e05120f83125ca83c0e1c2f6b70fdd7abae4b --- /dev/null +++ b/models/ietf/RFC/ietf-l2-topology-state.yang @@ -0,0 +1,169 @@ +module ietf-l2-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology-state"; + prefix l2t-s; + + import ietf-network-state { + prefix nw-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology-state { + prefix nt-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-l2-topology { + prefix l2t; + reference + "RFC 8944: A YANG Data Model for Layer 2 Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Jie Dong + <mailto:jie.dong@huawei.com> + Editor: Xiugang Wei + <mailto:weixiugang@huawei.com> + Editor: Qin Wu + <mailto:bill.wu@huawei.com> + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + Editor: Anders Liu + <andersliu@tencent.com>"; + description + "This module defines a model for Layer 2 Network Topology + state, representing topology that either is learned or + results from applying topology that has been configured per + the 'ietf-l2-topology' model, mirroring the + corresponding data nodes in this model. + + This model mirrors 'ietf-l2-topology' but contains only + read-only state data. The model is not needed when the + underlying implementation infrastructure supports the + Network Management Datastore Architecture (NMDA). + + Copyright (c) 2020 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8944; see + the RFC itself for full legal notices."; + + revision 2020-11-15 { + description + "Initial revision."; + reference + "RFC 8944: A YANG Data Model for Layer 2 Network Topologies"; + } + + /* + * Data nodes + */ + + augment "/nw-s:networks/nw-s:network/nw-s:network-types" { + description + "Introduces a new network type for L2 topology."; + uses l2t:l2-network-type; + } + + augment "/nw-s:networks/nw-s:network" { + when 'nw-s:network-types/l2t-s:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Configuration parameters for the L2 network + as a whole."; + uses l2t:l2-topology-attributes; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node" { + when '../nw-s:network-types/l2t-s:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Configuration parameters for L2 at the node + level."; + uses l2t:l2-node-attributes; + } + + augment "/nw-s:networks/nw-s:network/nt-s:link" { + when '../nw-s:network-types/l2t-s:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Augments L2 topology link information."; + uses l2t:l2-link-attributes; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/" + + "nt-s:termination-point" { + when '../../nw-s:network-types/l2t-s:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Augments L2 topology termination point information."; + uses l2t:l2-termination-point-attributes; + } + + /* + * Notifications + */ + + notification l2-node-event { + description + "Notification event for L2 node."; + leaf event-type { + type l2t:l2-network-event-type; + description + "Event type."; + } + uses nw-s:node-ref; + uses l2t:l2-network-type; + uses l2t:l2-node-attributes; + } + + notification l2-link-event { + description + "Notification event for an L2 link."; + leaf event-type { + type l2t:l2-network-event-type; + description + "Event type."; + } + uses nt-s:link-ref; + uses l2t:l2-network-type; + uses l2t:l2-link-attributes; + } + + notification l2-termination-point-event { + description + "Notification event for L2 termination point."; + leaf event-type { + type l2t:l2-network-event-type; + description + "Event type."; + } + uses nt-s:tp-ref; + uses l2t:l2-network-type; + uses l2t:l2-termination-point-attributes; + } +} diff --git a/models/ietf/RFC/ietf-l2-topology-state@2020-11-15.yang b/models/ietf/RFC/ietf-l2-topology-state@2020-11-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..aa0e05120f83125ca83c0e1c2f6b70fdd7abae4b --- /dev/null +++ b/models/ietf/RFC/ietf-l2-topology-state@2020-11-15.yang @@ -0,0 +1,169 @@ +module ietf-l2-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology-state"; + prefix l2t-s; + + import ietf-network-state { + prefix nw-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology-state { + prefix nt-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-l2-topology { + prefix l2t; + reference + "RFC 8944: A YANG Data Model for Layer 2 Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Jie Dong + <mailto:jie.dong@huawei.com> + Editor: Xiugang Wei + <mailto:weixiugang@huawei.com> + Editor: Qin Wu + <mailto:bill.wu@huawei.com> + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + Editor: Anders Liu + <andersliu@tencent.com>"; + description + "This module defines a model for Layer 2 Network Topology + state, representing topology that either is learned or + results from applying topology that has been configured per + the 'ietf-l2-topology' model, mirroring the + corresponding data nodes in this model. + + This model mirrors 'ietf-l2-topology' but contains only + read-only state data. The model is not needed when the + underlying implementation infrastructure supports the + Network Management Datastore Architecture (NMDA). + + Copyright (c) 2020 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8944; see + the RFC itself for full legal notices."; + + revision 2020-11-15 { + description + "Initial revision."; + reference + "RFC 8944: A YANG Data Model for Layer 2 Network Topologies"; + } + + /* + * Data nodes + */ + + augment "/nw-s:networks/nw-s:network/nw-s:network-types" { + description + "Introduces a new network type for L2 topology."; + uses l2t:l2-network-type; + } + + augment "/nw-s:networks/nw-s:network" { + when 'nw-s:network-types/l2t-s:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Configuration parameters for the L2 network + as a whole."; + uses l2t:l2-topology-attributes; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node" { + when '../nw-s:network-types/l2t-s:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Configuration parameters for L2 at the node + level."; + uses l2t:l2-node-attributes; + } + + augment "/nw-s:networks/nw-s:network/nt-s:link" { + when '../nw-s:network-types/l2t-s:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Augments L2 topology link information."; + uses l2t:l2-link-attributes; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/" + + "nt-s:termination-point" { + when '../../nw-s:network-types/l2t-s:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Augments L2 topology termination point information."; + uses l2t:l2-termination-point-attributes; + } + + /* + * Notifications + */ + + notification l2-node-event { + description + "Notification event for L2 node."; + leaf event-type { + type l2t:l2-network-event-type; + description + "Event type."; + } + uses nw-s:node-ref; + uses l2t:l2-network-type; + uses l2t:l2-node-attributes; + } + + notification l2-link-event { + description + "Notification event for an L2 link."; + leaf event-type { + type l2t:l2-network-event-type; + description + "Event type."; + } + uses nt-s:link-ref; + uses l2t:l2-network-type; + uses l2t:l2-link-attributes; + } + + notification l2-termination-point-event { + description + "Notification event for L2 termination point."; + leaf event-type { + type l2t:l2-network-event-type; + description + "Event type."; + } + uses nt-s:tp-ref; + uses l2t:l2-network-type; + uses l2t:l2-termination-point-attributes; + } +} diff --git a/models/ietf/RFC/ietf-l2-topology.yang b/models/ietf/RFC/ietf-l2-topology.yang new file mode 100644 index 0000000000000000000000000000000000000000..576a194bc07ca5df6060a6db04200d130f7f7f21 --- /dev/null +++ b/models/ietf/RFC/ietf-l2-topology.yang @@ -0,0 +1,585 @@ +module ietf-l2-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology"; + prefix l2t; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991:Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991:Common YANG Data Types"; + } + import iana-if-type { + prefix ianaift; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + import ieee802-dot1q-types { + prefix dot1q-types; + reference + "IEEE Std 802.1Qcp-2018: Bridges and Bridged + Networks - Amendment: YANG Data Model"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs> + WG List: <mailto:i2rs@ietf.org> + + Editor: Jie Dong + <mailto:jie.dong@huawei.com> + + Editor: Xiugang Wei + <mailto:weixiugang@huawei.com> + + Editor: Qin Wu + <mailto:bill.wu@huawei.com> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Editor: Anders Liu + <mailto:andersliu@tencent.com>"; + description + "This module defines a basic model for the Layer 2 topology + of a network. + + Copyright (c) 2020 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8944; see + the RFC itself for full legal notices."; + + revision 2020-11-15 { + description + "Initial revision."; + reference + "RFC 8944: A YANG Data Model for Layer 2 Network Topologies"; + } + + feature VLAN { + description + "Enables VLAN tag support as defined in IEEE 802.1Q."; + reference + "IEEE Std 802.1Q-2014: Bridges and Bridged Networks"; + } + + feature QinQ { + description + "Enables QinQ double tag support as defined in IEEE 802.1ad."; + reference + "IEEE Std 802.1ad: Provider Bridges"; + } + + feature VXLAN { + description + "Enables VXLAN support as defined in RFC 7348."; + reference + "RFC 7348: Virtual eXtensible Local Area Network (VXLAN): + A Framework for Overlaying Virtualized Layer 2 + Networks over Layer 3 Networks"; + } + + identity flag-identity { + description + "Base type for flags."; + } + + identity eth-encapsulation-type { + base ianaift:iana-interface-type; + description + "Base identity from which specific Ethernet + encapsulation types are derived."; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + identity ethernet { + base eth-encapsulation-type; + description + "Native Ethernet encapsulation."; + } + + identity vlan { + base eth-encapsulation-type; + description + "VLAN encapsulation."; + } + + identity qinq { + base eth-encapsulation-type; + description + "QinQ encapsulation."; + } + + identity pbb { + base eth-encapsulation-type; + description + "Provider Backbone Bridging (PBB) encapsulation. + The PBB functions are developed in IEEE 802.1ah."; + } + + identity trill { + base eth-encapsulation-type; + description + "Transparent Interconnection of Lots of Links (TRILL) + encapsulation."; + } + + identity vpls { + base eth-encapsulation-type; + description + "Ethernet Virtual Private LAN Service (VPLS) + interface encapsulation."; + } + + identity vxlan { + base eth-encapsulation-type; + description + "VXLAN Media Access Control (MAC) in UDP encapsulation."; + reference + "RFC 7348: Virtual eXtensible Local Area Network (VXLAN): + A Framework for Overlaying Virtualized Layer 2 + Networks over Layer 3 Networks"; + } + + typedef vni { + type uint32 { + range "0..16777215"; + } + description + "VXLAN Network Identifier or VXLAN Segment ID. + It allows up to 16 M VXLAN segments to coexist + within the same administrative domain. + + The use of value '0' is implementation specific."; + reference + "RFC 7348: Virtual eXtensible Local Area Network (VXLAN): + A Framework for Overlaying Virtualized Layer 2 + Networks over Layer 3 Networks"; + } + + typedef l2-flag-type { + type identityref { + base flag-identity; + } + description + "Base type for L2 flags. One example of L2 flag + type is trill, which represents the trill topology + type."; + } + + typedef node-flag-type { + type identityref { + base flag-identity; + } + description + "Node flag attributes. The physical node can be + one example of a node flag attribute."; + } + + typedef link-flag-type { + type identityref { + base flag-identity; + } + description + "Link flag attributes. One example of a link flag + attribute is the pseudowire."; + } + + typedef l2-network-event-type { + type enumeration { + enum addition { + value 0; + description + "A Layer 2 node or link or termination-point + has been added."; + } + enum removal { + value 1; + description + "A Layer 2 node or link or termination-point + has been removed."; + } + enum update { + value 2; + description + "A Layer 2 node or link or termination-point + has been updated."; + } + } + description + "Layer 2 network event type for notifications."; + } + + typedef duplex-mode { + type enumeration { + enum full-duplex { + description + "Indicates full-duplex mode."; + } + enum half-duplex { + description + "Indicates half-duplex mode."; + } + } + description + "Indicates the type of the duplex mode."; + } + + grouping l2-network-type { + description + "Indicates the topology type to be L2."; + container l2-topology { + presence "Indicates L2 Network Topology."; + description + "The presence of the container node indicates + L2 Network Topology."; + } + } + + grouping l2-topology-attributes { + description + "L2 topology scope attributes."; + container l2-topology-attributes { + description + "Contains L2 topology attributes."; + leaf name { + type string; + description + "Name of the topology."; + } + leaf-list flags { + type l2-flag-type; + description + "Topology flags."; + } + } + } + + grouping l2-node-attributes { + description + "L2 node attributes."; + container l2-node-attributes { + description + "Contains L2 node attributes."; + leaf name { + type string; + description + "Node name."; + } + leaf-list flags { + type node-flag-type; + description + "Node flags. It can be used to indicate + node flag attributes."; + } + leaf-list bridge-id { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}'; + } + description + "This is the bridge identifier represented as a + hexadecimal 8-octet string. It has 4 bits of + priority, 12 bits of Multiple Spanning Tree + Instance Identifier (MSTI-ID), and the base bridge + identifier. There may be multiple for each + spanning tree instance."; + reference + "RFC 7727: Spanning Tree Protocol (STP) Application of + the Inter-Chassis Communication Protocol + (ICCP)"; + } + leaf-list management-address { + type inet:ip-address; + description + "IP address used for management purpose."; + } + leaf management-mac { + type yang:mac-address; + description + "This is a MAC address used for the bridge management. + It can be the Bridge Base VLAN ID (VID), interface + MAC address, or other. "; + } + leaf management-vlan { + type string; + description + "This is a VLAN that supports the management address. + The actual VLAN ID type and value would be a member of + this VLAN."; + } + } + } + + grouping l2-link-attributes { + description + "L2 link attributes."; + container l2-link-attributes { + description + "Contains L2 link attributes."; + leaf name { + type string; + description + "Link name."; + } + leaf-list flags { + type link-flag-type; + description + "Link flags. It can be used to indicate + link flag attributes."; + } + leaf rate { + type uint64; + units "Kbps"; + description + "Link rate. It specifies bandwidth requirements + associated with the specific link. The link + contains a source and a destination."; + } + leaf delay { + type uint32; + units "microseconds"; + description + "Unidirectional link delay in + microseconds."; + } + leaf auto-nego { + type boolean; + default "true"; + description + "Set to true if auto-negotiation is supported. + Set to false if auto-negotiation is not supported."; + } + leaf duplex { + type duplex-mode; + description + "Exposes the duplex mode, full-duplex or half-duplex."; + } + } + } + + grouping l2-termination-point-attributes { + description + "L2 termination point attributes."; + container l2-termination-point-attributes { + description + "Containing L2 termination point attributes."; + leaf interface-name { + type string; + description + "Name of the interface. The name can (but does not + have to) correspond to an interface reference of a + containing node's interface, i.e., the path name of a + corresponding interface data node on the containing + node is reminiscent of data type interface-ref defined + in RFC 8343. It should be noted that data type + interface-ref of RFC 8343 cannot be used directly, + as this data type is used to reference an interface + in a datastore of a single node in the network, not + to uniquely reference interfaces across a network."; + } + leaf mac-address { + type yang:mac-address; + description + "Interface MAC address for logical link control."; + } + leaf-list port-number { + type uint32; + description + " List of port numbers of the bridge ports for which each + entry contains bridge management information."; + } + leaf-list unnumbered-id { + type uint32; + description + "List of unnumbered interface identifiers. + The unnumbered interface identifier will correspond to + the ifIndex value of the interface, i.e., the ifIndex + value of the ifEntry that represents the interface in + implementations where the Interfaces Group MIB + (RFC 2863) is supported."; + } + leaf encapsulation-type { + type identityref { + base eth-encapsulation-type; + } + description + "Encapsulation type of this + termination point."; + } + leaf outer-tag { + if-feature "VLAN"; + type dot1q-types:vid-range-type; + description + "The outermost VLAN tag. It may include a list of VLAN + Ids or nonoverlapping VLAN ranges."; + } + leaf outer-tpid { + if-feature "QinQ"; + type dot1q-types:dot1q-tag-type; + description + "Identifies a specific 802.1Q tag type of outermost VLAN + tag."; + } + leaf inner-tag { + if-feature "VLAN"; + type dot1q-types:vid-range-type; + description + "The inner VLAN tag. It may include a list of VLAN + Ids or nonoverlapping VLAN ranges."; + } + leaf inner-tpid { + if-feature "QinQ"; + type dot1q-types:dot1q-tag-type; + description + "Identifies a specific 802.1Q tag type of inner VLAN tag."; + } + leaf lag { + type boolean; + default "false"; + description + "Defines whether lag is supported or not. + When it is set to true, the lag is supported."; + } + leaf-list member-link-tp { + when "../lag = 'true'" { + description + "Relevant only when the lag interface is supported."; + } + type leafref { + path "/nw:networks/nw:network/nw:node" + + "/nt:termination-point/nt:tp-id"; + } + description + "List of member link termination points associated with + specific L2 termination point."; + } + container vxlan { + when "derived-from-or-self(../encapsulation-type, " + + "'l2t:vxlan')" { + description + "Only applies when the type of the Ethernet + encapsulation is 'vxlan'."; + } + if-feature "VXLAN"; + leaf vni-id { + type vni; + description + "VXLAN Network Identifier (VNI)."; + } + description + "Vxlan encapsulation type."; + } + } + } + + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduces new network type for L2 topology."; + uses l2-network-type; + } + augment "/nw:networks/nw:network" { + when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Configuration parameters for the L2 network + as a whole."; + uses l2-topology-attributes; + } + augment "/nw:networks/nw:network/nw:node" { + when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Configuration parameters for L2 at the node + level."; + uses l2-node-attributes; + } + augment "/nw:networks/nw:network/nt:link" { + when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Augments L2 topology link information."; + uses l2-link-attributes; + } + augment "/nw:networks/nw:network/nw:node/nt:termination-point" { + when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Augments L2 topology termination point information."; + uses l2-termination-point-attributes; + } + + notification l2-node-event { + description + "Notification event for L2 node."; + leaf event-type { + type l2-network-event-type; + description + "Event type."; + } + uses nw:node-ref; + uses l2-network-type; + uses l2-node-attributes; + } + + notification l2-link-event { + description + "Notification event for L2 link."; + leaf event-type { + type l2-network-event-type; + description + "Event type."; + } + uses nt:link-ref; + uses l2-network-type; + uses l2-link-attributes; + } + + notification l2-termination-point-event { + description + "Notification event for L2 termination point."; + leaf event-type { + type l2-network-event-type; + description + "Event type."; + } + uses nt:tp-ref; + uses l2-network-type; + uses l2-termination-point-attributes; + } +} diff --git a/models/ietf/RFC/ietf-l2-topology@2020-11-15.yang b/models/ietf/RFC/ietf-l2-topology@2020-11-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..576a194bc07ca5df6060a6db04200d130f7f7f21 --- /dev/null +++ b/models/ietf/RFC/ietf-l2-topology@2020-11-15.yang @@ -0,0 +1,585 @@ +module ietf-l2-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology"; + prefix l2t; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991:Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991:Common YANG Data Types"; + } + import iana-if-type { + prefix ianaift; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + import ieee802-dot1q-types { + prefix dot1q-types; + reference + "IEEE Std 802.1Qcp-2018: Bridges and Bridged + Networks - Amendment: YANG Data Model"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs> + WG List: <mailto:i2rs@ietf.org> + + Editor: Jie Dong + <mailto:jie.dong@huawei.com> + + Editor: Xiugang Wei + <mailto:weixiugang@huawei.com> + + Editor: Qin Wu + <mailto:bill.wu@huawei.com> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Editor: Anders Liu + <mailto:andersliu@tencent.com>"; + description + "This module defines a basic model for the Layer 2 topology + of a network. + + Copyright (c) 2020 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8944; see + the RFC itself for full legal notices."; + + revision 2020-11-15 { + description + "Initial revision."; + reference + "RFC 8944: A YANG Data Model for Layer 2 Network Topologies"; + } + + feature VLAN { + description + "Enables VLAN tag support as defined in IEEE 802.1Q."; + reference + "IEEE Std 802.1Q-2014: Bridges and Bridged Networks"; + } + + feature QinQ { + description + "Enables QinQ double tag support as defined in IEEE 802.1ad."; + reference + "IEEE Std 802.1ad: Provider Bridges"; + } + + feature VXLAN { + description + "Enables VXLAN support as defined in RFC 7348."; + reference + "RFC 7348: Virtual eXtensible Local Area Network (VXLAN): + A Framework for Overlaying Virtualized Layer 2 + Networks over Layer 3 Networks"; + } + + identity flag-identity { + description + "Base type for flags."; + } + + identity eth-encapsulation-type { + base ianaift:iana-interface-type; + description + "Base identity from which specific Ethernet + encapsulation types are derived."; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + identity ethernet { + base eth-encapsulation-type; + description + "Native Ethernet encapsulation."; + } + + identity vlan { + base eth-encapsulation-type; + description + "VLAN encapsulation."; + } + + identity qinq { + base eth-encapsulation-type; + description + "QinQ encapsulation."; + } + + identity pbb { + base eth-encapsulation-type; + description + "Provider Backbone Bridging (PBB) encapsulation. + The PBB functions are developed in IEEE 802.1ah."; + } + + identity trill { + base eth-encapsulation-type; + description + "Transparent Interconnection of Lots of Links (TRILL) + encapsulation."; + } + + identity vpls { + base eth-encapsulation-type; + description + "Ethernet Virtual Private LAN Service (VPLS) + interface encapsulation."; + } + + identity vxlan { + base eth-encapsulation-type; + description + "VXLAN Media Access Control (MAC) in UDP encapsulation."; + reference + "RFC 7348: Virtual eXtensible Local Area Network (VXLAN): + A Framework for Overlaying Virtualized Layer 2 + Networks over Layer 3 Networks"; + } + + typedef vni { + type uint32 { + range "0..16777215"; + } + description + "VXLAN Network Identifier or VXLAN Segment ID. + It allows up to 16 M VXLAN segments to coexist + within the same administrative domain. + + The use of value '0' is implementation specific."; + reference + "RFC 7348: Virtual eXtensible Local Area Network (VXLAN): + A Framework for Overlaying Virtualized Layer 2 + Networks over Layer 3 Networks"; + } + + typedef l2-flag-type { + type identityref { + base flag-identity; + } + description + "Base type for L2 flags. One example of L2 flag + type is trill, which represents the trill topology + type."; + } + + typedef node-flag-type { + type identityref { + base flag-identity; + } + description + "Node flag attributes. The physical node can be + one example of a node flag attribute."; + } + + typedef link-flag-type { + type identityref { + base flag-identity; + } + description + "Link flag attributes. One example of a link flag + attribute is the pseudowire."; + } + + typedef l2-network-event-type { + type enumeration { + enum addition { + value 0; + description + "A Layer 2 node or link or termination-point + has been added."; + } + enum removal { + value 1; + description + "A Layer 2 node or link or termination-point + has been removed."; + } + enum update { + value 2; + description + "A Layer 2 node or link or termination-point + has been updated."; + } + } + description + "Layer 2 network event type for notifications."; + } + + typedef duplex-mode { + type enumeration { + enum full-duplex { + description + "Indicates full-duplex mode."; + } + enum half-duplex { + description + "Indicates half-duplex mode."; + } + } + description + "Indicates the type of the duplex mode."; + } + + grouping l2-network-type { + description + "Indicates the topology type to be L2."; + container l2-topology { + presence "Indicates L2 Network Topology."; + description + "The presence of the container node indicates + L2 Network Topology."; + } + } + + grouping l2-topology-attributes { + description + "L2 topology scope attributes."; + container l2-topology-attributes { + description + "Contains L2 topology attributes."; + leaf name { + type string; + description + "Name of the topology."; + } + leaf-list flags { + type l2-flag-type; + description + "Topology flags."; + } + } + } + + grouping l2-node-attributes { + description + "L2 node attributes."; + container l2-node-attributes { + description + "Contains L2 node attributes."; + leaf name { + type string; + description + "Node name."; + } + leaf-list flags { + type node-flag-type; + description + "Node flags. It can be used to indicate + node flag attributes."; + } + leaf-list bridge-id { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}'; + } + description + "This is the bridge identifier represented as a + hexadecimal 8-octet string. It has 4 bits of + priority, 12 bits of Multiple Spanning Tree + Instance Identifier (MSTI-ID), and the base bridge + identifier. There may be multiple for each + spanning tree instance."; + reference + "RFC 7727: Spanning Tree Protocol (STP) Application of + the Inter-Chassis Communication Protocol + (ICCP)"; + } + leaf-list management-address { + type inet:ip-address; + description + "IP address used for management purpose."; + } + leaf management-mac { + type yang:mac-address; + description + "This is a MAC address used for the bridge management. + It can be the Bridge Base VLAN ID (VID), interface + MAC address, or other. "; + } + leaf management-vlan { + type string; + description + "This is a VLAN that supports the management address. + The actual VLAN ID type and value would be a member of + this VLAN."; + } + } + } + + grouping l2-link-attributes { + description + "L2 link attributes."; + container l2-link-attributes { + description + "Contains L2 link attributes."; + leaf name { + type string; + description + "Link name."; + } + leaf-list flags { + type link-flag-type; + description + "Link flags. It can be used to indicate + link flag attributes."; + } + leaf rate { + type uint64; + units "Kbps"; + description + "Link rate. It specifies bandwidth requirements + associated with the specific link. The link + contains a source and a destination."; + } + leaf delay { + type uint32; + units "microseconds"; + description + "Unidirectional link delay in + microseconds."; + } + leaf auto-nego { + type boolean; + default "true"; + description + "Set to true if auto-negotiation is supported. + Set to false if auto-negotiation is not supported."; + } + leaf duplex { + type duplex-mode; + description + "Exposes the duplex mode, full-duplex or half-duplex."; + } + } + } + + grouping l2-termination-point-attributes { + description + "L2 termination point attributes."; + container l2-termination-point-attributes { + description + "Containing L2 termination point attributes."; + leaf interface-name { + type string; + description + "Name of the interface. The name can (but does not + have to) correspond to an interface reference of a + containing node's interface, i.e., the path name of a + corresponding interface data node on the containing + node is reminiscent of data type interface-ref defined + in RFC 8343. It should be noted that data type + interface-ref of RFC 8343 cannot be used directly, + as this data type is used to reference an interface + in a datastore of a single node in the network, not + to uniquely reference interfaces across a network."; + } + leaf mac-address { + type yang:mac-address; + description + "Interface MAC address for logical link control."; + } + leaf-list port-number { + type uint32; + description + " List of port numbers of the bridge ports for which each + entry contains bridge management information."; + } + leaf-list unnumbered-id { + type uint32; + description + "List of unnumbered interface identifiers. + The unnumbered interface identifier will correspond to + the ifIndex value of the interface, i.e., the ifIndex + value of the ifEntry that represents the interface in + implementations where the Interfaces Group MIB + (RFC 2863) is supported."; + } + leaf encapsulation-type { + type identityref { + base eth-encapsulation-type; + } + description + "Encapsulation type of this + termination point."; + } + leaf outer-tag { + if-feature "VLAN"; + type dot1q-types:vid-range-type; + description + "The outermost VLAN tag. It may include a list of VLAN + Ids or nonoverlapping VLAN ranges."; + } + leaf outer-tpid { + if-feature "QinQ"; + type dot1q-types:dot1q-tag-type; + description + "Identifies a specific 802.1Q tag type of outermost VLAN + tag."; + } + leaf inner-tag { + if-feature "VLAN"; + type dot1q-types:vid-range-type; + description + "The inner VLAN tag. It may include a list of VLAN + Ids or nonoverlapping VLAN ranges."; + } + leaf inner-tpid { + if-feature "QinQ"; + type dot1q-types:dot1q-tag-type; + description + "Identifies a specific 802.1Q tag type of inner VLAN tag."; + } + leaf lag { + type boolean; + default "false"; + description + "Defines whether lag is supported or not. + When it is set to true, the lag is supported."; + } + leaf-list member-link-tp { + when "../lag = 'true'" { + description + "Relevant only when the lag interface is supported."; + } + type leafref { + path "/nw:networks/nw:network/nw:node" + + "/nt:termination-point/nt:tp-id"; + } + description + "List of member link termination points associated with + specific L2 termination point."; + } + container vxlan { + when "derived-from-or-self(../encapsulation-type, " + + "'l2t:vxlan')" { + description + "Only applies when the type of the Ethernet + encapsulation is 'vxlan'."; + } + if-feature "VXLAN"; + leaf vni-id { + type vni; + description + "VXLAN Network Identifier (VNI)."; + } + description + "Vxlan encapsulation type."; + } + } + } + + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduces new network type for L2 topology."; + uses l2-network-type; + } + augment "/nw:networks/nw:network" { + when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Configuration parameters for the L2 network + as a whole."; + uses l2-topology-attributes; + } + augment "/nw:networks/nw:network/nw:node" { + when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Configuration parameters for L2 at the node + level."; + uses l2-node-attributes; + } + augment "/nw:networks/nw:network/nt:link" { + when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Augments L2 topology link information."; + uses l2-link-attributes; + } + augment "/nw:networks/nw:network/nw:node/nt:termination-point" { + when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' { + description + "Augmentation parameters apply only for networks + with L2 topology."; + } + description + "Augments L2 topology termination point information."; + uses l2-termination-point-attributes; + } + + notification l2-node-event { + description + "Notification event for L2 node."; + leaf event-type { + type l2-network-event-type; + description + "Event type."; + } + uses nw:node-ref; + uses l2-network-type; + uses l2-node-attributes; + } + + notification l2-link-event { + description + "Notification event for L2 link."; + leaf event-type { + type l2-network-event-type; + description + "Event type."; + } + uses nt:link-ref; + uses l2-network-type; + uses l2-link-attributes; + } + + notification l2-termination-point-event { + description + "Notification event for L2 termination point."; + leaf event-type { + type l2-network-event-type; + description + "Event type."; + } + uses nt:tp-ref; + uses l2-network-type; + uses l2-termination-point-attributes; + } +} diff --git a/models/ietf/RFC/ietf-l2vpn-svc.yang b/models/ietf/RFC/ietf-l2vpn-svc.yang new file mode 100644 index 0000000000000000000000000000000000000000..6cc1775351d73c0421589c2bc53eb62908dac055 --- /dev/null +++ b/models/ietf/RFC/ietf-l2vpn-svc.yang @@ -0,0 +1,3318 @@ +module ietf-l2vpn-svc { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l2vpn-svc"; + prefix l2vpn-svc; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + + organization + "IETF L2SM Working Group."; + contact + "WG Web: <https://datatracker.ietf.org/wg/l2sm/> + WG List: <mailto:l2sm@ietf.org> + Editor: Giuseppe Fioccola + <mailto:giuseppe.fioccola@tim.it>"; + description + "This YANG module defines a generic service configuration model + for Layer 2 VPN services common across all vendor + implementations. + + Copyright (c) 2018 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 Simplified 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 8466; + see the RFC itself for full legal notices."; + + revision 2018-10-09 { + description + "Initial revision."; + reference + "RFC 8466: A YANG Data Model for Layer 2 Virtual Private + Network (L2VPN) Service Delivery"; + } + + feature carrierscarrier { + description + "Enables the support of carriers' carriers (CsC)."; + } + + feature ethernet-oam { + description + "Enables the support of Ethernet Service OAM."; + } + + feature extranet-vpn { + description + "Enables the support of extranet VPNs."; + } + + feature l2cp-control { + description + "Enables the support of L2CP control."; + } + + feature input-bw { + description + "Enables the support of input bandwidth in a VPN."; + } + + feature output-bw { + description + "Enables the support of output bandwidth in a VPN."; + } + + feature uni-list { + description + "Enables the support of a list of UNIs in a VPN."; + } + + feature cloud-access { + description + "Allows the VPN to connect to a Cloud Service Provider (CSP) + or an ISP."; + } + + feature oam-3ah { + description + "Enables the support of OAM 802.3ah."; + } + + feature micro-bfd { + description + "Enables the support of micro-BFD."; + } + + feature bfd { + description + "Enables the support of BFD."; + } + + feature signaling-options { + description + "Enables the support of signaling options."; + } + + feature site-diversity { + description + "Enables the support of site diversity constraints in a VPN."; + } + + feature encryption { + description + "Enables the support of encryption."; + } + + feature always-on { + description + "Enables support for the 'always-on' access constraint."; + } + + feature requested-type { + description + "Enables support for the 'requested-type' access constraint."; + } + + feature bearer-reference { + description + "Enables support for the 'bearer-reference' access + constraint."; + } + + feature qos { + description + "Enables support for QoS."; + } + + feature qos-custom { + description + "Enables the support of a custom QoS profile."; + } + + feature lag-interface { + description + "Enables LAG interfaces."; + } + + feature vlan { + description + "Enables the support of VLANs."; + } + + feature dot1q { + description + "Enables the support of dot1Q."; + } + feature qinq { + description + "Enables the support of QinQ."; + } + + feature qinany { + description + "Enables the support of QinAny."; + } + + feature vxlan { + description + "Enables the support of VXLANs."; + } + + feature lan-tag { + description + "Enables LAN tag support in a VPN."; + } + + feature target-sites { + description + "Enables the support of the 'target-sites' + match-flow parameter."; + } + + feature bum { + description + "Enables BUM capabilities in a VPN."; + } + + feature mac-loop-prevention { + description + "Enables the MAC loop-prevention capability in a VPN."; + } + + feature lacp { + description + "Enables the Link Aggregation Control Protocol (LACP) + capability in a VPN."; + } + + feature mac-addr-limit { + description + "Enables the MAC address limit capability in a VPN."; + } + + feature acl { + description + "Enables the ACL capability in a VPN."; + } + + feature cfm { + description + "Enables the 802.1ag CFM capability in a VPN."; + } + + feature y-1731 { + description + "Enables the Y.1731 capability in a VPN."; + } + + typedef svc-id { + type string; + description + "Defines the type of service component identifier."; + } + + typedef ccm-priority-type { + type uint8 { + range "0..7"; + } + description + "A 3-bit priority value to be used in the VLAN tag, + if present in the transmitted frame."; + } + + typedef control-mode { + type enumeration { + enum peer { + description + "'peer' mode, i.e., participate in the protocol towards + the CE. Peering is common for LACP and the Ethernet + Local Management Interface (E-LMI) and, occasionally, + for LLDP. For VPLSs and VPWSs, the subscriber can also + request that the SP peer enable spanning tree."; + } + enum tunnel { + description + "'tunnel' mode, i.e., pass to the egress or destination + site. For EPLs, the expectation is that L2CP frames are + tunneled."; + } + enum discard { + description + "'discard' mode, i.e., discard the frame."; + } + } + description + "Defines the type of control mode on L2CP protocols."; + } + + typedef neg-mode { + type enumeration { + enum full-duplex { + description + "Defines full-duplex mode."; + } + enum auto-neg { + description + "Defines auto-negotiation mode."; + } + } + description + "Defines the type of negotiation mode."; + } + + identity site-network-access-type { + description + "Base identity for the site-network-access type."; + } + + identity point-to-point { + base site-network-access-type; + description + "Identity for a point-to-point connection."; + } + + identity multipoint { + base site-network-access-type; + description + "Identity for a multipoint connection, e.g., + an Ethernet broadcast segment."; + } + + identity tag-type { + description + "Base identity from which all tag types are derived."; + } + + identity c-vlan { + base tag-type; + description + "A CVLAN tag, normally using the 0x8100 Ethertype."; + } + + identity s-vlan { + base tag-type; + description + "An SVLAN tag."; + } + + identity c-s-vlan { + base tag-type; + description + "Using both a CVLAN tag and an SVLAN tag."; + } + + identity multicast-tree-type { + description + "Base identity for the multicast tree type."; + } + + identity ssm-tree-type { + base multicast-tree-type; + description + "Identity for the Source-Specific Multicast (SSM) tree type."; + reference "RFC 8299: YANG Data Model for L3VPN Service Delivery"; + } + + identity asm-tree-type { + base multicast-tree-type; + description + "Identity for the Any-Source Multicast (ASM) tree type."; + reference "RFC 8299: YANG Data Model for L3VPN Service Delivery"; + } + + identity bidir-tree-type { + base multicast-tree-type; + description + "Identity for the bidirectional tree type."; + reference "RFC 8299: YANG Data Model for L3VPN Service Delivery"; + } + + identity multicast-gp-address-mapping { + description + "Identity for mapping type."; + } + + identity static-mapping { + base multicast-gp-address-mapping; + description + "Identity for static mapping, i.e., attach the interface + to the multicast group as a static member."; + } + + identity dynamic-mapping { + base multicast-gp-address-mapping; + description + "Identity for dynamic mapping, i.e., an interface was added + to the multicast group as a result of snooping."; + } + + identity tf-type { + description + "Identity for the traffic type."; + } + + identity multicast-traffic { + base tf-type; + description + "Identity for multicast traffic."; + } + + identity broadcast-traffic { + base tf-type; + description + "Identity for broadcast traffic."; + } + + identity unknown-unicast-traffic { + base tf-type; + description + "Identity for unknown unicast traffic."; + } + + identity encapsulation-type { + description + "Identity for the encapsulation type."; + } + + identity ethernet { + base encapsulation-type; + description + "Identity for Ethernet type."; + } + + identity vlan { + base encapsulation-type; + description + "Identity for the VLAN type."; + } + + identity carrierscarrier-type { + description + "Identity of the CsC type."; + } + + identity ldp { + base carrierscarrier-type; + description + "Use LDP as the signaling protocol + between the PE and the CE."; + } + + identity bgp { + base carrierscarrier-type; + description + "Use BGP (as per RFC 8277) as the signaling protocol + between the PE and the CE. + In this case, BGP must also be configured as + the routing protocol."; + } + + identity eth-inf-type { + description + "Identity of the Ethernet interface type."; + } + + identity tagged { + base eth-inf-type; + description + "Identity of the tagged interface type."; + } + + identity untagged { + base eth-inf-type; + description + "Identity of the untagged interface type."; + } + + identity lag { + base eth-inf-type; + description + "Identity of the LAG interface type."; + } + + identity bw-type { + description + "Identity of the bandwidth type."; + } + + identity bw-per-cos { + base bw-type; + description + "Bandwidth is per CoS."; + } + + identity bw-per-port { + base bw-type; + description + "Bandwidth is per site network access."; + } + + identity bw-per-site { + base bw-type; + description + "Bandwidth is per site. It is applicable to + all the site network accesses within the site."; + } + + identity bw-per-svc { + base bw-type; + description + "Bandwidth is per VPN service."; + } + + identity site-vpn-flavor { + description + "Base identity for the site VPN service flavor."; + } + + identity site-vpn-flavor-single { + base site-vpn-flavor; + description + "Identity for the site VPN service flavor. + Used when the site belongs to only one VPN."; + } + + identity site-vpn-flavor-multi { + base site-vpn-flavor; + description + "Identity for the site VPN service flavor. + Used when a logical connection of a site + belongs to multiple VPNs."; + } + identity site-vpn-flavor-nni { + base site-vpn-flavor; + description + "Identity for the site VPN service flavor. + Used to describe an NNI option A connection."; + } + + identity service-type { + description + "Base identity of the service type."; + } + + identity vpws { + base service-type; + description + "Point-to-point Virtual Private Wire Service (VPWS) + service type."; + } + + identity pwe3 { + base service-type; + description + "Pseudowire Emulation Edge to Edge (PWE3) service type."; + } + + identity ldp-l2tp-vpls { + base service-type; + description + "LDP-based or L2TP-based multipoint Virtual Private LAN + Service (VPLS) service type. This VPLS uses LDP-signaled + Pseudowires or L2TP-signaled Pseudowires."; + } + + identity bgp-vpls { + base service-type; + description + "BGP-based multipoint VPLS service type. This VPLS uses a + BGP control plane as described in RFCs 4761 and 6624."; + } + + identity vpws-evpn { + base service-type; + description + "VPWS service type using Ethernet VPNs (EVPNs) + as specified in RFC 7432."; + } + + identity pbb-evpn { + base service-type; + description + "Provider Backbone Bridge (PBB) service type using + EVPNs as specified in RFC 7432."; + } + + identity bundling-type { + description + "The base identity for the bundling type. It supports + multiple CE-VLANs associated with an L2VPN service or + all CE-VLANs associated with an L2VPN service."; + } + + identity multi-svc-bundling { + base bundling-type; + description + "Identity for multi-service bundling, i.e., + multiple CE-VLAN IDs can be associated with an + L2VPN service at a site."; + } + + identity one2one-bundling { + base bundling-type; + description + "Identity for one-to-one service bundling, i.e., + each L2VPN can be associated with only one CE-VLAN ID + at a site."; + } + + identity all2one-bundling { + base bundling-type; + description + "Identity for all-to-one bundling, i.e., all CE-VLAN IDs + are mapped to one L2VPN service."; + } + + identity color-id { + description + "Base identity of the color ID."; + } + + identity color-id-cvlan { + base color-id; + description + "Identity of the color ID based on a CVLAN."; + } + + identity cos-id { + description + "Identity of the CoS ID."; + } + + identity cos-id-pcp { + base cos-id; + description + "Identity of the CoS ID based on the + Port Control Protocol (PCP)."; + } + + identity cos-id-dscp { + base cos-id; + description + "Identity of the CoS ID based on DSCP."; + } + + identity color-type { + description + "Identity of color types."; + } + + identity green { + base color-type; + description + "Identity of the 'green' color type."; + } + + identity yellow { + base color-type; + description + "Identity of the 'yellow' color type."; + } + + identity red { + base color-type; + description + "Identity of the 'red' color type."; + } + + identity policing { + description + "Identity of the type of policing applied."; + } + + identity one-rate-two-color { + base policing; + description + "Identity of one-rate, two-color (1R2C)."; + } + + identity two-rate-three-color { + base policing; + description + "Identity of two-rate, three-color (2R3C)."; + } + + identity bum-type { + description + "Identity of the BUM type."; + } + + identity broadcast { + base bum-type; + description + "Identity of broadcast."; + } + + identity unicast { + base bum-type; + description + "Identity of unicast."; + } + + identity multicast { + base bum-type; + description + "Identity of multicast."; + } + + identity loop-prevention-type { + description + "Identity of loop prevention."; + } + + identity shut { + base loop-prevention-type; + description + "Identity of shut protection."; + } + + identity trap { + base loop-prevention-type; + description + "Identity of trap protection."; + } + identity lacp-state { + description + "Identity of the LACP state."; + } + + identity lacp-on { + base lacp-state; + description + "Identity of LACP on."; + } + + identity lacp-off { + base lacp-state; + description + "Identity of LACP off."; + } + + identity lacp-mode { + description + "Identity of the LACP mode."; + } + + identity lacp-passive { + base lacp-mode; + description + "Identity of LACP passive."; + } + + identity lacp-active { + base lacp-mode; + description + "Identity of LACP active."; + } + + identity lacp-speed { + description + "Identity of the LACP speed."; + } + + identity lacp-fast { + base lacp-speed; + description + "Identity of LACP fast."; + } + + identity lacp-slow { + base lacp-speed; + description + "Identity of LACP slow."; + } + + identity bw-direction { + description + "Identity for the bandwidth direction."; + } + + identity input-bw { + base bw-direction; + description + "Identity for the input bandwidth."; + } + + identity output-bw { + base bw-direction; + description + "Identity for the output bandwidth."; + } + + identity management { + description + "Base identity for the site management scheme."; + } + + identity co-managed { + base management; + description + "Identity for a co-managed site."; + } + + identity customer-managed { + base management; + description + "Identity for a customer-managed site."; + } + + identity provider-managed { + base management; + description + "Identity for a provider-managed site."; + } + + identity address-family { + description + "Identity for an address family."; + } + + identity ipv4 { + base address-family; + description + "Identity for an IPv4 address family."; + } + + identity ipv6 { + base address-family; + description + "Identity for an IPv6 address family."; + } + + identity vpn-topology { + description + "Base identity for the VPN topology."; + } + + identity any-to-any { + base vpn-topology; + description + "Identity for the any-to-any VPN topology."; + } + + identity hub-spoke { + base vpn-topology; + description + "Identity for the Hub-and-Spoke VPN topology."; + } + + identity hub-spoke-disjoint { + base vpn-topology; + description + "Identity for the Hub-and-Spoke VPN topology, + where Hubs cannot communicate with each other."; + } + + identity site-role { + description + "Base identity for a site type."; + } + + identity any-to-any-role { + base site-role; + description + "Site in an any-to-any L2VPN."; + } + + identity spoke-role { + base site-role; + description + "Spoke site in a Hub-and-Spoke L2VPN."; + } + + identity hub-role { + base site-role; + description + "Hub site in a Hub-and-Spoke L2VPN."; + } + + identity pm-type { + description + "Performance-monitoring type."; + } + + identity loss { + base pm-type; + description + "Loss measurement."; + } + + identity delay { + base pm-type; + description + "Delay measurement."; + } + + identity fault-alarm-defect-type { + description + "Indicates the alarm-priority defect (i.e., the + lowest-priority defect that is allowed to + generate a fault alarm)."; + } + + identity remote-rdi { + base fault-alarm-defect-type; + description + "Indicates the aggregate health + of the Remote MEPs."; + } + + identity remote-mac-error { + base fault-alarm-defect-type; + description + "Indicates that one or more of the Remote MEPs are + reporting a failure in their Port Status TLVs or + Interface Status TLVs."; + } + + identity remote-invalid-ccm { + base fault-alarm-defect-type; + description + "Indicates that at least one of the Remote MEP + state machines is not receiving valid + Continuity Check Messages (CCMs) from its Remote MEP."; + } + + identity invalid-ccm { + base fault-alarm-defect-type; + description + "Indicates that one or more invalid CCMs have been + received and that a period of time 3.5 times the length + of those CCMs' transmission intervals has not yet expired."; + } + + identity cross-connect-ccm { + base fault-alarm-defect-type; + description + "Indicates that one or more cross-connect CCMs have been + received and that 3.5 times the period of at least one of + those CCMs' transmission intervals has not yet expired."; + } + + identity frame-delivery-mode { + description + "Delivery types."; + } + + identity discard { + base frame-delivery-mode; + description + "Service frames are discarded."; + } + + identity unconditional { + base frame-delivery-mode; + description + "Service frames are unconditionally delivered to the + destination site."; + } + + identity unknown-discard { + base frame-delivery-mode; + description + "Service frames are conditionally delivered to the + destination site. Packets with unknown destination addresses + will be discarded."; + } + + identity placement-diversity { + description + "Base identity for site placement constraints."; + } + + identity bearer-diverse { + base placement-diversity; + description + "Identity for bearer diversity. + The bearers should not use common elements."; + } + + identity pe-diverse { + base placement-diversity; + description + "Identity for PE diversity."; + } + + identity pop-diverse { + base placement-diversity; + description + "Identity for POP diversity."; + } + + identity linecard-diverse { + base placement-diversity; + description + "Identity for linecard diversity."; + } + + identity same-pe { + base placement-diversity; + description + "Identity for having sites connected on the same PE."; + } + + identity same-bearer { + base placement-diversity; + description + "Identity for having sites connected using the same bearer."; + } + + identity tagged-inf-type { + description + "Identity for the tagged interface type."; + } + + identity priority-tagged { + base tagged-inf-type; + description + "Identity for the priority-tagged interface."; + } + + identity qinq { + base tagged-inf-type; + description + "Identity for the QinQ tagged interface."; + } + + identity dot1q { + base tagged-inf-type; + description + "Identity for the dot1Q VLAN tagged interface."; + } + + identity qinany { + base tagged-inf-type; + description + "Identity for the QinAny tagged interface."; + } + + identity vxlan { + base tagged-inf-type; + description + "Identity for the VXLAN tagged interface."; + } + + identity provision-model { + description + "Base identity for the provision model."; + } + + identity single-side-provision { + description + "Identity for single-sided provisioning with discovery."; + } + + identity doubled-side-provision { + description + "Identity for double-sided provisioning."; + } + + identity mac-learning-mode { + description + "MAC learning mode."; + } + + identity data-plane { + base mac-learning-mode; + description + "User MAC addresses are learned through ARP broadcast."; + } + + identity control-plane { + base mac-learning-mode; + description + "User MAC addresses are advertised through EVPN-BGP."; + } + + identity vpn-policy-filter-type { + description + "Base identity for the filter type."; + } + + identity lan { + base vpn-policy-filter-type; + description + "Identity for a LAN tag filter type."; + } + + identity mac-action { + description + "Base identity for a MAC action."; + } + + identity drop { + base mac-action; + description + "Identity for dropping a packet."; + } + + identity flood { + base mac-action; + description + "Identity for packet flooding."; + } + + identity warning { + base mac-action; + description + "Identity for sending a warning log message."; + } + + identity qos-profile-direction { + description + "Base identity for the QoS-profile direction."; + } + + identity site-to-wan { + base qos-profile-direction; + description + "Identity for the site-to-WAN direction."; + } + + identity wan-to-site { + base qos-profile-direction; + description + "Identity for the WAN-to-site direction."; + } + + identity bidirectional { + base qos-profile-direction; + description + "Identity for both the WAN-to-site direction + and the site-to-WAN direction."; + } + + identity vxlan-peer-mode { + description + "Base identity for the VXLAN peer mode."; + } + + identity static-mode { + base vxlan-peer-mode; + description + "Identity for VXLAN access in the static mode."; + } + + identity bgp-mode { + base vxlan-peer-mode; + description + "Identity for VXLAN access by BGP EVPN learning."; + } + + identity customer-application { + description + "Base identity for a customer application."; + } + identity web { + base customer-application; + description + "Identity for a web application (e.g., HTTP, HTTPS)."; + } + + identity mail { + base customer-application; + description + "Identity for a mail application."; + } + + identity file-transfer { + base customer-application; + description + "Identity for a file-transfer application + (e.g., FTP, SFTP)."; + } + + identity database { + base customer-application; + description + "Identity for a database application."; + } + + identity social { + base customer-application; + description + "Identity for a social-network application."; + } + + identity games { + base customer-application; + description + "Identity for a gaming application."; + } + + identity p2p { + base customer-application; + description + "Identity for a peer-to-peer application."; + } + + identity network-management { + base customer-application; + description + "Identity for a management application + (e.g., Telnet, syslog, SNMP)."; + } + + identity voice { + base customer-application; + description + "Identity for a voice application."; + } + + identity video { + base customer-application; + description + "Identity for a videoconference application."; + } + + identity embb { + base customer-application; + description + "Identity for the enhanced Mobile Broadband (eMBB) + application. Note that the eMBB application + requires strict threshold values for a wide variety + of network performance parameters (e.g., data rate, + latency, loss rate, reliability)."; + } + + identity urllc { + base customer-application; + description + "Identity for the Ultra-Reliable and Low Latency + Communications (URLLC) application. Note that the + URLLC application requires strict threshold values for + a wide variety of network performance parameters + (e.g., latency, reliability)."; + } + + identity mmtc { + base customer-application; + description + "Identity for the massive Machine Type + Communications (mMTC) application. Note that the + mMTC application requires strict threshold values for + a wide variety of network performance parameters + (e.g., data rate, latency, loss rate, reliability)."; + } + + grouping site-acl { + container access-control-list { + if-feature "acl"; + list mac { + key "mac-address"; + leaf mac-address { + type yang:mac-address; + description + "MAC addresses."; + } + description + "List of MAC addresses."; + } + description + "Container for the ACL."; + } + description + "Grouping that defines the ACL."; + } + + grouping site-bum { + container broadcast-unknown-unicast-multicast { + if-feature "bum"; + leaf multicast-site-type { + type enumeration { + enum receiver-only { + description + "The site only has receivers."; + } + enum source-only { + description + "The site only has sources."; + } + enum source-receiver { + description + "The site has both sources and receivers."; + } + } + default "source-receiver"; + description + "Type of multicast site."; + } + list multicast-gp-address-mapping { + key "id"; + leaf id { + type uint16; + description + "Unique identifier for the mapping."; + } + leaf vlan-id { + type uint16 { + range "0..1024"; + } + mandatory true; + description + "The VLAN ID of the multicast group. + The range of the 12-bit VLAN ID is 0 to 1024."; + } + leaf mac-gp-address { + type yang:mac-address; + mandatory true; + description + "The MAC address of the multicast group."; + } + leaf port-lag-number { + type uint32; + description + "The ports/LAGs belonging to the multicast group."; + } + description + "List of port-to-group mappings."; + } + leaf bum-overall-rate { + type uint64; + units "bps"; + description + "Overall rate for BUM."; + } + list bum-rate-per-type { + key "type"; + leaf type { + type identityref { + base bum-type; + } + description + "BUM type."; + } + leaf rate { + type uint64; + units "bps"; + description + "Rate for BUM."; + } + description + "List of limit rates for the BUM type."; + } + description + "Container of BUM configurations."; + } + description + "Grouping for BUM."; + } + + grouping site-mac-loop-prevention { + container mac-loop-prevention { + if-feature "mac-loop-prevention"; + leaf protection-type { + type identityref { + base loop-prevention-type; + } + default "trap"; + description + "Protection type. By default, the protection + type is 'trap'."; + } + leaf frequency { + type uint32; + default "5"; + description + "The number of times to detect MAC duplication, where + a 'duplicate MAC address' situation has occurred and + the duplicate MAC address has been added to a list of + duplicate MAC addresses. By default, the number of + times is 5."; + } + leaf retry-timer { + type uint32; + units "seconds"; + description + "The retry timer. When the retry timer expires, + the duplicate MAC address will be flushed from + the MAC-VRF."; + } + description + "Container of MAC loop-prevention parameters."; + } + description + "Grouping for MAC loop prevention."; + } + + grouping site-service-qos-profile { + container qos { + if-feature "qos"; + container qos-classification-policy { + list rule { + key "id"; + ordered-by user; + leaf id { + type string; + description + "A description identifying the QoS classification + policy rule."; + } + choice match-type { + default "match-flow"; + case match-flow { + container match-flow { + leaf dscp { + type inet:dscp; + description + "DSCP value."; + } + leaf dot1q { + type uint16; + description + "802.1Q matching. It is a VLAN tag added into + a frame."; + } + leaf pcp { + type uint8 { + range "0..7"; + } + description + "PCP value."; + } + leaf src-mac { + type yang:mac-address; + description + "Source MAC."; + } + leaf dst-mac { + type yang:mac-address; + description + "Destination MAC."; + } + leaf color-type { + type identityref { + base color-type; + } + description + "Color types."; + } + leaf-list target-sites { + if-feature "target-sites"; + type svc-id; + description + "Identifies a site as a traffic destination."; + } + leaf any { + type empty; + description + "Allow all."; + } + leaf vpn-id { + type svc-id; + description + "Reference to the target VPN."; + } + description + "Describes flow-matching criteria."; + } + } + case match-application { + leaf match-application { + type identityref { + base customer-application; + } + description + "Defines the application to match."; + } + } + description + "Choice for classification."; + } + leaf target-class-id { + type string; + description + "Identification of the CoS. + This identifier is internal to the + administration."; + } + description + "List of marking rules."; + } + description + "Configuration of the traffic classification policy."; + } + container qos-profile { + choice qos-profile { + description + "Choice for the QoS profile. + Can be a standard profile or a customized profile."; + case standard { + description + "Standard QoS profile."; + leaf profile { + type leafref { + path "/l2vpn-svc/vpn-profiles/" + + "valid-provider-identifiers/" + + "qos-profile-identifier"; + } + description + "QoS profile to be used."; + } + } + case custom { + description + "Customized QoS profile."; + container classes { + if-feature "qos-custom"; + list class { + key "class-id"; + leaf class-id { + type string; + description + "Identification of the CoS. This identifier is + internal to the administration."; + } + leaf direction { + type identityref { + base qos-profile-direction; + } + default "bidirectional"; + description + "The direction in which the QoS profile is + applied. By default, the direction is + bidirectional."; + } + leaf policing { + type identityref { + base policing; + } + default "one-rate-two-color"; + description + "The policing type can be either one-rate, + two-color (1R2C) or two-rate, three-color + (2R3C). By default, the policing type is + 'one-rate-two-color'."; + } + leaf byte-offset { + type uint16; + description + "Number of bytes in the service frame header + that are excluded from the QoS calculation + (e.g., extra VLAN tags)."; + } + container frame-delay { + choice flavor { + case lowest { + leaf use-lowest-latency { + type empty; + description + "The traffic class should use the path + with the lowest delay."; + } + } + case boundary { + leaf delay-bound { + type uint16; + units "milliseconds"; + description + "The traffic class should use a path + with a defined maximum delay."; + } + } + description + "Delay constraint on the traffic class."; + } + description + "Delay constraint on the traffic class."; + } + container frame-jitter { + choice flavor { + case lowest { + leaf use-lowest-jitter { + type empty; + description + "The traffic class should use the path + with the lowest jitter."; + } + } + case boundary { + leaf delay-bound { + type uint32; + units "microseconds"; + description + "The traffic class should use a path + with a defined maximum jitter."; + } + } + description + "Jitter constraint on the traffic class."; + } + description + "Jitter constraint on the traffic class."; + } + container frame-loss { + leaf rate { + type decimal64 { + fraction-digits 2; + range "0..100"; + } + units "percent"; + description + "Frame loss rate constraint on the traffic + class."; + } + description + "Container for frame loss rate."; + } + container bandwidth { + leaf guaranteed-bw-percent { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units "percent"; + mandatory true; + description + "Used to define the guaranteed bandwidth + as a percentage of the available service + bandwidth."; + } + leaf end-to-end { + type empty; + description + "Used if the bandwidth reservation + must be done on the MPLS network too."; + } + description + "Bandwidth constraint on the traffic class."; + } + description + "List of CoS entries."; + } + description + "Container for list of CoS entries."; + } + } + } + description + "Qos profile configuration."; + } + description + "QoS configuration."; + } + description + "Grouping that defines QoS parameters for a site."; + } + + grouping site-service-mpls { + container carrierscarrier { + if-feature "carrierscarrier"; + leaf signaling-type { + type identityref { + base carrierscarrier-type; + } + default "bgp"; + description + "CsC. By default, the signaling type is 'bgp'."; + } + description + "Container for CsC."; + } + description + "Grouping for CsC."; + } + + container l2vpn-svc { + container vpn-profiles { + container valid-provider-identifiers { + leaf-list cloud-identifier { + if-feature "cloud-access"; + type string; + description + "Identification of the public cloud service or + Internet service. Local to each administration."; + } + leaf-list qos-profile-identifier { + type string; + description + "Identification of the QoS profile to be used. + Local to each administration."; + } + leaf-list bfd-profile-identifier { + type string; + description + "Identification of the SP BFD profile to be used. + Local to each administration."; + } + leaf-list remote-carrier-identifier { + type string; + description + "Identification of the remote carrier name to be used. + It can be an L2VPN partner, data-center SP, or + private CSP. Local to each administration."; + } + nacm:default-deny-write; + description + "Container for valid provider identifiers."; + } + description + "Container for VPN profiles."; + } + container vpn-services { + list vpn-service { + key "vpn-id"; + leaf vpn-id { + type svc-id; + description + "Defines a service identifier."; + } + leaf vpn-svc-type { + type identityref { + base service-type; + } + default "vpws"; + description + "Service type. By default, the service type is 'vpws'."; + } + leaf customer-name { + type string; + description + "Customer name."; + } + leaf svc-topo { + type identityref { + base vpn-topology; + } + default "any-to-any"; + description + "Defines the service topology, e.g., + 'any-to-any', 'hub-spoke'."; + } + container cloud-accesses { + if-feature "cloud-access"; + list cloud-access { + key "cloud-identifier"; + leaf cloud-identifier { + type leafref { + path "/l2vpn-svc/vpn-profiles/" + + "valid-provider-identifiers" + + "/cloud-identifier"; + } + description + "Identification of the cloud service. + Local to each administration."; + } + choice list-flavor { + case permit-any { + leaf permit-any { + type empty; + description + "Allow all sites."; + } + } + case deny-any-except { + leaf-list permit-site { + type leafref { + path "/l2vpn-svc/sites/site/site-id"; + } + description + "Site ID to be authorized."; + } + } + case permit-any-except { + leaf-list deny-site { + type leafref { + path "/l2vpn-svc/sites/site/site-id"; + } + description + "Site ID to be denied."; + } + } + description + "Choice for cloud access policy. + By default, all sites in the L2VPN + MUST be authorized to access the cloud."; + } + description + "Cloud access configuration."; + } + description + "Container for cloud access configurations."; + } + container frame-delivery { + if-feature "bum"; + container customer-tree-flavors { + leaf-list tree-flavor { + type identityref { + base multicast-tree-type; + } + description + "Type of tree to be used."; + } + description + "Types of trees used by the customer."; + } + container bum-deliveries { + list bum-delivery { + key "frame-type"; + leaf frame-type { + type identityref { + base tf-type; + } + description + "Type of frame delivery. It supports unicast + frame delivery, multicast frame delivery, + and broadcast frame delivery."; + } + leaf delivery-mode { + type identityref { + base frame-delivery-mode; + } + default "unconditional"; + description + "Defines the frame delivery mode + ('unconditional' (default), 'conditional', + or 'discard'). By default, service frames are + unconditionally delivered to the destination site."; + } + description + "List of frame delivery types and modes."; + } + description + "Defines the frame delivery types and modes."; + } + leaf multicast-gp-port-mapping { + type identityref { + base multicast-gp-address-mapping; + } + mandatory true; + description + "Describes the way in which each interface is + associated with the multicast group."; + } + description + "Multicast global parameters for the VPN service."; + } + container extranet-vpns { + if-feature "extranet-vpn"; + list extranet-vpn { + key "vpn-id"; + leaf vpn-id { + type svc-id; + description + "Identifies the target VPN that the local VPN wants to + access."; + } + leaf local-sites-role { + type identityref { + base site-role; + } + default "any-to-any-role"; + description + "Describes the role of the local sites in the target + VPN topology. In the any-to-any VPN service topology, + the local sites must have the same role, which will be + 'any-to-any-role'. In the Hub-and-Spoke VPN service + topology or the Hub-and-Spoke-Disjoint VPN service + topology, the local sites must have a Hub role or a + Spoke role."; + } + description + "List of extranet VPNs to which the local VPN + is attached."; + } + description + "Container for extranet VPN configurations."; + } + leaf ce-vlan-preservation { + type boolean; + mandatory true; + description + "Preserves the CE-VLAN ID from ingress to egress, i.e., + the CE-VLAN tag of the egress frame is identical to + that of the ingress frame that yielded this + egress service frame. If all-to-one bundling within + a site is enabled, then preservation applies to all + ingress service frames. If all-to-one bundling is + disabled, then preservation applies to tagged + ingress service frames having CE-VLAN IDs 1 through 4094."; + } + leaf ce-vlan-cos-preservation { + type boolean; + mandatory true; + description + "CE VLAN CoS preservation. The PCP bits in the CE-VLAN tag + of the egress frame are identical to those of the + ingress frame that yielded this egress service frame."; + } + leaf carrierscarrier { + if-feature "carrierscarrier"; + type boolean; + default "false"; + description + "The VPN is using CsC, and so MPLS is required."; + } + description + "List of VPN services."; + } + description + "Container for VPN services."; + } + container sites { + list site { + key "site-id"; + leaf site-id { + type string; + description + "Identifier of the site."; + } + leaf site-vpn-flavor { + type identityref { + base site-vpn-flavor; + } + default "site-vpn-flavor-single"; + description + "Defines the way that the VPN multiplexing is + done, e.g., whether the site belongs to + a single VPN site or a multi-VPN site. By + default, the site belongs to a single VPN."; + } + container devices { + when "derived-from-or-self(../management/type, " + + "'l2vpn-svc:provider-managed') or " + + "derived-from-or-self(../management/type, " + + "'l2vpn-svc:co-managed')" { + description + "Applicable only for a provider-managed or + co-managed device."; + } + list device { + key "device-id"; + leaf device-id { + type string; + description + "Identifier for the device."; + } + leaf location { + type leafref { + path "../../../locations/location/location-id"; + } + mandatory true; + description + "Location of the device."; + } + container management { + when "derived-from-or-self(../../../management/type, " + + "'l2vpn-svc:co-managed')" { + description + "Applicable only for a co-managed device."; + } + leaf transport { + type identityref { + base address-family; + } + description + "Transport protocol or address family + used for management."; + } + leaf address { + when '(../ transport)' { + description + "If the address family is specified, then the + address should also be specified. If the + transport is not specified, then the address + should not be specified."; + } + type inet:ip-address; + description + "Management address."; + } + description + "Management configuration. Applicable only for a + co-managed device."; + } + description + "List of devices requested by the customer."; + } + description + "Device configurations."; + } + container management { + leaf type { + type identityref { + base management; + } + mandatory true; + description + "Management type of the connection."; + } + description + "Management configuration."; + } + container locations { + list location { + key "location-id"; + leaf location-id { + type string; + description + "Location ID."; + } + leaf address { + type string; + description + "Address (number and street) of the site."; + } + leaf postal-code { + type string; + description + "Postal code of the site. The format of 'postal-code' + is similar to the 'PC' (postal code) label format + defined in RFC 4119."; + } + leaf state { + type string; + description + "State (region) of the site. This leaf can also be used + to describe a region of a country that does not have + states."; + } + leaf city { + type string; + description + "City of the site."; + } + leaf country-code { + type string; + description + "Country of the site. The format of 'country-code' is + similar to the 'country' label defined in RFC 4119."; + } + description + "List of locations."; + } + description + "Location of the site."; + } + container site-diversity { + if-feature "site-diversity"; + container groups { + list group { + key "group-id"; + leaf group-id { + type string; + description + "The group-id to which the site belongs."; + } + description + "List of group-ids."; + } + description + "Groups to which the site belongs. + All site network accesses will inherit those group + values."; + } + description + "The type of diversity constraint."; + } + container vpn-policies { + list vpn-policy { + key "vpn-policy-id"; + leaf vpn-policy-id { + type string; + description + "Unique identifier for the VPN policy."; + } + list entries { + key "id"; + leaf id { + type string; + description + "Unique identifier for the policy entry."; + } + container filters { + list filter { + key "type"; + ordered-by user; + leaf type { + type identityref { + base vpn-policy-filter-type; + } + description + "Type of VPN policy filter."; + } + leaf-list lan-tag { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:lan')" { + description + "Only applies when the VPN policy filter is a + LAN tag filter."; + } + if-feature "lan-tag"; + type uint32; + description + "List of Ethernet LAN tags to be matched. An + Ethernet LAN tag identifies a particular + broadcast domain in a VPN."; + } + description + "List of filters used on the site. This list can + be augmented."; + } + description + "If a more granular VPN attachment is necessary, + filtering can be used. If used, it permits the + splitting of site LANs among multiple VPNs. The + site LAN can be split based on either the LAN tag or + the LAN prefix. If no filter is used, all the LANs + will be part of the same VPNs with the same role."; + } + list vpn { + key "vpn-id"; + leaf vpn-id { + type leafref { + path "/l2vpn-svc/vpn-services/vpn-service/vpn-id"; + } + description + "Reference to an L2VPN."; + } + leaf site-role { + type identityref { + base site-role; + } + default "any-to-any-role"; + description + "Role of the site in the L2VPN."; + } + description + "List of VPNs with which the LAN is associated."; + } + description + "List of entries for an export policy."; + } + description + "List of VPN policies."; + } + description + "VPN policy."; + } + container service { + uses site-service-qos-profile; + uses site-service-mpls; + description + "Service parameters on the attachment."; + } + uses site-bum; + uses site-mac-loop-prevention; + uses site-acl; + leaf actual-site-start { + type yang:date-and-time; + config false; + description + "This leaf is optional. It indicates the date and time + when the service at a particular site actually started."; + } + leaf actual-site-stop { + type yang:date-and-time; + config false; + description + "This leaf is optional. It indicates the date and time + when the service at a particular site actually stopped."; + } + leaf bundling-type { + type identityref { + base bundling-type; + } + default "one2one-bundling"; + description + "Bundling type. By default, each L2VPN + can be associated with only one + CE-VLAN, i.e., one-to-one bundling is used."; + } + leaf default-ce-vlan-id { + type uint32; + mandatory true; + description + "Default CE VLAN ID set at the site level."; + } + container site-network-accesses { + list site-network-access { + key "network-access-id"; + leaf network-access-id { + type string; + description + "Identifier of network access."; + } + leaf remote-carrier-name { + when "derived-from-or-self(../../../site-vpn-flavor," + + "'l2vpn-svc:site-vpn-flavor-nni')" { + description + "Relevant when the site's VPN flavor is + 'site-vpn-flavor-nni'."; + } + type leafref { + path "/l2vpn-svc/vpn-profiles/" + + "valid-provider-identifiers" + + "/remote-carrier-identifier"; + } + description + "Remote carrier name. The 'remote-carrier-name' + parameter must be configured only when + 'site-vpn-flavor' is set to 'site-vpn-flavor-nni'. + If it is not set, it indicates that the customer + does not know the remote carrier's name + beforehand."; + } + leaf type { + type identityref { + base site-network-access-type; + } + default "point-to-point"; + description + "Describes the type of connection, e.g., + point-to-point or multipoint."; + } + choice location-flavor { + case location { + when "derived-from-or-self(../../management/type, " + + "'l2vpn-svc:customer-managed')" { + description + "Applicable only for a customer-managed device."; + } + leaf location-reference { + type leafref { + path "../../../locations/location/location-id"; + } + description + "Location of the site-network-access."; + } + } + case device { + when "derived-from-or-self(../../management/type, " + + "'l2vpn-svc:provider-managed') or " + + "derived-from-or-self(../../management/type, " + + "'l2vpn-svc:co-managed')" { + description + "Applicable only for a provider-managed + or co-managed device."; + } + leaf device-reference { + type leafref { + path "../../../devices/device/device-id"; + } + description + "Identifier of the CE to use."; + } + } + mandatory true; + description + "Choice of how to describe the site's location."; + } + container access-diversity { + if-feature "site-diversity"; + container groups { + list group { + key "group-id"; + leaf group-id { + type string; + description + "Group-id to which the site belongs."; + } + description + "List of group-ids."; + } + description + "Groups to which the site or site-network-access + belongs."; + } + container constraints { + list constraint { + key "constraint-type"; + leaf constraint-type { + type identityref { + base placement-diversity; + } + description + "The type of diversity constraint."; + } + container target { + choice target-flavor { + default "id"; + case id { + list group { + key "group-id"; + leaf group-id { + type string; + description + "The constraint will apply against this + particular group-id."; + } + description + "List of groups."; + } + } + case all-accesses { + leaf all-other-accesses { + type empty; + description + "The constraint will apply against all other + site network accesses of this site."; + } + } + case all-groups { + leaf all-other-groups { + type empty; + description + "The constraint will apply against all other + groups the customer is managing."; + } + } + description + "Choice for the group definition."; + } + description + "The constraint will apply against + this list of groups."; + } + description + "List of constraints."; + } + description + "Constraints for placing this site network access."; + } + description + "Diversity parameters."; + } + container bearer { + container requested-type { + if-feature "requested-type"; + leaf type { + type string; + description + "Type of requested bearer: Ethernet, ATM, Frame + Relay, IP Layer 2 transport, Frame Relay Data + Link Connection Identifier (DLCI), SONET/SDH, + PPP."; + } + leaf strict { + type boolean; + default "false"; + description + "Defines whether the requested type is a preference + or a strict requirement."; + } + description + "Container for requested types."; + } + leaf always-on { + if-feature "always-on"; + type boolean; + default "true"; + description + "Request for an 'always-on' access type. + For example, this could mean no dial-in access + type."; + } + leaf bearer-reference { + if-feature "bearer-reference"; + type string; + description + "An internal reference for the SP."; + } + description + "Bearer-specific parameters. To be augmented."; + } + container connection { + leaf encapsulation-type { + type identityref { + base encapsulation-type; + } + default "ethernet"; + description + "Encapsulation type. By default, the + encapsulation type is set to 'ethernet'."; + } + leaf eth-inf-type { + type identityref { + base eth-inf-type; + } + default "untagged"; + description + "Ethernet interface type. By default, the + Ethernet interface type is set to 'untagged'."; + } + container tagged-interface { + leaf type { + type identityref { + base tagged-inf-type; + } + default "priority-tagged"; + description + "Tagged interface type. By default, + the type of the tagged interface is + 'priority-tagged'."; + } + container dot1q-vlan-tagged { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:dot1q')" { + description + "Only applies when the type of the tagged + interface is 'dot1q'."; + } + if-feature "dot1q"; + leaf tg-type { + type identityref { + base tag-type; + } + default "c-vlan"; + description + "Tag type. By default, the tag type is + 'c-vlan'."; + } + leaf cvlan-id { + type uint16; + mandatory true; + description + "VLAN identifier."; + } + description + "Tagged interface."; + } + container priority-tagged { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:priority-tagged')" { + description + "Only applies when the type of the tagged + interface is 'priority-tagged'."; + } + leaf tag-type { + type identityref { + base tag-type; + } + default "c-vlan"; + description + "Tag type. By default, the tag type is + 'c-vlan'."; + } + description + "Priority tagged."; + } + container qinq { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:qinq')" { + description + "Only applies when the type of the tagged + interface is 'qinq'."; + } + if-feature "qinq"; + leaf tag-type { + type identityref { + base tag-type; + } + default "c-s-vlan"; + description + "Tag type. By default, the tag type is + 'c-s-vlan'."; + } + leaf svlan-id { + type uint16; + mandatory true; + description + "SVLAN identifier."; + } + leaf cvlan-id { + type uint16; + mandatory true; + description + "CVLAN identifier."; + } + description + "QinQ."; + } + container qinany { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:qinany')" { + description + "Only applies when the type of the tagged + interface is 'qinany'."; + } + if-feature "qinany"; + leaf tag-type { + type identityref { + base tag-type; + } + default "s-vlan"; + description + "Tag type. By default, the tag type is + 's-vlan'."; + } + leaf svlan-id { + type uint16; + mandatory true; + description + "SVLAN ID."; + } + description + "Container for QinAny."; + } + container vxlan { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:vxlan')" { + description + "Only applies when the type of the tagged + interface is 'vxlan'."; + } + if-feature "vxlan"; + leaf vni-id { + type uint32; + mandatory true; + description + "VXLAN Network Identifier (VNI)."; + } + leaf peer-mode { + type identityref { + base vxlan-peer-mode; + } + default "static-mode"; + description + "Specifies the VXLAN access mode. By default, + the peer mode is set to 'static-mode'."; + } + list peer-list { + key "peer-ip"; + leaf peer-ip { + type inet:ip-address; + description + "Peer IP."; + } + description + "List of peer IP addresses."; + } + description + "QinQ."; + } + description + "Container for tagged interfaces."; + } + container untagged-interface { + leaf speed { + type uint32; + units "mbps"; + default "10"; + description + "Port speed."; + } + leaf mode { + type neg-mode; + default "auto-neg"; + description + "Negotiation mode."; + } + leaf phy-mtu { + type uint32; + units "bytes"; + description + "PHY MTU."; + } + leaf lldp { + type boolean; + default "false"; + description + "LLDP. Indicates that LLDP is supported."; + } + container oam-802.3ah-link { + if-feature "oam-3ah"; + leaf enabled { + type boolean; + default "false"; + description + "Indicates whether or not to support + OAM 802.3ah links."; + } + description + "Container for OAM 802.3ah links."; + } + leaf uni-loop-prevention { + type boolean; + default "false"; + description + "If this leaf is set to 'true', then the port + automatically goes down when a physical + loopback is detected."; + } + description + "Container of untagged interface attribute + configurations."; + } + container lag-interfaces { + if-feature "lag-interface"; + list lag-interface { + key "index"; + leaf index { + type string; + description + "LAG interface index."; + } + container lacp { + if-feature "lacp"; + leaf enabled { + type boolean; + default "false"; + description + "LACP on/off. By default, LACP is disabled."; + } + leaf mode { + type neg-mode; + description + "LACP mode. LACP modes have active mode and + passive mode ('false'). 'Active mode' means + initiating the auto-speed negotiation and + trying to form an Ethernet channel with the + other end. 'Passive mode' means not initiating + the negotiation but responding to LACP packets + initiated by the other end (e.g., full duplex + or half duplex)."; + } + leaf speed { + type uint32; + units "mbps"; + default "10"; + description + "LACP speed. By default, the LACP speed is 10 + Mbps."; + } + leaf mini-link-num { + type uint32; + description + "Defines the minimum number of links that must + be active before the aggregating link is put + into service."; + } + leaf system-priority { + type uint16; + default "32768"; + description + "Indicates the LACP priority for the system. + The range is from 0 to 65535. + The default is 32768."; + } + container micro-bfd { + if-feature "micro-bfd"; + leaf enabled { + type enumeration { + enum on { + description + "Micro-bfd on."; + } + enum off { + description + "Micro-bfd off."; + } + } + default "off"; + description + "Micro-BFD on/off. By default, micro-BFD + is set to 'off'."; + } + leaf interval { + type uint32; + units "milliseconds"; + description + "BFD interval."; + } + leaf hold-timer { + type uint32; + units "milliseconds"; + description + "BFD hold timer."; + } + description + "Container of micro-BFD configurations."; + } + container bfd { + if-feature "bfd"; + leaf enabled { + type boolean; + default "false"; + description + "BFD activation. By default, BFD is not + activated."; + } + choice holdtime { + default "fixed"; + case profile { + leaf profile-name { + type leafref { + path "/l2vpn-svc/vpn-profiles/" + + "valid-provider-identifiers" + + "/bfd-profile-identifier"; + } + description + "SP well-known profile."; + } + description + "SP well-known profile."; + } + case fixed { + leaf fixed-value { + type uint32; + units "milliseconds"; + description + "Expected hold time expressed in + milliseconds."; + } + } + description + "Choice for the hold-time flavor."; + } + description + "Container for BFD."; + } + container member-links { + list member-link { + key "name"; + leaf name { + type string; + description + "Member link name."; + } + leaf speed { + type uint32; + units "mbps"; + default "10"; + description + "Port speed."; + } + leaf mode { + type neg-mode; + default "auto-neg"; + description + "Negotiation mode."; + } + leaf link-mtu { + type uint32; + units "bytes"; + description + "Link MTU size."; + } + container oam-802.3ah-link { + if-feature "oam-3ah"; + leaf enabled { + type boolean; + default "false"; + description + "Indicates whether OAM 802.3ah links are + supported."; + } + description + "Container for OAM 802.3ah links."; + } + description + "Member link."; + } + description + "Container of the member link list."; + } + leaf flow-control { + type boolean; + default "false"; + description + "Flow control. Indicates whether flow control + is supported."; + } + leaf lldp { + type boolean; + default "false"; + description + "LLDP. Indicates whether LLDP is supported."; + } + description + "LACP."; + } + description + "List of LAG interfaces."; + } + description + "Container of LAG interface attribute + configurations."; + } + list cvlan-id-to-svc-map { + key "svc-id"; + leaf svc-id { + type leafref { + path "/l2vpn-svc/vpn-services/vpn-service/vpn-id"; + } + description + "VPN service identifier."; + } + list cvlan-id { + key "vid"; + leaf vid { + type uint16; + description + "CVLAN ID."; + } + description + "List of CVLAN-ID-to-SVC-map configurations."; + } + description + "List of CVLAN-ID-to-L2VPN-service-map + configurations."; + } + container l2cp-control { + if-feature "l2cp-control"; + leaf stp-rstp-mstp { + type control-mode; + description + "STP / Rapid STP (RSTP) / Multiple STP (MSTP) + protocol type applicable to all sites."; + } + leaf pause { + type control-mode; + description + "Pause protocol type applicable to all sites."; + } + leaf lacp-lamp { + type control-mode; + description + "LACP / Link Aggregation Marker Protocol (LAMP)."; + } + leaf link-oam { + type control-mode; + description + "Link OAM."; + } + leaf esmc { + type control-mode; + description + "Ethernet Synchronization Messaging Channel + (ESMC)."; + } + leaf l2cp-802.1x { + type control-mode; + description + "IEEE 802.1x."; + } + leaf e-lmi { + type control-mode; + description + "E-LMI."; + } + leaf lldp { + type boolean; + description + "LLDP protocol type applicable to all sites."; + } + leaf ptp-peer-delay { + type control-mode; + description + "Precision Time Protocol (PTP) peer delay."; + } + leaf garp-mrp { + type control-mode; + description + "GARP/MRP."; + } + description + "Container of L2CP control configurations."; + } + container oam { + if-feature "ethernet-oam"; + leaf md-name { + type string; + mandatory true; + description + "Maintenance domain name."; + } + leaf md-level { + type uint16 { + range "0..255"; + } + mandatory true; + description + "Maintenance domain level. The level may be + restricted in certain protocols (e.g., + protocols in Layer 0 to Layer 7)."; + } + list cfm-8021-ag { + if-feature "cfm"; + key "maid"; + leaf maid { + type string; + mandatory true; + description + "Identifies a Maintenance Association (MA)."; + } + leaf mep-id { + type uint32; + description + "Local Maintenance Entity Group End Point (MEP) + ID. The non-existence of this leaf means + that no defects are to be reported."; + } + leaf mep-level { + type uint32; + description + "Defines the MEP level. The non-existence of this + leaf means that no defects are to be reported."; + } + leaf mep-up-down { + type enumeration { + enum up { + description + "MEP up."; + } + enum down { + description + "MEP down."; + } + } + default "up"; + description + "MEP up/down. By default, MEP up is used. + The non-existence of this leaf means that + no defects are to be reported."; + } + leaf remote-mep-id { + type uint32; + description + "Remote MEP ID. The non-existence of this leaf + means that no defects are to be reported."; + } + leaf cos-for-cfm-pdus { + type uint32; + description + "CoS for CFM PDUs. The non-existence of this leaf + means that no defects are to be reported."; + } + leaf ccm-interval { + type uint32; + units "milliseconds"; + default "10000"; + description + "CCM interval. By default, the CCM interval is + 10,000 milliseconds (10 seconds)."; + } + leaf ccm-holdtime { + type uint32; + units "milliseconds"; + default "35000"; + description + "CCM hold time. By default, the CCM hold time + is 3.5 times the CCM interval."; + } + leaf alarm-priority-defect { + type identityref { + base fault-alarm-defect-type; + } + default "remote-invalid-ccm"; + description + "The lowest-priority defect that is + allowed to generate a fault alarm. By default, + 'fault-alarm-defect-type' is set to + 'remote-invalid-ccm'. The non-existence of + this leaf means that no defects are + to be reported."; + } + leaf ccm-p-bits-pri { + type ccm-priority-type; + description + "The priority parameter for CCMs transmitted by + the MEP. The non-existence of this leaf means + that no defects are to be reported."; + } + description + "List of 802.1ag CFM attributes."; + } + list y-1731 { + if-feature "y-1731"; + key "maid"; + leaf maid { + type string; + mandatory true; + description + "Identifies an MA."; + } + leaf mep-id { + type uint32; + description + "Local MEP ID. The non-existence of this leaf + means that no measurements are to be reported."; + } + leaf type { + type identityref { + base pm-type; + } + default "delay"; + description + "Performance-monitoring types. By default, the + performance-monitoring type is set to 'delay'. + The non-existence of this leaf means that no + measurements are to be reported."; + } + leaf remote-mep-id { + type uint32; + description + "Remote MEP ID. The non-existence of this + leaf means that no measurements are to be + reported."; + } + leaf message-period { + type uint32; + units "milliseconds"; + default "10000"; + description + "Defines the interval between Y.1731 + performance-monitoring messages. The message + period is expressed in milliseconds."; + } + leaf measurement-interval { + type uint32; + units "seconds"; + description + "Specifies the measurement interval for + statistics. The measurement interval is + expressed in seconds."; + } + leaf cos { + type uint32; + description + "CoS. The non-existence of this leaf means that + no measurements are to be reported."; + } + leaf loss-measurement { + type boolean; + default "false"; + description + "Indicates whether or not to enable loss + measurement. By default, loss + measurement is not enabled."; + } + leaf synthetic-loss-measurement { + type boolean; + default "false"; + description + "Indicates whether or not to enable synthetic loss + measurement. By default, synthetic loss + measurement is not enabled."; + } + container delay-measurement { + leaf enable-dm { + type boolean; + default "false"; + description + "Indicates whether or not to enable delay + measurement. By default, delay measurement + is not enabled."; + } + leaf two-way { + type boolean; + default "false"; + description + "Indicates whether delay measurement is two-way + ('true') or one-way ('false'). By default, + one-way measurement is enabled."; + } + description + "Container for delay measurement."; + } + leaf frame-size { + type uint32; + units "bytes"; + description + "Frame size. The non-existence of this leaf + means that no measurements are to be reported."; + } + leaf session-type { + type enumeration { + enum proactive { + description + "Proactive mode."; + } + enum on-demand { + description + "On-demand mode."; + } + } + default "on-demand"; + description + "Session type. By default, the session type + is 'on-demand'. The non-existence of this + leaf means that no measurements are to be + reported."; + } + description + "List of configured Y-1731 instances."; + } + description + "Container for Ethernet Service OAM."; + } + description + "Container for connection requirements."; + } + container availability { + leaf access-priority { + type uint32; + default "100"; + description + "Access priority. The higher the access-priority + value, the higher the preference will be for the + access in question."; + } + choice redundancy-mode { + case single-active { + leaf single-active { + type empty; + description + "Single-active mode."; + } + description + "In single-active mode, only one node forwards + traffic to and from the Ethernet segment."; + } + case all-active { + leaf all-active { + type empty; + description + "All-active mode."; + } + description + "In all-active mode, all nodes can forward + traffic."; + } + description + "Redundancy mode choice."; + } + description + "Container of available optional configurations."; + } + container vpn-attachment { + choice attachment-flavor { + case vpn-id { + leaf vpn-id { + type leafref { + path "/l2vpn-svc/vpn-services/vpn-service/vpn-id"; + } + description + "Reference to an L2VPN. Referencing a vpn-id + provides an easy way to attach a particular + logical access to a VPN. In this case, + the vpn-id must be configured."; + } + leaf site-role { + type identityref { + base site-role; + } + default "any-to-any-role"; + description + "Role of the site in the L2VPN. When referencing + a vpn-id, the site-role setting must be added to + express the role of the site in the target VPN + service topology."; + } + } + case vpn-policy-id { + leaf vpn-policy-id { + type leafref { + path "../../../../vpn-policies/vpn-policy/" + + "vpn-policy-id"; + } + description + "Reference to a VPN policy."; + } + } + mandatory true; + description + "Choice for the VPN attachment flavor."; + } + description + "Defines the VPN attachment of a site."; + } + container service { + container svc-bandwidth { + if-feature "input-bw"; + list bandwidth { + key "direction type"; + leaf direction { + type identityref { + base bw-direction; + } + description + "Indicates the bandwidth direction. It can be + the bandwidth download direction from the SP to + the site or the bandwidth upload direction from + the site to the SP."; + } + leaf type { + type identityref { + base bw-type; + } + description + "Bandwidth type. By default, the bandwidth type + is set to 'bw-per-cos'."; + } + leaf cos-id { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:bw-per-cos')" { + description + "Relevant when the bandwidth type is set to + 'bw-per-cos'."; + } + type uint8; + description + "Identifier of the CoS, indicated by DSCP or a + CE-VLAN CoS (802.1p) value in the service frame. + If the bandwidth type is set to 'bw-per-cos', + the CoS ID MUST also be specified."; + } + leaf vpn-id { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:bw-per-svc')" { + description + "Relevant when the bandwidth type is + set as bandwidth per VPN service."; + } + type svc-id; + description + "Identifies the target VPN. If the bandwidth + type is set as bandwidth per VPN service, the + vpn-id MUST be specified."; + } + leaf cir { + type uint64; + units "bps"; + mandatory true; + description + "Committed Information Rate. The maximum number + of bits that a port can receive or send over + an interface in one second."; + } + leaf cbs { + type uint64; + units "bps"; + mandatory true; + description + "Committed Burst Size (CBS). Controls the bursty + nature of the traffic. Traffic that does not + use the configured Committed Information Rate + (CIR) accumulates credits until the credits + reach the configured CBS."; + } + leaf eir { + type uint64; + units "bps"; + description + "Excess Information Rate (EIR), i.e., excess frame + delivery allowed that is not subject to an SLA. + The traffic rate can be limited by the EIR."; + } + leaf ebs { + type uint64; + units "bps"; + description + "Excess Burst Size (EBS). The bandwidth available + for burst traffic from the EBS is subject to the + amount of bandwidth that is accumulated during + periods when traffic allocated by the EIR + policy is not used."; + } + leaf pir { + type uint64; + units "bps"; + description + "Peak Information Rate, i.e., maximum frame + delivery allowed. It is equal to or less + than the sum of the CIR and the EIR."; + } + leaf pbs { + type uint64; + units "bps"; + description + "Peak Burst Size. It is measured in bytes per + second."; + } + description + "List of bandwidth values (e.g., per CoS, + per vpn-id)."; + } + description + "From the customer site's perspective, the service + input/output bandwidth of the connection or + download/upload bandwidth from the SP/site + to the site/SP."; + } + leaf svc-mtu { + type uint16; + units "bytes"; + mandatory true; + description + "SVC MTU. It is also known as the maximum + transmission unit or maximum frame size. When + a frame is larger than the MTU, it is broken + down, or fragmented, into smaller pieces by + the network protocol to accommodate the MTU + of the network. If CsC is enabled, + the requested svc-mtu leaf will refer to the + MPLS MTU and not to the link MTU."; + } + uses site-service-qos-profile; + uses site-service-mpls; + description + "Container for services."; + } + uses site-bum; + uses site-mac-loop-prevention; + uses site-acl; + container mac-addr-limit { + if-feature "mac-addr-limit"; + leaf limit-number { + type uint16; + default "2"; + description + "Maximum number of MAC addresses learned from + the subscriber for a single service instance. + The default allowed maximum number of MAC + addresses is 2."; + } + leaf time-interval { + type uint32; + units "seconds"; + default "300"; + description + "The aging time of the MAC address. By default, + the aging time is set to 300 seconds."; + } + leaf action { + type identityref { + base mac-action; + } + default "warning"; + description + "Specifies the action taken when the upper limit is + exceeded: drop the packet, flood the packet, or + simply send a warning log message. By default, + the action is set to 'warning'."; + } + description + "Container of MAC address limit configurations."; + } + description + "List of site network accesses."; + } + description + "Container of port configurations."; + } + description + "List of sites."; + } + description + "Container of site configurations."; + } + description + "Container for L2VPN services."; + } +} diff --git a/models/ietf/RFC/ietf-l2vpn-svc@2018-10-09.yang b/models/ietf/RFC/ietf-l2vpn-svc@2018-10-09.yang new file mode 100644 index 0000000000000000000000000000000000000000..6cc1775351d73c0421589c2bc53eb62908dac055 --- /dev/null +++ b/models/ietf/RFC/ietf-l2vpn-svc@2018-10-09.yang @@ -0,0 +1,3318 @@ +module ietf-l2vpn-svc { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l2vpn-svc"; + prefix l2vpn-svc; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + + organization + "IETF L2SM Working Group."; + contact + "WG Web: <https://datatracker.ietf.org/wg/l2sm/> + WG List: <mailto:l2sm@ietf.org> + Editor: Giuseppe Fioccola + <mailto:giuseppe.fioccola@tim.it>"; + description + "This YANG module defines a generic service configuration model + for Layer 2 VPN services common across all vendor + implementations. + + Copyright (c) 2018 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 Simplified 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 8466; + see the RFC itself for full legal notices."; + + revision 2018-10-09 { + description + "Initial revision."; + reference + "RFC 8466: A YANG Data Model for Layer 2 Virtual Private + Network (L2VPN) Service Delivery"; + } + + feature carrierscarrier { + description + "Enables the support of carriers' carriers (CsC)."; + } + + feature ethernet-oam { + description + "Enables the support of Ethernet Service OAM."; + } + + feature extranet-vpn { + description + "Enables the support of extranet VPNs."; + } + + feature l2cp-control { + description + "Enables the support of L2CP control."; + } + + feature input-bw { + description + "Enables the support of input bandwidth in a VPN."; + } + + feature output-bw { + description + "Enables the support of output bandwidth in a VPN."; + } + + feature uni-list { + description + "Enables the support of a list of UNIs in a VPN."; + } + + feature cloud-access { + description + "Allows the VPN to connect to a Cloud Service Provider (CSP) + or an ISP."; + } + + feature oam-3ah { + description + "Enables the support of OAM 802.3ah."; + } + + feature micro-bfd { + description + "Enables the support of micro-BFD."; + } + + feature bfd { + description + "Enables the support of BFD."; + } + + feature signaling-options { + description + "Enables the support of signaling options."; + } + + feature site-diversity { + description + "Enables the support of site diversity constraints in a VPN."; + } + + feature encryption { + description + "Enables the support of encryption."; + } + + feature always-on { + description + "Enables support for the 'always-on' access constraint."; + } + + feature requested-type { + description + "Enables support for the 'requested-type' access constraint."; + } + + feature bearer-reference { + description + "Enables support for the 'bearer-reference' access + constraint."; + } + + feature qos { + description + "Enables support for QoS."; + } + + feature qos-custom { + description + "Enables the support of a custom QoS profile."; + } + + feature lag-interface { + description + "Enables LAG interfaces."; + } + + feature vlan { + description + "Enables the support of VLANs."; + } + + feature dot1q { + description + "Enables the support of dot1Q."; + } + feature qinq { + description + "Enables the support of QinQ."; + } + + feature qinany { + description + "Enables the support of QinAny."; + } + + feature vxlan { + description + "Enables the support of VXLANs."; + } + + feature lan-tag { + description + "Enables LAN tag support in a VPN."; + } + + feature target-sites { + description + "Enables the support of the 'target-sites' + match-flow parameter."; + } + + feature bum { + description + "Enables BUM capabilities in a VPN."; + } + + feature mac-loop-prevention { + description + "Enables the MAC loop-prevention capability in a VPN."; + } + + feature lacp { + description + "Enables the Link Aggregation Control Protocol (LACP) + capability in a VPN."; + } + + feature mac-addr-limit { + description + "Enables the MAC address limit capability in a VPN."; + } + + feature acl { + description + "Enables the ACL capability in a VPN."; + } + + feature cfm { + description + "Enables the 802.1ag CFM capability in a VPN."; + } + + feature y-1731 { + description + "Enables the Y.1731 capability in a VPN."; + } + + typedef svc-id { + type string; + description + "Defines the type of service component identifier."; + } + + typedef ccm-priority-type { + type uint8 { + range "0..7"; + } + description + "A 3-bit priority value to be used in the VLAN tag, + if present in the transmitted frame."; + } + + typedef control-mode { + type enumeration { + enum peer { + description + "'peer' mode, i.e., participate in the protocol towards + the CE. Peering is common for LACP and the Ethernet + Local Management Interface (E-LMI) and, occasionally, + for LLDP. For VPLSs and VPWSs, the subscriber can also + request that the SP peer enable spanning tree."; + } + enum tunnel { + description + "'tunnel' mode, i.e., pass to the egress or destination + site. For EPLs, the expectation is that L2CP frames are + tunneled."; + } + enum discard { + description + "'discard' mode, i.e., discard the frame."; + } + } + description + "Defines the type of control mode on L2CP protocols."; + } + + typedef neg-mode { + type enumeration { + enum full-duplex { + description + "Defines full-duplex mode."; + } + enum auto-neg { + description + "Defines auto-negotiation mode."; + } + } + description + "Defines the type of negotiation mode."; + } + + identity site-network-access-type { + description + "Base identity for the site-network-access type."; + } + + identity point-to-point { + base site-network-access-type; + description + "Identity for a point-to-point connection."; + } + + identity multipoint { + base site-network-access-type; + description + "Identity for a multipoint connection, e.g., + an Ethernet broadcast segment."; + } + + identity tag-type { + description + "Base identity from which all tag types are derived."; + } + + identity c-vlan { + base tag-type; + description + "A CVLAN tag, normally using the 0x8100 Ethertype."; + } + + identity s-vlan { + base tag-type; + description + "An SVLAN tag."; + } + + identity c-s-vlan { + base tag-type; + description + "Using both a CVLAN tag and an SVLAN tag."; + } + + identity multicast-tree-type { + description + "Base identity for the multicast tree type."; + } + + identity ssm-tree-type { + base multicast-tree-type; + description + "Identity for the Source-Specific Multicast (SSM) tree type."; + reference "RFC 8299: YANG Data Model for L3VPN Service Delivery"; + } + + identity asm-tree-type { + base multicast-tree-type; + description + "Identity for the Any-Source Multicast (ASM) tree type."; + reference "RFC 8299: YANG Data Model for L3VPN Service Delivery"; + } + + identity bidir-tree-type { + base multicast-tree-type; + description + "Identity for the bidirectional tree type."; + reference "RFC 8299: YANG Data Model for L3VPN Service Delivery"; + } + + identity multicast-gp-address-mapping { + description + "Identity for mapping type."; + } + + identity static-mapping { + base multicast-gp-address-mapping; + description + "Identity for static mapping, i.e., attach the interface + to the multicast group as a static member."; + } + + identity dynamic-mapping { + base multicast-gp-address-mapping; + description + "Identity for dynamic mapping, i.e., an interface was added + to the multicast group as a result of snooping."; + } + + identity tf-type { + description + "Identity for the traffic type."; + } + + identity multicast-traffic { + base tf-type; + description + "Identity for multicast traffic."; + } + + identity broadcast-traffic { + base tf-type; + description + "Identity for broadcast traffic."; + } + + identity unknown-unicast-traffic { + base tf-type; + description + "Identity for unknown unicast traffic."; + } + + identity encapsulation-type { + description + "Identity for the encapsulation type."; + } + + identity ethernet { + base encapsulation-type; + description + "Identity for Ethernet type."; + } + + identity vlan { + base encapsulation-type; + description + "Identity for the VLAN type."; + } + + identity carrierscarrier-type { + description + "Identity of the CsC type."; + } + + identity ldp { + base carrierscarrier-type; + description + "Use LDP as the signaling protocol + between the PE and the CE."; + } + + identity bgp { + base carrierscarrier-type; + description + "Use BGP (as per RFC 8277) as the signaling protocol + between the PE and the CE. + In this case, BGP must also be configured as + the routing protocol."; + } + + identity eth-inf-type { + description + "Identity of the Ethernet interface type."; + } + + identity tagged { + base eth-inf-type; + description + "Identity of the tagged interface type."; + } + + identity untagged { + base eth-inf-type; + description + "Identity of the untagged interface type."; + } + + identity lag { + base eth-inf-type; + description + "Identity of the LAG interface type."; + } + + identity bw-type { + description + "Identity of the bandwidth type."; + } + + identity bw-per-cos { + base bw-type; + description + "Bandwidth is per CoS."; + } + + identity bw-per-port { + base bw-type; + description + "Bandwidth is per site network access."; + } + + identity bw-per-site { + base bw-type; + description + "Bandwidth is per site. It is applicable to + all the site network accesses within the site."; + } + + identity bw-per-svc { + base bw-type; + description + "Bandwidth is per VPN service."; + } + + identity site-vpn-flavor { + description + "Base identity for the site VPN service flavor."; + } + + identity site-vpn-flavor-single { + base site-vpn-flavor; + description + "Identity for the site VPN service flavor. + Used when the site belongs to only one VPN."; + } + + identity site-vpn-flavor-multi { + base site-vpn-flavor; + description + "Identity for the site VPN service flavor. + Used when a logical connection of a site + belongs to multiple VPNs."; + } + identity site-vpn-flavor-nni { + base site-vpn-flavor; + description + "Identity for the site VPN service flavor. + Used to describe an NNI option A connection."; + } + + identity service-type { + description + "Base identity of the service type."; + } + + identity vpws { + base service-type; + description + "Point-to-point Virtual Private Wire Service (VPWS) + service type."; + } + + identity pwe3 { + base service-type; + description + "Pseudowire Emulation Edge to Edge (PWE3) service type."; + } + + identity ldp-l2tp-vpls { + base service-type; + description + "LDP-based or L2TP-based multipoint Virtual Private LAN + Service (VPLS) service type. This VPLS uses LDP-signaled + Pseudowires or L2TP-signaled Pseudowires."; + } + + identity bgp-vpls { + base service-type; + description + "BGP-based multipoint VPLS service type. This VPLS uses a + BGP control plane as described in RFCs 4761 and 6624."; + } + + identity vpws-evpn { + base service-type; + description + "VPWS service type using Ethernet VPNs (EVPNs) + as specified in RFC 7432."; + } + + identity pbb-evpn { + base service-type; + description + "Provider Backbone Bridge (PBB) service type using + EVPNs as specified in RFC 7432."; + } + + identity bundling-type { + description + "The base identity for the bundling type. It supports + multiple CE-VLANs associated with an L2VPN service or + all CE-VLANs associated with an L2VPN service."; + } + + identity multi-svc-bundling { + base bundling-type; + description + "Identity for multi-service bundling, i.e., + multiple CE-VLAN IDs can be associated with an + L2VPN service at a site."; + } + + identity one2one-bundling { + base bundling-type; + description + "Identity for one-to-one service bundling, i.e., + each L2VPN can be associated with only one CE-VLAN ID + at a site."; + } + + identity all2one-bundling { + base bundling-type; + description + "Identity for all-to-one bundling, i.e., all CE-VLAN IDs + are mapped to one L2VPN service."; + } + + identity color-id { + description + "Base identity of the color ID."; + } + + identity color-id-cvlan { + base color-id; + description + "Identity of the color ID based on a CVLAN."; + } + + identity cos-id { + description + "Identity of the CoS ID."; + } + + identity cos-id-pcp { + base cos-id; + description + "Identity of the CoS ID based on the + Port Control Protocol (PCP)."; + } + + identity cos-id-dscp { + base cos-id; + description + "Identity of the CoS ID based on DSCP."; + } + + identity color-type { + description + "Identity of color types."; + } + + identity green { + base color-type; + description + "Identity of the 'green' color type."; + } + + identity yellow { + base color-type; + description + "Identity of the 'yellow' color type."; + } + + identity red { + base color-type; + description + "Identity of the 'red' color type."; + } + + identity policing { + description + "Identity of the type of policing applied."; + } + + identity one-rate-two-color { + base policing; + description + "Identity of one-rate, two-color (1R2C)."; + } + + identity two-rate-three-color { + base policing; + description + "Identity of two-rate, three-color (2R3C)."; + } + + identity bum-type { + description + "Identity of the BUM type."; + } + + identity broadcast { + base bum-type; + description + "Identity of broadcast."; + } + + identity unicast { + base bum-type; + description + "Identity of unicast."; + } + + identity multicast { + base bum-type; + description + "Identity of multicast."; + } + + identity loop-prevention-type { + description + "Identity of loop prevention."; + } + + identity shut { + base loop-prevention-type; + description + "Identity of shut protection."; + } + + identity trap { + base loop-prevention-type; + description + "Identity of trap protection."; + } + identity lacp-state { + description + "Identity of the LACP state."; + } + + identity lacp-on { + base lacp-state; + description + "Identity of LACP on."; + } + + identity lacp-off { + base lacp-state; + description + "Identity of LACP off."; + } + + identity lacp-mode { + description + "Identity of the LACP mode."; + } + + identity lacp-passive { + base lacp-mode; + description + "Identity of LACP passive."; + } + + identity lacp-active { + base lacp-mode; + description + "Identity of LACP active."; + } + + identity lacp-speed { + description + "Identity of the LACP speed."; + } + + identity lacp-fast { + base lacp-speed; + description + "Identity of LACP fast."; + } + + identity lacp-slow { + base lacp-speed; + description + "Identity of LACP slow."; + } + + identity bw-direction { + description + "Identity for the bandwidth direction."; + } + + identity input-bw { + base bw-direction; + description + "Identity for the input bandwidth."; + } + + identity output-bw { + base bw-direction; + description + "Identity for the output bandwidth."; + } + + identity management { + description + "Base identity for the site management scheme."; + } + + identity co-managed { + base management; + description + "Identity for a co-managed site."; + } + + identity customer-managed { + base management; + description + "Identity for a customer-managed site."; + } + + identity provider-managed { + base management; + description + "Identity for a provider-managed site."; + } + + identity address-family { + description + "Identity for an address family."; + } + + identity ipv4 { + base address-family; + description + "Identity for an IPv4 address family."; + } + + identity ipv6 { + base address-family; + description + "Identity for an IPv6 address family."; + } + + identity vpn-topology { + description + "Base identity for the VPN topology."; + } + + identity any-to-any { + base vpn-topology; + description + "Identity for the any-to-any VPN topology."; + } + + identity hub-spoke { + base vpn-topology; + description + "Identity for the Hub-and-Spoke VPN topology."; + } + + identity hub-spoke-disjoint { + base vpn-topology; + description + "Identity for the Hub-and-Spoke VPN topology, + where Hubs cannot communicate with each other."; + } + + identity site-role { + description + "Base identity for a site type."; + } + + identity any-to-any-role { + base site-role; + description + "Site in an any-to-any L2VPN."; + } + + identity spoke-role { + base site-role; + description + "Spoke site in a Hub-and-Spoke L2VPN."; + } + + identity hub-role { + base site-role; + description + "Hub site in a Hub-and-Spoke L2VPN."; + } + + identity pm-type { + description + "Performance-monitoring type."; + } + + identity loss { + base pm-type; + description + "Loss measurement."; + } + + identity delay { + base pm-type; + description + "Delay measurement."; + } + + identity fault-alarm-defect-type { + description + "Indicates the alarm-priority defect (i.e., the + lowest-priority defect that is allowed to + generate a fault alarm)."; + } + + identity remote-rdi { + base fault-alarm-defect-type; + description + "Indicates the aggregate health + of the Remote MEPs."; + } + + identity remote-mac-error { + base fault-alarm-defect-type; + description + "Indicates that one or more of the Remote MEPs are + reporting a failure in their Port Status TLVs or + Interface Status TLVs."; + } + + identity remote-invalid-ccm { + base fault-alarm-defect-type; + description + "Indicates that at least one of the Remote MEP + state machines is not receiving valid + Continuity Check Messages (CCMs) from its Remote MEP."; + } + + identity invalid-ccm { + base fault-alarm-defect-type; + description + "Indicates that one or more invalid CCMs have been + received and that a period of time 3.5 times the length + of those CCMs' transmission intervals has not yet expired."; + } + + identity cross-connect-ccm { + base fault-alarm-defect-type; + description + "Indicates that one or more cross-connect CCMs have been + received and that 3.5 times the period of at least one of + those CCMs' transmission intervals has not yet expired."; + } + + identity frame-delivery-mode { + description + "Delivery types."; + } + + identity discard { + base frame-delivery-mode; + description + "Service frames are discarded."; + } + + identity unconditional { + base frame-delivery-mode; + description + "Service frames are unconditionally delivered to the + destination site."; + } + + identity unknown-discard { + base frame-delivery-mode; + description + "Service frames are conditionally delivered to the + destination site. Packets with unknown destination addresses + will be discarded."; + } + + identity placement-diversity { + description + "Base identity for site placement constraints."; + } + + identity bearer-diverse { + base placement-diversity; + description + "Identity for bearer diversity. + The bearers should not use common elements."; + } + + identity pe-diverse { + base placement-diversity; + description + "Identity for PE diversity."; + } + + identity pop-diverse { + base placement-diversity; + description + "Identity for POP diversity."; + } + + identity linecard-diverse { + base placement-diversity; + description + "Identity for linecard diversity."; + } + + identity same-pe { + base placement-diversity; + description + "Identity for having sites connected on the same PE."; + } + + identity same-bearer { + base placement-diversity; + description + "Identity for having sites connected using the same bearer."; + } + + identity tagged-inf-type { + description + "Identity for the tagged interface type."; + } + + identity priority-tagged { + base tagged-inf-type; + description + "Identity for the priority-tagged interface."; + } + + identity qinq { + base tagged-inf-type; + description + "Identity for the QinQ tagged interface."; + } + + identity dot1q { + base tagged-inf-type; + description + "Identity for the dot1Q VLAN tagged interface."; + } + + identity qinany { + base tagged-inf-type; + description + "Identity for the QinAny tagged interface."; + } + + identity vxlan { + base tagged-inf-type; + description + "Identity for the VXLAN tagged interface."; + } + + identity provision-model { + description + "Base identity for the provision model."; + } + + identity single-side-provision { + description + "Identity for single-sided provisioning with discovery."; + } + + identity doubled-side-provision { + description + "Identity for double-sided provisioning."; + } + + identity mac-learning-mode { + description + "MAC learning mode."; + } + + identity data-plane { + base mac-learning-mode; + description + "User MAC addresses are learned through ARP broadcast."; + } + + identity control-plane { + base mac-learning-mode; + description + "User MAC addresses are advertised through EVPN-BGP."; + } + + identity vpn-policy-filter-type { + description + "Base identity for the filter type."; + } + + identity lan { + base vpn-policy-filter-type; + description + "Identity for a LAN tag filter type."; + } + + identity mac-action { + description + "Base identity for a MAC action."; + } + + identity drop { + base mac-action; + description + "Identity for dropping a packet."; + } + + identity flood { + base mac-action; + description + "Identity for packet flooding."; + } + + identity warning { + base mac-action; + description + "Identity for sending a warning log message."; + } + + identity qos-profile-direction { + description + "Base identity for the QoS-profile direction."; + } + + identity site-to-wan { + base qos-profile-direction; + description + "Identity for the site-to-WAN direction."; + } + + identity wan-to-site { + base qos-profile-direction; + description + "Identity for the WAN-to-site direction."; + } + + identity bidirectional { + base qos-profile-direction; + description + "Identity for both the WAN-to-site direction + and the site-to-WAN direction."; + } + + identity vxlan-peer-mode { + description + "Base identity for the VXLAN peer mode."; + } + + identity static-mode { + base vxlan-peer-mode; + description + "Identity for VXLAN access in the static mode."; + } + + identity bgp-mode { + base vxlan-peer-mode; + description + "Identity for VXLAN access by BGP EVPN learning."; + } + + identity customer-application { + description + "Base identity for a customer application."; + } + identity web { + base customer-application; + description + "Identity for a web application (e.g., HTTP, HTTPS)."; + } + + identity mail { + base customer-application; + description + "Identity for a mail application."; + } + + identity file-transfer { + base customer-application; + description + "Identity for a file-transfer application + (e.g., FTP, SFTP)."; + } + + identity database { + base customer-application; + description + "Identity for a database application."; + } + + identity social { + base customer-application; + description + "Identity for a social-network application."; + } + + identity games { + base customer-application; + description + "Identity for a gaming application."; + } + + identity p2p { + base customer-application; + description + "Identity for a peer-to-peer application."; + } + + identity network-management { + base customer-application; + description + "Identity for a management application + (e.g., Telnet, syslog, SNMP)."; + } + + identity voice { + base customer-application; + description + "Identity for a voice application."; + } + + identity video { + base customer-application; + description + "Identity for a videoconference application."; + } + + identity embb { + base customer-application; + description + "Identity for the enhanced Mobile Broadband (eMBB) + application. Note that the eMBB application + requires strict threshold values for a wide variety + of network performance parameters (e.g., data rate, + latency, loss rate, reliability)."; + } + + identity urllc { + base customer-application; + description + "Identity for the Ultra-Reliable and Low Latency + Communications (URLLC) application. Note that the + URLLC application requires strict threshold values for + a wide variety of network performance parameters + (e.g., latency, reliability)."; + } + + identity mmtc { + base customer-application; + description + "Identity for the massive Machine Type + Communications (mMTC) application. Note that the + mMTC application requires strict threshold values for + a wide variety of network performance parameters + (e.g., data rate, latency, loss rate, reliability)."; + } + + grouping site-acl { + container access-control-list { + if-feature "acl"; + list mac { + key "mac-address"; + leaf mac-address { + type yang:mac-address; + description + "MAC addresses."; + } + description + "List of MAC addresses."; + } + description + "Container for the ACL."; + } + description + "Grouping that defines the ACL."; + } + + grouping site-bum { + container broadcast-unknown-unicast-multicast { + if-feature "bum"; + leaf multicast-site-type { + type enumeration { + enum receiver-only { + description + "The site only has receivers."; + } + enum source-only { + description + "The site only has sources."; + } + enum source-receiver { + description + "The site has both sources and receivers."; + } + } + default "source-receiver"; + description + "Type of multicast site."; + } + list multicast-gp-address-mapping { + key "id"; + leaf id { + type uint16; + description + "Unique identifier for the mapping."; + } + leaf vlan-id { + type uint16 { + range "0..1024"; + } + mandatory true; + description + "The VLAN ID of the multicast group. + The range of the 12-bit VLAN ID is 0 to 1024."; + } + leaf mac-gp-address { + type yang:mac-address; + mandatory true; + description + "The MAC address of the multicast group."; + } + leaf port-lag-number { + type uint32; + description + "The ports/LAGs belonging to the multicast group."; + } + description + "List of port-to-group mappings."; + } + leaf bum-overall-rate { + type uint64; + units "bps"; + description + "Overall rate for BUM."; + } + list bum-rate-per-type { + key "type"; + leaf type { + type identityref { + base bum-type; + } + description + "BUM type."; + } + leaf rate { + type uint64; + units "bps"; + description + "Rate for BUM."; + } + description + "List of limit rates for the BUM type."; + } + description + "Container of BUM configurations."; + } + description + "Grouping for BUM."; + } + + grouping site-mac-loop-prevention { + container mac-loop-prevention { + if-feature "mac-loop-prevention"; + leaf protection-type { + type identityref { + base loop-prevention-type; + } + default "trap"; + description + "Protection type. By default, the protection + type is 'trap'."; + } + leaf frequency { + type uint32; + default "5"; + description + "The number of times to detect MAC duplication, where + a 'duplicate MAC address' situation has occurred and + the duplicate MAC address has been added to a list of + duplicate MAC addresses. By default, the number of + times is 5."; + } + leaf retry-timer { + type uint32; + units "seconds"; + description + "The retry timer. When the retry timer expires, + the duplicate MAC address will be flushed from + the MAC-VRF."; + } + description + "Container of MAC loop-prevention parameters."; + } + description + "Grouping for MAC loop prevention."; + } + + grouping site-service-qos-profile { + container qos { + if-feature "qos"; + container qos-classification-policy { + list rule { + key "id"; + ordered-by user; + leaf id { + type string; + description + "A description identifying the QoS classification + policy rule."; + } + choice match-type { + default "match-flow"; + case match-flow { + container match-flow { + leaf dscp { + type inet:dscp; + description + "DSCP value."; + } + leaf dot1q { + type uint16; + description + "802.1Q matching. It is a VLAN tag added into + a frame."; + } + leaf pcp { + type uint8 { + range "0..7"; + } + description + "PCP value."; + } + leaf src-mac { + type yang:mac-address; + description + "Source MAC."; + } + leaf dst-mac { + type yang:mac-address; + description + "Destination MAC."; + } + leaf color-type { + type identityref { + base color-type; + } + description + "Color types."; + } + leaf-list target-sites { + if-feature "target-sites"; + type svc-id; + description + "Identifies a site as a traffic destination."; + } + leaf any { + type empty; + description + "Allow all."; + } + leaf vpn-id { + type svc-id; + description + "Reference to the target VPN."; + } + description + "Describes flow-matching criteria."; + } + } + case match-application { + leaf match-application { + type identityref { + base customer-application; + } + description + "Defines the application to match."; + } + } + description + "Choice for classification."; + } + leaf target-class-id { + type string; + description + "Identification of the CoS. + This identifier is internal to the + administration."; + } + description + "List of marking rules."; + } + description + "Configuration of the traffic classification policy."; + } + container qos-profile { + choice qos-profile { + description + "Choice for the QoS profile. + Can be a standard profile or a customized profile."; + case standard { + description + "Standard QoS profile."; + leaf profile { + type leafref { + path "/l2vpn-svc/vpn-profiles/" + + "valid-provider-identifiers/" + + "qos-profile-identifier"; + } + description + "QoS profile to be used."; + } + } + case custom { + description + "Customized QoS profile."; + container classes { + if-feature "qos-custom"; + list class { + key "class-id"; + leaf class-id { + type string; + description + "Identification of the CoS. This identifier is + internal to the administration."; + } + leaf direction { + type identityref { + base qos-profile-direction; + } + default "bidirectional"; + description + "The direction in which the QoS profile is + applied. By default, the direction is + bidirectional."; + } + leaf policing { + type identityref { + base policing; + } + default "one-rate-two-color"; + description + "The policing type can be either one-rate, + two-color (1R2C) or two-rate, three-color + (2R3C). By default, the policing type is + 'one-rate-two-color'."; + } + leaf byte-offset { + type uint16; + description + "Number of bytes in the service frame header + that are excluded from the QoS calculation + (e.g., extra VLAN tags)."; + } + container frame-delay { + choice flavor { + case lowest { + leaf use-lowest-latency { + type empty; + description + "The traffic class should use the path + with the lowest delay."; + } + } + case boundary { + leaf delay-bound { + type uint16; + units "milliseconds"; + description + "The traffic class should use a path + with a defined maximum delay."; + } + } + description + "Delay constraint on the traffic class."; + } + description + "Delay constraint on the traffic class."; + } + container frame-jitter { + choice flavor { + case lowest { + leaf use-lowest-jitter { + type empty; + description + "The traffic class should use the path + with the lowest jitter."; + } + } + case boundary { + leaf delay-bound { + type uint32; + units "microseconds"; + description + "The traffic class should use a path + with a defined maximum jitter."; + } + } + description + "Jitter constraint on the traffic class."; + } + description + "Jitter constraint on the traffic class."; + } + container frame-loss { + leaf rate { + type decimal64 { + fraction-digits 2; + range "0..100"; + } + units "percent"; + description + "Frame loss rate constraint on the traffic + class."; + } + description + "Container for frame loss rate."; + } + container bandwidth { + leaf guaranteed-bw-percent { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units "percent"; + mandatory true; + description + "Used to define the guaranteed bandwidth + as a percentage of the available service + bandwidth."; + } + leaf end-to-end { + type empty; + description + "Used if the bandwidth reservation + must be done on the MPLS network too."; + } + description + "Bandwidth constraint on the traffic class."; + } + description + "List of CoS entries."; + } + description + "Container for list of CoS entries."; + } + } + } + description + "Qos profile configuration."; + } + description + "QoS configuration."; + } + description + "Grouping that defines QoS parameters for a site."; + } + + grouping site-service-mpls { + container carrierscarrier { + if-feature "carrierscarrier"; + leaf signaling-type { + type identityref { + base carrierscarrier-type; + } + default "bgp"; + description + "CsC. By default, the signaling type is 'bgp'."; + } + description + "Container for CsC."; + } + description + "Grouping for CsC."; + } + + container l2vpn-svc { + container vpn-profiles { + container valid-provider-identifiers { + leaf-list cloud-identifier { + if-feature "cloud-access"; + type string; + description + "Identification of the public cloud service or + Internet service. Local to each administration."; + } + leaf-list qos-profile-identifier { + type string; + description + "Identification of the QoS profile to be used. + Local to each administration."; + } + leaf-list bfd-profile-identifier { + type string; + description + "Identification of the SP BFD profile to be used. + Local to each administration."; + } + leaf-list remote-carrier-identifier { + type string; + description + "Identification of the remote carrier name to be used. + It can be an L2VPN partner, data-center SP, or + private CSP. Local to each administration."; + } + nacm:default-deny-write; + description + "Container for valid provider identifiers."; + } + description + "Container for VPN profiles."; + } + container vpn-services { + list vpn-service { + key "vpn-id"; + leaf vpn-id { + type svc-id; + description + "Defines a service identifier."; + } + leaf vpn-svc-type { + type identityref { + base service-type; + } + default "vpws"; + description + "Service type. By default, the service type is 'vpws'."; + } + leaf customer-name { + type string; + description + "Customer name."; + } + leaf svc-topo { + type identityref { + base vpn-topology; + } + default "any-to-any"; + description + "Defines the service topology, e.g., + 'any-to-any', 'hub-spoke'."; + } + container cloud-accesses { + if-feature "cloud-access"; + list cloud-access { + key "cloud-identifier"; + leaf cloud-identifier { + type leafref { + path "/l2vpn-svc/vpn-profiles/" + + "valid-provider-identifiers" + + "/cloud-identifier"; + } + description + "Identification of the cloud service. + Local to each administration."; + } + choice list-flavor { + case permit-any { + leaf permit-any { + type empty; + description + "Allow all sites."; + } + } + case deny-any-except { + leaf-list permit-site { + type leafref { + path "/l2vpn-svc/sites/site/site-id"; + } + description + "Site ID to be authorized."; + } + } + case permit-any-except { + leaf-list deny-site { + type leafref { + path "/l2vpn-svc/sites/site/site-id"; + } + description + "Site ID to be denied."; + } + } + description + "Choice for cloud access policy. + By default, all sites in the L2VPN + MUST be authorized to access the cloud."; + } + description + "Cloud access configuration."; + } + description + "Container for cloud access configurations."; + } + container frame-delivery { + if-feature "bum"; + container customer-tree-flavors { + leaf-list tree-flavor { + type identityref { + base multicast-tree-type; + } + description + "Type of tree to be used."; + } + description + "Types of trees used by the customer."; + } + container bum-deliveries { + list bum-delivery { + key "frame-type"; + leaf frame-type { + type identityref { + base tf-type; + } + description + "Type of frame delivery. It supports unicast + frame delivery, multicast frame delivery, + and broadcast frame delivery."; + } + leaf delivery-mode { + type identityref { + base frame-delivery-mode; + } + default "unconditional"; + description + "Defines the frame delivery mode + ('unconditional' (default), 'conditional', + or 'discard'). By default, service frames are + unconditionally delivered to the destination site."; + } + description + "List of frame delivery types and modes."; + } + description + "Defines the frame delivery types and modes."; + } + leaf multicast-gp-port-mapping { + type identityref { + base multicast-gp-address-mapping; + } + mandatory true; + description + "Describes the way in which each interface is + associated with the multicast group."; + } + description + "Multicast global parameters for the VPN service."; + } + container extranet-vpns { + if-feature "extranet-vpn"; + list extranet-vpn { + key "vpn-id"; + leaf vpn-id { + type svc-id; + description + "Identifies the target VPN that the local VPN wants to + access."; + } + leaf local-sites-role { + type identityref { + base site-role; + } + default "any-to-any-role"; + description + "Describes the role of the local sites in the target + VPN topology. In the any-to-any VPN service topology, + the local sites must have the same role, which will be + 'any-to-any-role'. In the Hub-and-Spoke VPN service + topology or the Hub-and-Spoke-Disjoint VPN service + topology, the local sites must have a Hub role or a + Spoke role."; + } + description + "List of extranet VPNs to which the local VPN + is attached."; + } + description + "Container for extranet VPN configurations."; + } + leaf ce-vlan-preservation { + type boolean; + mandatory true; + description + "Preserves the CE-VLAN ID from ingress to egress, i.e., + the CE-VLAN tag of the egress frame is identical to + that of the ingress frame that yielded this + egress service frame. If all-to-one bundling within + a site is enabled, then preservation applies to all + ingress service frames. If all-to-one bundling is + disabled, then preservation applies to tagged + ingress service frames having CE-VLAN IDs 1 through 4094."; + } + leaf ce-vlan-cos-preservation { + type boolean; + mandatory true; + description + "CE VLAN CoS preservation. The PCP bits in the CE-VLAN tag + of the egress frame are identical to those of the + ingress frame that yielded this egress service frame."; + } + leaf carrierscarrier { + if-feature "carrierscarrier"; + type boolean; + default "false"; + description + "The VPN is using CsC, and so MPLS is required."; + } + description + "List of VPN services."; + } + description + "Container for VPN services."; + } + container sites { + list site { + key "site-id"; + leaf site-id { + type string; + description + "Identifier of the site."; + } + leaf site-vpn-flavor { + type identityref { + base site-vpn-flavor; + } + default "site-vpn-flavor-single"; + description + "Defines the way that the VPN multiplexing is + done, e.g., whether the site belongs to + a single VPN site or a multi-VPN site. By + default, the site belongs to a single VPN."; + } + container devices { + when "derived-from-or-self(../management/type, " + + "'l2vpn-svc:provider-managed') or " + + "derived-from-or-self(../management/type, " + + "'l2vpn-svc:co-managed')" { + description + "Applicable only for a provider-managed or + co-managed device."; + } + list device { + key "device-id"; + leaf device-id { + type string; + description + "Identifier for the device."; + } + leaf location { + type leafref { + path "../../../locations/location/location-id"; + } + mandatory true; + description + "Location of the device."; + } + container management { + when "derived-from-or-self(../../../management/type, " + + "'l2vpn-svc:co-managed')" { + description + "Applicable only for a co-managed device."; + } + leaf transport { + type identityref { + base address-family; + } + description + "Transport protocol or address family + used for management."; + } + leaf address { + when '(../ transport)' { + description + "If the address family is specified, then the + address should also be specified. If the + transport is not specified, then the address + should not be specified."; + } + type inet:ip-address; + description + "Management address."; + } + description + "Management configuration. Applicable only for a + co-managed device."; + } + description + "List of devices requested by the customer."; + } + description + "Device configurations."; + } + container management { + leaf type { + type identityref { + base management; + } + mandatory true; + description + "Management type of the connection."; + } + description + "Management configuration."; + } + container locations { + list location { + key "location-id"; + leaf location-id { + type string; + description + "Location ID."; + } + leaf address { + type string; + description + "Address (number and street) of the site."; + } + leaf postal-code { + type string; + description + "Postal code of the site. The format of 'postal-code' + is similar to the 'PC' (postal code) label format + defined in RFC 4119."; + } + leaf state { + type string; + description + "State (region) of the site. This leaf can also be used + to describe a region of a country that does not have + states."; + } + leaf city { + type string; + description + "City of the site."; + } + leaf country-code { + type string; + description + "Country of the site. The format of 'country-code' is + similar to the 'country' label defined in RFC 4119."; + } + description + "List of locations."; + } + description + "Location of the site."; + } + container site-diversity { + if-feature "site-diversity"; + container groups { + list group { + key "group-id"; + leaf group-id { + type string; + description + "The group-id to which the site belongs."; + } + description + "List of group-ids."; + } + description + "Groups to which the site belongs. + All site network accesses will inherit those group + values."; + } + description + "The type of diversity constraint."; + } + container vpn-policies { + list vpn-policy { + key "vpn-policy-id"; + leaf vpn-policy-id { + type string; + description + "Unique identifier for the VPN policy."; + } + list entries { + key "id"; + leaf id { + type string; + description + "Unique identifier for the policy entry."; + } + container filters { + list filter { + key "type"; + ordered-by user; + leaf type { + type identityref { + base vpn-policy-filter-type; + } + description + "Type of VPN policy filter."; + } + leaf-list lan-tag { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:lan')" { + description + "Only applies when the VPN policy filter is a + LAN tag filter."; + } + if-feature "lan-tag"; + type uint32; + description + "List of Ethernet LAN tags to be matched. An + Ethernet LAN tag identifies a particular + broadcast domain in a VPN."; + } + description + "List of filters used on the site. This list can + be augmented."; + } + description + "If a more granular VPN attachment is necessary, + filtering can be used. If used, it permits the + splitting of site LANs among multiple VPNs. The + site LAN can be split based on either the LAN tag or + the LAN prefix. If no filter is used, all the LANs + will be part of the same VPNs with the same role."; + } + list vpn { + key "vpn-id"; + leaf vpn-id { + type leafref { + path "/l2vpn-svc/vpn-services/vpn-service/vpn-id"; + } + description + "Reference to an L2VPN."; + } + leaf site-role { + type identityref { + base site-role; + } + default "any-to-any-role"; + description + "Role of the site in the L2VPN."; + } + description + "List of VPNs with which the LAN is associated."; + } + description + "List of entries for an export policy."; + } + description + "List of VPN policies."; + } + description + "VPN policy."; + } + container service { + uses site-service-qos-profile; + uses site-service-mpls; + description + "Service parameters on the attachment."; + } + uses site-bum; + uses site-mac-loop-prevention; + uses site-acl; + leaf actual-site-start { + type yang:date-and-time; + config false; + description + "This leaf is optional. It indicates the date and time + when the service at a particular site actually started."; + } + leaf actual-site-stop { + type yang:date-and-time; + config false; + description + "This leaf is optional. It indicates the date and time + when the service at a particular site actually stopped."; + } + leaf bundling-type { + type identityref { + base bundling-type; + } + default "one2one-bundling"; + description + "Bundling type. By default, each L2VPN + can be associated with only one + CE-VLAN, i.e., one-to-one bundling is used."; + } + leaf default-ce-vlan-id { + type uint32; + mandatory true; + description + "Default CE VLAN ID set at the site level."; + } + container site-network-accesses { + list site-network-access { + key "network-access-id"; + leaf network-access-id { + type string; + description + "Identifier of network access."; + } + leaf remote-carrier-name { + when "derived-from-or-self(../../../site-vpn-flavor," + + "'l2vpn-svc:site-vpn-flavor-nni')" { + description + "Relevant when the site's VPN flavor is + 'site-vpn-flavor-nni'."; + } + type leafref { + path "/l2vpn-svc/vpn-profiles/" + + "valid-provider-identifiers" + + "/remote-carrier-identifier"; + } + description + "Remote carrier name. The 'remote-carrier-name' + parameter must be configured only when + 'site-vpn-flavor' is set to 'site-vpn-flavor-nni'. + If it is not set, it indicates that the customer + does not know the remote carrier's name + beforehand."; + } + leaf type { + type identityref { + base site-network-access-type; + } + default "point-to-point"; + description + "Describes the type of connection, e.g., + point-to-point or multipoint."; + } + choice location-flavor { + case location { + when "derived-from-or-self(../../management/type, " + + "'l2vpn-svc:customer-managed')" { + description + "Applicable only for a customer-managed device."; + } + leaf location-reference { + type leafref { + path "../../../locations/location/location-id"; + } + description + "Location of the site-network-access."; + } + } + case device { + when "derived-from-or-self(../../management/type, " + + "'l2vpn-svc:provider-managed') or " + + "derived-from-or-self(../../management/type, " + + "'l2vpn-svc:co-managed')" { + description + "Applicable only for a provider-managed + or co-managed device."; + } + leaf device-reference { + type leafref { + path "../../../devices/device/device-id"; + } + description + "Identifier of the CE to use."; + } + } + mandatory true; + description + "Choice of how to describe the site's location."; + } + container access-diversity { + if-feature "site-diversity"; + container groups { + list group { + key "group-id"; + leaf group-id { + type string; + description + "Group-id to which the site belongs."; + } + description + "List of group-ids."; + } + description + "Groups to which the site or site-network-access + belongs."; + } + container constraints { + list constraint { + key "constraint-type"; + leaf constraint-type { + type identityref { + base placement-diversity; + } + description + "The type of diversity constraint."; + } + container target { + choice target-flavor { + default "id"; + case id { + list group { + key "group-id"; + leaf group-id { + type string; + description + "The constraint will apply against this + particular group-id."; + } + description + "List of groups."; + } + } + case all-accesses { + leaf all-other-accesses { + type empty; + description + "The constraint will apply against all other + site network accesses of this site."; + } + } + case all-groups { + leaf all-other-groups { + type empty; + description + "The constraint will apply against all other + groups the customer is managing."; + } + } + description + "Choice for the group definition."; + } + description + "The constraint will apply against + this list of groups."; + } + description + "List of constraints."; + } + description + "Constraints for placing this site network access."; + } + description + "Diversity parameters."; + } + container bearer { + container requested-type { + if-feature "requested-type"; + leaf type { + type string; + description + "Type of requested bearer: Ethernet, ATM, Frame + Relay, IP Layer 2 transport, Frame Relay Data + Link Connection Identifier (DLCI), SONET/SDH, + PPP."; + } + leaf strict { + type boolean; + default "false"; + description + "Defines whether the requested type is a preference + or a strict requirement."; + } + description + "Container for requested types."; + } + leaf always-on { + if-feature "always-on"; + type boolean; + default "true"; + description + "Request for an 'always-on' access type. + For example, this could mean no dial-in access + type."; + } + leaf bearer-reference { + if-feature "bearer-reference"; + type string; + description + "An internal reference for the SP."; + } + description + "Bearer-specific parameters. To be augmented."; + } + container connection { + leaf encapsulation-type { + type identityref { + base encapsulation-type; + } + default "ethernet"; + description + "Encapsulation type. By default, the + encapsulation type is set to 'ethernet'."; + } + leaf eth-inf-type { + type identityref { + base eth-inf-type; + } + default "untagged"; + description + "Ethernet interface type. By default, the + Ethernet interface type is set to 'untagged'."; + } + container tagged-interface { + leaf type { + type identityref { + base tagged-inf-type; + } + default "priority-tagged"; + description + "Tagged interface type. By default, + the type of the tagged interface is + 'priority-tagged'."; + } + container dot1q-vlan-tagged { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:dot1q')" { + description + "Only applies when the type of the tagged + interface is 'dot1q'."; + } + if-feature "dot1q"; + leaf tg-type { + type identityref { + base tag-type; + } + default "c-vlan"; + description + "Tag type. By default, the tag type is + 'c-vlan'."; + } + leaf cvlan-id { + type uint16; + mandatory true; + description + "VLAN identifier."; + } + description + "Tagged interface."; + } + container priority-tagged { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:priority-tagged')" { + description + "Only applies when the type of the tagged + interface is 'priority-tagged'."; + } + leaf tag-type { + type identityref { + base tag-type; + } + default "c-vlan"; + description + "Tag type. By default, the tag type is + 'c-vlan'."; + } + description + "Priority tagged."; + } + container qinq { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:qinq')" { + description + "Only applies when the type of the tagged + interface is 'qinq'."; + } + if-feature "qinq"; + leaf tag-type { + type identityref { + base tag-type; + } + default "c-s-vlan"; + description + "Tag type. By default, the tag type is + 'c-s-vlan'."; + } + leaf svlan-id { + type uint16; + mandatory true; + description + "SVLAN identifier."; + } + leaf cvlan-id { + type uint16; + mandatory true; + description + "CVLAN identifier."; + } + description + "QinQ."; + } + container qinany { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:qinany')" { + description + "Only applies when the type of the tagged + interface is 'qinany'."; + } + if-feature "qinany"; + leaf tag-type { + type identityref { + base tag-type; + } + default "s-vlan"; + description + "Tag type. By default, the tag type is + 's-vlan'."; + } + leaf svlan-id { + type uint16; + mandatory true; + description + "SVLAN ID."; + } + description + "Container for QinAny."; + } + container vxlan { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:vxlan')" { + description + "Only applies when the type of the tagged + interface is 'vxlan'."; + } + if-feature "vxlan"; + leaf vni-id { + type uint32; + mandatory true; + description + "VXLAN Network Identifier (VNI)."; + } + leaf peer-mode { + type identityref { + base vxlan-peer-mode; + } + default "static-mode"; + description + "Specifies the VXLAN access mode. By default, + the peer mode is set to 'static-mode'."; + } + list peer-list { + key "peer-ip"; + leaf peer-ip { + type inet:ip-address; + description + "Peer IP."; + } + description + "List of peer IP addresses."; + } + description + "QinQ."; + } + description + "Container for tagged interfaces."; + } + container untagged-interface { + leaf speed { + type uint32; + units "mbps"; + default "10"; + description + "Port speed."; + } + leaf mode { + type neg-mode; + default "auto-neg"; + description + "Negotiation mode."; + } + leaf phy-mtu { + type uint32; + units "bytes"; + description + "PHY MTU."; + } + leaf lldp { + type boolean; + default "false"; + description + "LLDP. Indicates that LLDP is supported."; + } + container oam-802.3ah-link { + if-feature "oam-3ah"; + leaf enabled { + type boolean; + default "false"; + description + "Indicates whether or not to support + OAM 802.3ah links."; + } + description + "Container for OAM 802.3ah links."; + } + leaf uni-loop-prevention { + type boolean; + default "false"; + description + "If this leaf is set to 'true', then the port + automatically goes down when a physical + loopback is detected."; + } + description + "Container of untagged interface attribute + configurations."; + } + container lag-interfaces { + if-feature "lag-interface"; + list lag-interface { + key "index"; + leaf index { + type string; + description + "LAG interface index."; + } + container lacp { + if-feature "lacp"; + leaf enabled { + type boolean; + default "false"; + description + "LACP on/off. By default, LACP is disabled."; + } + leaf mode { + type neg-mode; + description + "LACP mode. LACP modes have active mode and + passive mode ('false'). 'Active mode' means + initiating the auto-speed negotiation and + trying to form an Ethernet channel with the + other end. 'Passive mode' means not initiating + the negotiation but responding to LACP packets + initiated by the other end (e.g., full duplex + or half duplex)."; + } + leaf speed { + type uint32; + units "mbps"; + default "10"; + description + "LACP speed. By default, the LACP speed is 10 + Mbps."; + } + leaf mini-link-num { + type uint32; + description + "Defines the minimum number of links that must + be active before the aggregating link is put + into service."; + } + leaf system-priority { + type uint16; + default "32768"; + description + "Indicates the LACP priority for the system. + The range is from 0 to 65535. + The default is 32768."; + } + container micro-bfd { + if-feature "micro-bfd"; + leaf enabled { + type enumeration { + enum on { + description + "Micro-bfd on."; + } + enum off { + description + "Micro-bfd off."; + } + } + default "off"; + description + "Micro-BFD on/off. By default, micro-BFD + is set to 'off'."; + } + leaf interval { + type uint32; + units "milliseconds"; + description + "BFD interval."; + } + leaf hold-timer { + type uint32; + units "milliseconds"; + description + "BFD hold timer."; + } + description + "Container of micro-BFD configurations."; + } + container bfd { + if-feature "bfd"; + leaf enabled { + type boolean; + default "false"; + description + "BFD activation. By default, BFD is not + activated."; + } + choice holdtime { + default "fixed"; + case profile { + leaf profile-name { + type leafref { + path "/l2vpn-svc/vpn-profiles/" + + "valid-provider-identifiers" + + "/bfd-profile-identifier"; + } + description + "SP well-known profile."; + } + description + "SP well-known profile."; + } + case fixed { + leaf fixed-value { + type uint32; + units "milliseconds"; + description + "Expected hold time expressed in + milliseconds."; + } + } + description + "Choice for the hold-time flavor."; + } + description + "Container for BFD."; + } + container member-links { + list member-link { + key "name"; + leaf name { + type string; + description + "Member link name."; + } + leaf speed { + type uint32; + units "mbps"; + default "10"; + description + "Port speed."; + } + leaf mode { + type neg-mode; + default "auto-neg"; + description + "Negotiation mode."; + } + leaf link-mtu { + type uint32; + units "bytes"; + description + "Link MTU size."; + } + container oam-802.3ah-link { + if-feature "oam-3ah"; + leaf enabled { + type boolean; + default "false"; + description + "Indicates whether OAM 802.3ah links are + supported."; + } + description + "Container for OAM 802.3ah links."; + } + description + "Member link."; + } + description + "Container of the member link list."; + } + leaf flow-control { + type boolean; + default "false"; + description + "Flow control. Indicates whether flow control + is supported."; + } + leaf lldp { + type boolean; + default "false"; + description + "LLDP. Indicates whether LLDP is supported."; + } + description + "LACP."; + } + description + "List of LAG interfaces."; + } + description + "Container of LAG interface attribute + configurations."; + } + list cvlan-id-to-svc-map { + key "svc-id"; + leaf svc-id { + type leafref { + path "/l2vpn-svc/vpn-services/vpn-service/vpn-id"; + } + description + "VPN service identifier."; + } + list cvlan-id { + key "vid"; + leaf vid { + type uint16; + description + "CVLAN ID."; + } + description + "List of CVLAN-ID-to-SVC-map configurations."; + } + description + "List of CVLAN-ID-to-L2VPN-service-map + configurations."; + } + container l2cp-control { + if-feature "l2cp-control"; + leaf stp-rstp-mstp { + type control-mode; + description + "STP / Rapid STP (RSTP) / Multiple STP (MSTP) + protocol type applicable to all sites."; + } + leaf pause { + type control-mode; + description + "Pause protocol type applicable to all sites."; + } + leaf lacp-lamp { + type control-mode; + description + "LACP / Link Aggregation Marker Protocol (LAMP)."; + } + leaf link-oam { + type control-mode; + description + "Link OAM."; + } + leaf esmc { + type control-mode; + description + "Ethernet Synchronization Messaging Channel + (ESMC)."; + } + leaf l2cp-802.1x { + type control-mode; + description + "IEEE 802.1x."; + } + leaf e-lmi { + type control-mode; + description + "E-LMI."; + } + leaf lldp { + type boolean; + description + "LLDP protocol type applicable to all sites."; + } + leaf ptp-peer-delay { + type control-mode; + description + "Precision Time Protocol (PTP) peer delay."; + } + leaf garp-mrp { + type control-mode; + description + "GARP/MRP."; + } + description + "Container of L2CP control configurations."; + } + container oam { + if-feature "ethernet-oam"; + leaf md-name { + type string; + mandatory true; + description + "Maintenance domain name."; + } + leaf md-level { + type uint16 { + range "0..255"; + } + mandatory true; + description + "Maintenance domain level. The level may be + restricted in certain protocols (e.g., + protocols in Layer 0 to Layer 7)."; + } + list cfm-8021-ag { + if-feature "cfm"; + key "maid"; + leaf maid { + type string; + mandatory true; + description + "Identifies a Maintenance Association (MA)."; + } + leaf mep-id { + type uint32; + description + "Local Maintenance Entity Group End Point (MEP) + ID. The non-existence of this leaf means + that no defects are to be reported."; + } + leaf mep-level { + type uint32; + description + "Defines the MEP level. The non-existence of this + leaf means that no defects are to be reported."; + } + leaf mep-up-down { + type enumeration { + enum up { + description + "MEP up."; + } + enum down { + description + "MEP down."; + } + } + default "up"; + description + "MEP up/down. By default, MEP up is used. + The non-existence of this leaf means that + no defects are to be reported."; + } + leaf remote-mep-id { + type uint32; + description + "Remote MEP ID. The non-existence of this leaf + means that no defects are to be reported."; + } + leaf cos-for-cfm-pdus { + type uint32; + description + "CoS for CFM PDUs. The non-existence of this leaf + means that no defects are to be reported."; + } + leaf ccm-interval { + type uint32; + units "milliseconds"; + default "10000"; + description + "CCM interval. By default, the CCM interval is + 10,000 milliseconds (10 seconds)."; + } + leaf ccm-holdtime { + type uint32; + units "milliseconds"; + default "35000"; + description + "CCM hold time. By default, the CCM hold time + is 3.5 times the CCM interval."; + } + leaf alarm-priority-defect { + type identityref { + base fault-alarm-defect-type; + } + default "remote-invalid-ccm"; + description + "The lowest-priority defect that is + allowed to generate a fault alarm. By default, + 'fault-alarm-defect-type' is set to + 'remote-invalid-ccm'. The non-existence of + this leaf means that no defects are + to be reported."; + } + leaf ccm-p-bits-pri { + type ccm-priority-type; + description + "The priority parameter for CCMs transmitted by + the MEP. The non-existence of this leaf means + that no defects are to be reported."; + } + description + "List of 802.1ag CFM attributes."; + } + list y-1731 { + if-feature "y-1731"; + key "maid"; + leaf maid { + type string; + mandatory true; + description + "Identifies an MA."; + } + leaf mep-id { + type uint32; + description + "Local MEP ID. The non-existence of this leaf + means that no measurements are to be reported."; + } + leaf type { + type identityref { + base pm-type; + } + default "delay"; + description + "Performance-monitoring types. By default, the + performance-monitoring type is set to 'delay'. + The non-existence of this leaf means that no + measurements are to be reported."; + } + leaf remote-mep-id { + type uint32; + description + "Remote MEP ID. The non-existence of this + leaf means that no measurements are to be + reported."; + } + leaf message-period { + type uint32; + units "milliseconds"; + default "10000"; + description + "Defines the interval between Y.1731 + performance-monitoring messages. The message + period is expressed in milliseconds."; + } + leaf measurement-interval { + type uint32; + units "seconds"; + description + "Specifies the measurement interval for + statistics. The measurement interval is + expressed in seconds."; + } + leaf cos { + type uint32; + description + "CoS. The non-existence of this leaf means that + no measurements are to be reported."; + } + leaf loss-measurement { + type boolean; + default "false"; + description + "Indicates whether or not to enable loss + measurement. By default, loss + measurement is not enabled."; + } + leaf synthetic-loss-measurement { + type boolean; + default "false"; + description + "Indicates whether or not to enable synthetic loss + measurement. By default, synthetic loss + measurement is not enabled."; + } + container delay-measurement { + leaf enable-dm { + type boolean; + default "false"; + description + "Indicates whether or not to enable delay + measurement. By default, delay measurement + is not enabled."; + } + leaf two-way { + type boolean; + default "false"; + description + "Indicates whether delay measurement is two-way + ('true') or one-way ('false'). By default, + one-way measurement is enabled."; + } + description + "Container for delay measurement."; + } + leaf frame-size { + type uint32; + units "bytes"; + description + "Frame size. The non-existence of this leaf + means that no measurements are to be reported."; + } + leaf session-type { + type enumeration { + enum proactive { + description + "Proactive mode."; + } + enum on-demand { + description + "On-demand mode."; + } + } + default "on-demand"; + description + "Session type. By default, the session type + is 'on-demand'. The non-existence of this + leaf means that no measurements are to be + reported."; + } + description + "List of configured Y-1731 instances."; + } + description + "Container for Ethernet Service OAM."; + } + description + "Container for connection requirements."; + } + container availability { + leaf access-priority { + type uint32; + default "100"; + description + "Access priority. The higher the access-priority + value, the higher the preference will be for the + access in question."; + } + choice redundancy-mode { + case single-active { + leaf single-active { + type empty; + description + "Single-active mode."; + } + description + "In single-active mode, only one node forwards + traffic to and from the Ethernet segment."; + } + case all-active { + leaf all-active { + type empty; + description + "All-active mode."; + } + description + "In all-active mode, all nodes can forward + traffic."; + } + description + "Redundancy mode choice."; + } + description + "Container of available optional configurations."; + } + container vpn-attachment { + choice attachment-flavor { + case vpn-id { + leaf vpn-id { + type leafref { + path "/l2vpn-svc/vpn-services/vpn-service/vpn-id"; + } + description + "Reference to an L2VPN. Referencing a vpn-id + provides an easy way to attach a particular + logical access to a VPN. In this case, + the vpn-id must be configured."; + } + leaf site-role { + type identityref { + base site-role; + } + default "any-to-any-role"; + description + "Role of the site in the L2VPN. When referencing + a vpn-id, the site-role setting must be added to + express the role of the site in the target VPN + service topology."; + } + } + case vpn-policy-id { + leaf vpn-policy-id { + type leafref { + path "../../../../vpn-policies/vpn-policy/" + + "vpn-policy-id"; + } + description + "Reference to a VPN policy."; + } + } + mandatory true; + description + "Choice for the VPN attachment flavor."; + } + description + "Defines the VPN attachment of a site."; + } + container service { + container svc-bandwidth { + if-feature "input-bw"; + list bandwidth { + key "direction type"; + leaf direction { + type identityref { + base bw-direction; + } + description + "Indicates the bandwidth direction. It can be + the bandwidth download direction from the SP to + the site or the bandwidth upload direction from + the site to the SP."; + } + leaf type { + type identityref { + base bw-type; + } + description + "Bandwidth type. By default, the bandwidth type + is set to 'bw-per-cos'."; + } + leaf cos-id { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:bw-per-cos')" { + description + "Relevant when the bandwidth type is set to + 'bw-per-cos'."; + } + type uint8; + description + "Identifier of the CoS, indicated by DSCP or a + CE-VLAN CoS (802.1p) value in the service frame. + If the bandwidth type is set to 'bw-per-cos', + the CoS ID MUST also be specified."; + } + leaf vpn-id { + when "derived-from-or-self(../type, " + + "'l2vpn-svc:bw-per-svc')" { + description + "Relevant when the bandwidth type is + set as bandwidth per VPN service."; + } + type svc-id; + description + "Identifies the target VPN. If the bandwidth + type is set as bandwidth per VPN service, the + vpn-id MUST be specified."; + } + leaf cir { + type uint64; + units "bps"; + mandatory true; + description + "Committed Information Rate. The maximum number + of bits that a port can receive or send over + an interface in one second."; + } + leaf cbs { + type uint64; + units "bps"; + mandatory true; + description + "Committed Burst Size (CBS). Controls the bursty + nature of the traffic. Traffic that does not + use the configured Committed Information Rate + (CIR) accumulates credits until the credits + reach the configured CBS."; + } + leaf eir { + type uint64; + units "bps"; + description + "Excess Information Rate (EIR), i.e., excess frame + delivery allowed that is not subject to an SLA. + The traffic rate can be limited by the EIR."; + } + leaf ebs { + type uint64; + units "bps"; + description + "Excess Burst Size (EBS). The bandwidth available + for burst traffic from the EBS is subject to the + amount of bandwidth that is accumulated during + periods when traffic allocated by the EIR + policy is not used."; + } + leaf pir { + type uint64; + units "bps"; + description + "Peak Information Rate, i.e., maximum frame + delivery allowed. It is equal to or less + than the sum of the CIR and the EIR."; + } + leaf pbs { + type uint64; + units "bps"; + description + "Peak Burst Size. It is measured in bytes per + second."; + } + description + "List of bandwidth values (e.g., per CoS, + per vpn-id)."; + } + description + "From the customer site's perspective, the service + input/output bandwidth of the connection or + download/upload bandwidth from the SP/site + to the site/SP."; + } + leaf svc-mtu { + type uint16; + units "bytes"; + mandatory true; + description + "SVC MTU. It is also known as the maximum + transmission unit or maximum frame size. When + a frame is larger than the MTU, it is broken + down, or fragmented, into smaller pieces by + the network protocol to accommodate the MTU + of the network. If CsC is enabled, + the requested svc-mtu leaf will refer to the + MPLS MTU and not to the link MTU."; + } + uses site-service-qos-profile; + uses site-service-mpls; + description + "Container for services."; + } + uses site-bum; + uses site-mac-loop-prevention; + uses site-acl; + container mac-addr-limit { + if-feature "mac-addr-limit"; + leaf limit-number { + type uint16; + default "2"; + description + "Maximum number of MAC addresses learned from + the subscriber for a single service instance. + The default allowed maximum number of MAC + addresses is 2."; + } + leaf time-interval { + type uint32; + units "seconds"; + default "300"; + description + "The aging time of the MAC address. By default, + the aging time is set to 300 seconds."; + } + leaf action { + type identityref { + base mac-action; + } + default "warning"; + description + "Specifies the action taken when the upper limit is + exceeded: drop the packet, flood the packet, or + simply send a warning log message. By default, + the action is set to 'warning'."; + } + description + "Container of MAC address limit configurations."; + } + description + "List of site network accesses."; + } + description + "Container of port configurations."; + } + description + "List of sites."; + } + description + "Container of site configurations."; + } + description + "Container for L2VPN services."; + } +} diff --git a/models/ietf/RFC/ietf-l3-unicast-topology-state.yang b/models/ietf/RFC/ietf-l3-unicast-topology-state.yang new file mode 100644 index 0000000000000000000000000000000000000000..b0be233e56a86628577cbcd9df870726cc9655a5 --- /dev/null +++ b/models/ietf/RFC/ietf-l3-unicast-topology-state.yang @@ -0,0 +1,159 @@ +module ietf-l3-unicast-topology-state { + yang-version 1.1; + namespace + "urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology-state"; + prefix "l3t-s"; + import ietf-network-state { + prefix "nw-s"; + } + import ietf-network-topology-state { + prefix "nt-s"; + } + import ietf-l3-unicast-topology { + prefix "l3t"; + } + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + Editor: Jan Medved + <mailto:jmedved@cisco.com> + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com>"; + description + "This module defines a model for Layer 3 Unicast topology + state, representing topology that either is learned or + results from applying topology that has been configured per + the 'ietf-l3-unicast-topology' model, mirroring the + corresponding data nodes in this model. + + This model mirrors 'ietf-l3-unicast-topology' but contains only + read-only state data. The model is not needed when the + underlying implementation infrastructure supports the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8346; + see the RFC itself for full legal notices."; + revision "2018-02-26" { + description + "Initial revision."; + reference + "RFC 8346: A YANG Data Model for Layer 3 Topologies"; + } + augment "/nw-s:networks/nw-s:network/nw-s:network-types" { + description + "Introduce new network type for L3 Unicast topology"; + uses l3t:l3-unicast-topology-type; + } + augment "/nw-s:networks/nw-s:network" { + when "nw-s:network-types/l3t-s:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast for the network as a whole"; + uses l3t:l3-topology-attributes; + } + augment "/nw-s:networks/nw-s:network/nw-s:node" { + when "../nw-s:network-types/l3t-s:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast node-level attributes "; + uses l3t:l3-node-attributes; + } + augment "/nw-s:networks/nw-s:network/nt-s:link" { + when "../nw-s:network-types/l3t-s:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "Augments topology link attributes"; + uses l3t:l3-link-attributes; + } + augment "/nw-s:networks/nw-s:network/nw-s:node/" + +"nt-s:termination-point" { + when "../../nw-s:network-types/l3t-s:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description "Augments topology termination point configuration"; + uses l3t:l3-termination-point-attributes; + } + notification l3-node-event { + description + "Notification event for L3 node"; + leaf l3-event-type { + type l3t:l3-event-type; + description + "Event type"; + } + uses nw-s:node-ref; + uses l3t:l3-unicast-topology-type; + uses l3t:l3-node-attributes; + } + notification l3-link-event { + description + "Notification event for L3 link"; + leaf l3-event-type { + type l3t:l3-event-type; + description + "Event type"; + } + uses nt-s:link-ref; + uses l3t:l3-unicast-topology-type; + uses l3t:l3-link-attributes; + } + notification l3-prefix-event { + description + "Notification event for L3 prefix"; + leaf l3-event-type { + type l3t:l3-event-type; + description + "Event type"; + } + uses nw-s:node-ref; + uses l3t:l3-unicast-topology-type; + container prefix { + description + "Contains L3 prefix attributes"; + uses l3t:l3-prefix-attributes; + } + } + notification termination-point-event { + description + "Notification event for L3 termination point"; + leaf l3-event-type { + type l3t:l3-event-type; + description + "Event type"; + } + uses nt-s:tp-ref; + uses l3t:l3-unicast-topology-type; + uses l3t:l3-termination-point-attributes; + } +} diff --git a/models/ietf/RFC/ietf-l3-unicast-topology-state@2018-02-26.yang b/models/ietf/RFC/ietf-l3-unicast-topology-state@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..b0be233e56a86628577cbcd9df870726cc9655a5 --- /dev/null +++ b/models/ietf/RFC/ietf-l3-unicast-topology-state@2018-02-26.yang @@ -0,0 +1,159 @@ +module ietf-l3-unicast-topology-state { + yang-version 1.1; + namespace + "urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology-state"; + prefix "l3t-s"; + import ietf-network-state { + prefix "nw-s"; + } + import ietf-network-topology-state { + prefix "nt-s"; + } + import ietf-l3-unicast-topology { + prefix "l3t"; + } + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + Editor: Jan Medved + <mailto:jmedved@cisco.com> + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com>"; + description + "This module defines a model for Layer 3 Unicast topology + state, representing topology that either is learned or + results from applying topology that has been configured per + the 'ietf-l3-unicast-topology' model, mirroring the + corresponding data nodes in this model. + + This model mirrors 'ietf-l3-unicast-topology' but contains only + read-only state data. The model is not needed when the + underlying implementation infrastructure supports the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8346; + see the RFC itself for full legal notices."; + revision "2018-02-26" { + description + "Initial revision."; + reference + "RFC 8346: A YANG Data Model for Layer 3 Topologies"; + } + augment "/nw-s:networks/nw-s:network/nw-s:network-types" { + description + "Introduce new network type for L3 Unicast topology"; + uses l3t:l3-unicast-topology-type; + } + augment "/nw-s:networks/nw-s:network" { + when "nw-s:network-types/l3t-s:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast for the network as a whole"; + uses l3t:l3-topology-attributes; + } + augment "/nw-s:networks/nw-s:network/nw-s:node" { + when "../nw-s:network-types/l3t-s:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast node-level attributes "; + uses l3t:l3-node-attributes; + } + augment "/nw-s:networks/nw-s:network/nt-s:link" { + when "../nw-s:network-types/l3t-s:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "Augments topology link attributes"; + uses l3t:l3-link-attributes; + } + augment "/nw-s:networks/nw-s:network/nw-s:node/" + +"nt-s:termination-point" { + when "../../nw-s:network-types/l3t-s:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description "Augments topology termination point configuration"; + uses l3t:l3-termination-point-attributes; + } + notification l3-node-event { + description + "Notification event for L3 node"; + leaf l3-event-type { + type l3t:l3-event-type; + description + "Event type"; + } + uses nw-s:node-ref; + uses l3t:l3-unicast-topology-type; + uses l3t:l3-node-attributes; + } + notification l3-link-event { + description + "Notification event for L3 link"; + leaf l3-event-type { + type l3t:l3-event-type; + description + "Event type"; + } + uses nt-s:link-ref; + uses l3t:l3-unicast-topology-type; + uses l3t:l3-link-attributes; + } + notification l3-prefix-event { + description + "Notification event for L3 prefix"; + leaf l3-event-type { + type l3t:l3-event-type; + description + "Event type"; + } + uses nw-s:node-ref; + uses l3t:l3-unicast-topology-type; + container prefix { + description + "Contains L3 prefix attributes"; + uses l3t:l3-prefix-attributes; + } + } + notification termination-point-event { + description + "Notification event for L3 termination point"; + leaf l3-event-type { + type l3t:l3-event-type; + description + "Event type"; + } + uses nt-s:tp-ref; + uses l3t:l3-unicast-topology-type; + uses l3t:l3-termination-point-attributes; + } +} diff --git a/models/ietf/RFC/ietf-l3-unicast-topology.yang b/models/ietf/RFC/ietf-l3-unicast-topology.yang new file mode 100644 index 0000000000000000000000000000000000000000..39fcebd767bf7ea687de523b0dd0ba731d3c80e7 --- /dev/null +++ b/models/ietf/RFC/ietf-l3-unicast-topology.yang @@ -0,0 +1,359 @@ +module ietf-l3-unicast-topology { + yang-version 1.1; + namespace + "urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology"; + prefix "l3t"; + import ietf-network { + prefix "nw"; + } + import ietf-network-topology { + prefix "nt"; + } + import ietf-inet-types { + prefix "inet"; + } + import ietf-routing-types { + prefix "rt-types"; + } + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + Editor: Jan Medved + <mailto:jmedved@cisco.com> + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com>"; + description + "This module defines a model for Layer 3 Unicast + topologies. + + Copyright (c) 2018 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 Simplified 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 8346; see the RFC itself for full legal notices."; + revision "2018-02-26" { + description + "Initial revision."; + reference + "RFC 8346: A YANG Data Model for Layer 3 Topologies"; + } + + identity flag-identity { + description "Base type for flags"; + } + + typedef l3-event-type { + type enumeration { + enum "add" { + description + "A Layer 3 node, link, prefix, or termination point has + been added"; + } + enum "remove" { + description + "A Layer 3 node, link, prefix, or termination point has + been removed"; + } + enum "update" { + description + "A Layer 3 node, link, prefix, or termination point has + been updated"; + } + } + description "Layer 3 event type for notifications"; + } + + typedef prefix-flag-type { + type identityref { + base "flag-identity"; + } + description "Prefix flag attributes"; + } + + typedef node-flag-type { + type identityref { + base "flag-identity"; + } + description "Node flag attributes"; + } + + typedef link-flag-type { + type identityref { + base "flag-identity"; + } + description "Link flag attributes"; + } + + typedef l3-flag-type { + type identityref { + base "flag-identity"; + } + description "L3 flag attributes"; + } + + grouping l3-prefix-attributes { + description + "L3 prefix attributes"; + leaf prefix { + type inet:ip-prefix; + description + "IP prefix value"; + } + leaf metric { + type uint32; + description + "Prefix metric"; + } + leaf-list flag { + type prefix-flag-type; + description + "Prefix flags"; + } + } + grouping l3-unicast-topology-type { + description "Identifies the topology type to be L3 Unicast."; + container l3-unicast-topology { + presence "indicates L3 Unicast topology"; + description + "The presence of the container node indicates L3 Unicast + topology"; + } + } + grouping l3-topology-attributes { + description "Topology scope attributes"; + container l3-topology-attributes { + description "Contains topology attributes"; + leaf name { + type string; + description + "Name of the topology"; + } + leaf-list flag { + type l3-flag-type; + description + "Topology flags"; + } + } + } + grouping l3-node-attributes { + description "L3 node scope attributes"; + container l3-node-attributes { + description + "Contains node attributes"; + leaf name { + type inet:domain-name; + description + "Node name"; + } + leaf-list flag { + type node-flag-type; + description + "Node flags"; + } + leaf-list router-id { + type rt-types:router-id; + description + "Router-id for the node"; + } + list prefix { + key "prefix"; + description + "A list of prefixes along with their attributes"; + uses l3-prefix-attributes; + } + } + } + grouping l3-link-attributes { + description + "L3 link scope attributes"; + container l3-link-attributes { + description + "Contains link attributes"; + leaf name { + type string; + description + "Link Name"; + } + leaf-list flag { + type link-flag-type; + description + "Link flags"; + } + leaf metric1 { + type uint64; + description + "Link Metric 1"; + } + leaf metric2 { + type uint64; + description + "Link Metric 2"; + } + } + } + grouping l3-termination-point-attributes { + description "L3 termination point scope attributes"; + container l3-termination-point-attributes { + description + "Contains termination point attributes"; + choice termination-point-type { + description + "Indicates the termination point type"; + case ip { + leaf-list ip-address { + type inet:ip-address; + description + "IPv4 or IPv6 address."; + } + } + case unnumbered { + leaf unnumbered-id { + type uint32; + description + "Unnumbered interface identifier. + The identifier will correspond to the ifIndex value + of the interface, i.e., the ifIndex value of the + ifEntry that represents the interface in + implementations where the Interfaces Group MIB + (RFC 2863) is supported."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + } + case interface-name { + leaf interface-name { + type string; + description + "Name of the interface. The name can (but does not + have to) correspond to an interface reference of a + containing node's interface, i.e., the path name of a + corresponding interface data node on the containing + node reminiscent of data type interface-ref defined + in RFC 8343. It should be noted that data type + interface-ref of RFC 8343 cannot be used directly, + + as this data type is used to reference an interface + in a datastore of a single node in the network, not + to uniquely reference interfaces across a network."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + } + } + } + } + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduces new network type for L3 Unicast topology"; + uses l3-unicast-topology-type; + } + augment "/nw:networks/nw:network" { + when "nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast for the network as a whole"; + uses l3-topology-attributes; + } + augment "/nw:networks/nw:network/nw:node" { + when "../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast node-level attributes "; + uses l3-node-attributes; + } + augment "/nw:networks/nw:network/nt:link" { + when "../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "Augments topology link attributes"; + uses l3-link-attributes; + } + augment "/nw:networks/nw:network/nw:node/" + +"nt:termination-point" { + when "../../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description "Augments topology termination point configuration"; + uses l3-termination-point-attributes; + } + notification l3-node-event { + description + "Notification event for L3 node"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nw:node-ref; + uses l3-unicast-topology-type; + uses l3-node-attributes; + } + notification l3-link-event { + description + "Notification event for L3 link"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nt:link-ref; + uses l3-unicast-topology-type; + uses l3-link-attributes; + } + notification l3-prefix-event { + description + "Notification event for L3 prefix"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nw:node-ref; + uses l3-unicast-topology-type; + container prefix { + description + "Contains L3 prefix attributes"; + uses l3-prefix-attributes; + } + } + notification termination-point-event { + description + "Notification event for L3 termination point"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nt:tp-ref; + uses l3-unicast-topology-type; + uses l3-termination-point-attributes; + } +} diff --git a/models/ietf/RFC/ietf-l3-unicast-topology@2018-02-26.yang b/models/ietf/RFC/ietf-l3-unicast-topology@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..39fcebd767bf7ea687de523b0dd0ba731d3c80e7 --- /dev/null +++ b/models/ietf/RFC/ietf-l3-unicast-topology@2018-02-26.yang @@ -0,0 +1,359 @@ +module ietf-l3-unicast-topology { + yang-version 1.1; + namespace + "urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology"; + prefix "l3t"; + import ietf-network { + prefix "nw"; + } + import ietf-network-topology { + prefix "nt"; + } + import ietf-inet-types { + prefix "inet"; + } + import ietf-routing-types { + prefix "rt-types"; + } + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + Editor: Jan Medved + <mailto:jmedved@cisco.com> + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com>"; + description + "This module defines a model for Layer 3 Unicast + topologies. + + Copyright (c) 2018 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 Simplified 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 8346; see the RFC itself for full legal notices."; + revision "2018-02-26" { + description + "Initial revision."; + reference + "RFC 8346: A YANG Data Model for Layer 3 Topologies"; + } + + identity flag-identity { + description "Base type for flags"; + } + + typedef l3-event-type { + type enumeration { + enum "add" { + description + "A Layer 3 node, link, prefix, or termination point has + been added"; + } + enum "remove" { + description + "A Layer 3 node, link, prefix, or termination point has + been removed"; + } + enum "update" { + description + "A Layer 3 node, link, prefix, or termination point has + been updated"; + } + } + description "Layer 3 event type for notifications"; + } + + typedef prefix-flag-type { + type identityref { + base "flag-identity"; + } + description "Prefix flag attributes"; + } + + typedef node-flag-type { + type identityref { + base "flag-identity"; + } + description "Node flag attributes"; + } + + typedef link-flag-type { + type identityref { + base "flag-identity"; + } + description "Link flag attributes"; + } + + typedef l3-flag-type { + type identityref { + base "flag-identity"; + } + description "L3 flag attributes"; + } + + grouping l3-prefix-attributes { + description + "L3 prefix attributes"; + leaf prefix { + type inet:ip-prefix; + description + "IP prefix value"; + } + leaf metric { + type uint32; + description + "Prefix metric"; + } + leaf-list flag { + type prefix-flag-type; + description + "Prefix flags"; + } + } + grouping l3-unicast-topology-type { + description "Identifies the topology type to be L3 Unicast."; + container l3-unicast-topology { + presence "indicates L3 Unicast topology"; + description + "The presence of the container node indicates L3 Unicast + topology"; + } + } + grouping l3-topology-attributes { + description "Topology scope attributes"; + container l3-topology-attributes { + description "Contains topology attributes"; + leaf name { + type string; + description + "Name of the topology"; + } + leaf-list flag { + type l3-flag-type; + description + "Topology flags"; + } + } + } + grouping l3-node-attributes { + description "L3 node scope attributes"; + container l3-node-attributes { + description + "Contains node attributes"; + leaf name { + type inet:domain-name; + description + "Node name"; + } + leaf-list flag { + type node-flag-type; + description + "Node flags"; + } + leaf-list router-id { + type rt-types:router-id; + description + "Router-id for the node"; + } + list prefix { + key "prefix"; + description + "A list of prefixes along with their attributes"; + uses l3-prefix-attributes; + } + } + } + grouping l3-link-attributes { + description + "L3 link scope attributes"; + container l3-link-attributes { + description + "Contains link attributes"; + leaf name { + type string; + description + "Link Name"; + } + leaf-list flag { + type link-flag-type; + description + "Link flags"; + } + leaf metric1 { + type uint64; + description + "Link Metric 1"; + } + leaf metric2 { + type uint64; + description + "Link Metric 2"; + } + } + } + grouping l3-termination-point-attributes { + description "L3 termination point scope attributes"; + container l3-termination-point-attributes { + description + "Contains termination point attributes"; + choice termination-point-type { + description + "Indicates the termination point type"; + case ip { + leaf-list ip-address { + type inet:ip-address; + description + "IPv4 or IPv6 address."; + } + } + case unnumbered { + leaf unnumbered-id { + type uint32; + description + "Unnumbered interface identifier. + The identifier will correspond to the ifIndex value + of the interface, i.e., the ifIndex value of the + ifEntry that represents the interface in + implementations where the Interfaces Group MIB + (RFC 2863) is supported."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + } + case interface-name { + leaf interface-name { + type string; + description + "Name of the interface. The name can (but does not + have to) correspond to an interface reference of a + containing node's interface, i.e., the path name of a + corresponding interface data node on the containing + node reminiscent of data type interface-ref defined + in RFC 8343. It should be noted that data type + interface-ref of RFC 8343 cannot be used directly, + + as this data type is used to reference an interface + in a datastore of a single node in the network, not + to uniquely reference interfaces across a network."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + } + } + } + } + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduces new network type for L3 Unicast topology"; + uses l3-unicast-topology-type; + } + augment "/nw:networks/nw:network" { + when "nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast for the network as a whole"; + uses l3-topology-attributes; + } + augment "/nw:networks/nw:network/nw:node" { + when "../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast node-level attributes "; + uses l3-node-attributes; + } + augment "/nw:networks/nw:network/nt:link" { + when "../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "Augments topology link attributes"; + uses l3-link-attributes; + } + augment "/nw:networks/nw:network/nw:node/" + +"nt:termination-point" { + when "../../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description "Augments topology termination point configuration"; + uses l3-termination-point-attributes; + } + notification l3-node-event { + description + "Notification event for L3 node"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nw:node-ref; + uses l3-unicast-topology-type; + uses l3-node-attributes; + } + notification l3-link-event { + description + "Notification event for L3 link"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nt:link-ref; + uses l3-unicast-topology-type; + uses l3-link-attributes; + } + notification l3-prefix-event { + description + "Notification event for L3 prefix"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nw:node-ref; + uses l3-unicast-topology-type; + container prefix { + description + "Contains L3 prefix attributes"; + uses l3-prefix-attributes; + } + } + notification termination-point-event { + description + "Notification event for L3 termination point"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nt:tp-ref; + uses l3-unicast-topology-type; + uses l3-termination-point-attributes; + } +} diff --git a/models/ietf/RFC/ietf-l3vpn-svc.yang b/models/ietf/RFC/ietf-l3vpn-svc.yang new file mode 100644 index 0000000000000000000000000000000000000000..9c2ab5a3fe55a663998a7fbbc9a8bfcd8e4d911d --- /dev/null +++ b/models/ietf/RFC/ietf-l3vpn-svc.yang @@ -0,0 +1,2797 @@ +module ietf-l3vpn-svc { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l3vpn-svc"; + prefix l3vpn-svc; + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + organization + "IETF L3SM Working Group"; + contact + "WG List: <mailto:l3sm@ietf.org> + Editor: + L3SM WG + Chairs: + Adrian Farrel, Qin Wu + "; + description + "This YANG module defines a generic service configuration + model for Layer 3 VPNs. This model is common across all + vendor implementations. + + Copyright (c) 2018 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 Simplified 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 8299; see + the RFC itself for full legal notices."; + + revision 2018-01-19 { + description + "Revision of RFC 8049 to fix implementation issues."; + reference + "RFC 8299"; + } + revision 2017-01-27 { + description + "Initial document."; + reference + "RFC 8049."; + } + /* Features */ + feature cloud-access { + description + "Allows the VPN to connect to a CSP."; + } + feature multicast { + description + "Enables multicast capabilities in a VPN."; + } + feature ipv4 { + description + "Enables IPv4 support in a VPN."; + } + feature ipv6 { + description + "Enables IPv6 support in a VPN."; + } + feature lan-tag { + description + "Enables LAN Tag support in a VPN Policy filter."; + } + feature carrierscarrier { + description + "Enables support of CsC."; + } + feature extranet-vpn { + description + "Enables support of extranet VPNs."; + } + feature site-diversity { + description + "Enables support of site diversity constraints."; + } + feature encryption { + description + "Enables support of encryption."; + } + feature qos { + description + "Enables support of classes of services."; + } + feature qos-custom { + description + "Enables support of the custom QoS profile."; + } + feature rtg-bgp { + description + "Enables support of the BGP routing protocol."; + } + feature rtg-rip { + description + "Enables support of the RIP routing protocol."; + } + feature rtg-ospf { + description + "Enables support of the OSPF routing protocol."; + } + feature rtg-ospf-sham-link { + description + "Enables support of OSPF sham links."; + } + feature rtg-vrrp { + description + "Enables support of the VRRP routing protocol."; + } + feature fast-reroute { + description + "Enables support of Fast Reroute."; + } + feature bfd { + description + "Enables support of BFD."; + } + feature always-on { + description + "Enables support of the 'always-on' access constraint."; + } + feature requested-type { + description + "Enables support of the 'requested-type' access constraint."; + } + feature bearer-reference { + description + "Enables support of the 'bearer-reference' access constraint."; + } + feature target-sites { + description + "Enables support of the 'target-sites' match flow parameter."; + } + /* Typedefs */ + typedef svc-id { + type string; + description + "Defines a type of service component identifier."; + } + typedef template-id { + type string; + description + "Defines a type of service template identifier."; + } + typedef address-family { + type enumeration { + enum ipv4 { + description + "IPv4 address family."; + } + enum ipv6 { + description + "IPv6 address family."; + } + } + description + "Defines a type for the address family."; + } + /* Identities */ + identity site-network-access-type { + description + "Base identity for site-network-access type."; + } + identity point-to-point { + base site-network-access-type; + description + "Identity for point-to-point connection."; + } + identity multipoint { + base site-network-access-type; + description + "Identity for multipoint connection. + Example: Ethernet broadcast segment."; + } + identity placement-diversity { + description + "Base identity for site placement constraints."; + } + identity bearer-diverse { + base placement-diversity; + description + "Identity for bearer diversity. + The bearers should not use common elements."; + } + identity pe-diverse { + base placement-diversity; + description + "Identity for PE diversity."; + } + identity pop-diverse { + base placement-diversity; + description + "Identity for POP diversity."; + } + identity linecard-diverse { + base placement-diversity; + description + "Identity for linecard diversity."; + } + identity same-pe { + base placement-diversity; + description + "Identity for having sites connected on the same PE."; + } + identity same-bearer { + base placement-diversity; + description + "Identity for having sites connected using the same bearer."; + } + identity customer-application { + description + "Base identity for customer application."; + } + identity web { + base customer-application; + description + "Identity for Web application (e.g., HTTP, HTTPS)."; + } + identity mail { + base customer-application; + description + "Identity for mail application."; + } + identity file-transfer { + base customer-application; + description + "Identity for file transfer application (e.g., FTP, SFTP)."; + } + identity database { + base customer-application; + description + "Identity for database application."; + } + identity social { + base customer-application; + description + "Identity for social-network application."; + } + identity games { + base customer-application; + description + "Identity for gaming application."; + } + identity p2p { + base customer-application; + description + "Identity for peer-to-peer application."; + } + identity network-management { + base customer-application; + description + "Identity for management application + (e.g., Telnet, syslog, SNMP)."; + } + identity voice { + base customer-application; + description + "Identity for voice application."; + } + identity video { + base customer-application; + description + "Identity for video conference application."; + } + identity embb { + base customer-application; + description + "Identity for an enhanced Mobile Broadband (eMBB) + application. Note that an eMBB application demands + network performance with a wide variety of + characteristics, such as data rate, latency, + loss rate, reliability, and many other parameters."; +} +identity urllc { + base customer-application; + description + "Identity for an Ultra-Reliable and Low Latency + Communications (URLLC) application. Note that a + URLLC application demands network performance + with a wide variety of characteristics, such as latency, + reliability, and many other parameters."; + } + identity mmtc { + base customer-application; + description + "Identity for a massive Machine Type + Communications (mMTC) application. Note that an + mMTC application demands network performance + with a wide variety of characteristics, such as data + rate, latency, loss rate, reliability, and many + other parameters."; + } + identity site-vpn-flavor { + description + "Base identity for the site VPN service flavor."; + } + identity site-vpn-flavor-single { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when the site belongs to only one VPN."; + } + identity site-vpn-flavor-multi { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when a logical connection of a site + belongs to multiple VPNs."; + } + identity site-vpn-flavor-sub { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when a site has multiple logical connections. + Each connection may belong to different multiple VPNs."; + } + identity site-vpn-flavor-nni { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used to describe an NNI option A connection."; + } + identity management { + description + "Base identity for site management scheme."; + } + identity co-managed { + base management; + description + "Base identity for co-managed site."; + } + identity customer-managed { + base management; + description + "Base identity for customer-managed site."; + } + identity provider-managed { + base management; + description + "Base identity for provider-managed site."; + } + identity address-allocation-type { + description + "Base identity for address-allocation-type for PE-CE link."; + } + identity provider-dhcp { + base address-allocation-type; + description + "Provider network provides DHCP service to customer."; + } + identity provider-dhcp-relay { + base address-allocation-type; + description + "Provider network provides DHCP relay service to customer."; + } + identity provider-dhcp-slaac { + base address-allocation-type; + description + "Provider network provides DHCP service to customer, + as well as SLAAC."; + } + identity static-address { + base address-allocation-type; + description + "Provider-to-customer addressing is static."; + } + identity slaac { + base address-allocation-type; + description + "Use IPv6 SLAAC."; + } + identity site-role { + description + "Base identity for site type."; + } + identity any-to-any-role { + base site-role; + description + "Site in an any-to-any IP VPN."; + } + identity spoke-role { + base site-role; + description + "Spoke site in a Hub-and-Spoke IP VPN."; + } + identity hub-role { + base site-role; + description + "Hub site in a Hub-and-Spoke IP VPN."; + } + identity vpn-topology { + description + "Base identity for VPN topology."; + } + identity any-to-any { + base vpn-topology; + description + "Identity for any-to-any VPN topology."; + } + identity hub-spoke { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology."; + } + identity hub-spoke-disjoint { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology + where Hubs cannot communicate with each other."; + } + identity multicast-tree-type { + description + "Base identity for multicast tree type."; + } + identity ssm-tree-type { + base multicast-tree-type; + description + "Identity for SSM tree type."; + } + identity asm-tree-type { + base multicast-tree-type; + description + "Identity for ASM tree type."; + } + identity bidir-tree-type { + base multicast-tree-type; + description + "Identity for bidirectional tree type."; + } + identity multicast-rp-discovery-type { + description + "Base identity for RP discovery type."; + } + identity auto-rp { + base multicast-rp-discovery-type; + description + "Base identity for Auto-RP discovery type."; + } + identity static-rp { + base multicast-rp-discovery-type; + description + "Base identity for static type."; + } + identity bsr-rp { + base multicast-rp-discovery-type; + description + "Base identity for BSR discovery type."; + } + identity routing-protocol-type { + description + "Base identity for routing protocol type."; + } + identity ospf { + base routing-protocol-type; + description + "Identity for OSPF protocol type."; + } + identity bgp { + base routing-protocol-type; + description + "Identity for BGP protocol type."; + } + identity static { + base routing-protocol-type; + description + "Identity for static routing protocol type."; + } + identity rip { + base routing-protocol-type; + description + "Identity for RIP protocol type."; + } + identity vrrp { + base routing-protocol-type; + description + "Identity for VRRP protocol type. + This is to be used when LANs are directly connected + to PE routers."; + } + identity direct { + base routing-protocol-type; + description + "Identity for direct protocol type."; + } + identity protocol-type { + description + "Base identity for protocol field type."; + } + identity tcp { + base protocol-type; + description + "TCP protocol type."; + } + identity udp { + base protocol-type; + description + "UDP protocol type."; + } + + identity icmp { + base protocol-type; + description + "ICMP protocol type."; + } + identity icmp6 { + base protocol-type; + description + "ICMPv6 protocol type."; + } + identity gre { + base protocol-type; + description + "GRE protocol type."; + } + identity ipip { + base protocol-type; + description + "IP-in-IP protocol type."; + } + identity hop-by-hop { + base protocol-type; + description + "Hop-by-Hop IPv6 header type."; + } + identity routing { + base protocol-type; + description + "Routing IPv6 header type."; + } + identity esp { + base protocol-type; + description + "ESP header type."; + } + identity ah { + base protocol-type; + description + "AH header type."; + } + identity vpn-policy-filter-type { + description + "Base identity for VPN Policy filter type."; + } + identity ipv4 { + base vpn-policy-filter-type; + description + "Identity for IPv4 Prefix filter type."; + } + identity ipv6 { + base vpn-policy-filter-type; + description + "Identity for IPv6 Prefix filter type."; +} + identity lan { + base vpn-policy-filter-type; + description + "Identity for LAN Tag filter type."; +} + + identity qos-profile-direction { + description + "Base identity for QoS profile direction."; + } + + identity site-to-wan { + base qos-profile-direction; + description + "Identity for Site-to-WAN direction."; + } + identity wan-to-site { + base qos-profile-direction; + description + "Identity for WAN-to-Site direction."; + } + identity both { + base qos-profile-direction; + description + "Identity for both WAN-to-Site direction + and Site-to-WAN direction."; + } + /* Groupings */ + grouping vpn-service-cloud-access { + container cloud-accesses { + if-feature cloud-access; + list cloud-access { + key cloud-identifier; + leaf cloud-identifier { + type leafref { + path "/l3vpn-svc/vpn-profiles/"+ + "valid-provider-identifiers/cloud-identifier/id"; + } + description + "Identification of cloud service. + Local administration meaning."; + } + choice list-flavor { + case permit-any { + leaf permit-any { + type empty; + description + "Allows all sites."; + } + } + case deny-any-except { + leaf-list permit-site { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID to be authorized."; + } + } + case permit-any-except { + leaf-list deny-site { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID to be denied."; + } + } + description + "Choice for cloud access policy. By + default, all sites in the IP VPN MUST + be authorized to access the cloud."; + } + container address-translation { + container nat44 { + leaf enabled { + type boolean; + default false; + description + "Controls whether or not Network address + translation from IPv4 to IPv4 (NAT44) + [RFC3022] is required."; + } + leaf nat44-customer-address { + type inet:ipv4-address; + description + "Address to be used for network address + translation from IPv4 to IPv4. This is + to be used if the customer is providing + the IPv4 address. If the customer address + is not set, the model assumes that the + provider will allocate the address."; + } + description + "IPv4-to-IPv4 translation."; + } + description + "Container for NAT."; + } + description + "Cloud access configuration."; + } + description + "Container for cloud access configurations."; + } + description + "Grouping for VPN cloud definition."; + } + grouping multicast-rp-group-cfg { + choice group-format { + mandatory true; + case singleaddress { + leaf group-address { + type inet:ip-address; + description + "A single multicast group address."; + } + } + case startend { + leaf group-start { + type inet:ip-address; + description + "The first multicast group address in + the multicast group address range."; + } + leaf group-end { + type inet:ip-address; + description + "The last multicast group address in + the multicast group address range."; + } + } + description + "Choice for multicast group format."; + } + description + "This grouping defines multicast group or + multicast groups for RP-to-group mapping."; + } + grouping vpn-service-multicast { + container multicast { + if-feature multicast; + leaf enabled { + type boolean; + default false; + description + "Enables multicast."; + } + container customer-tree-flavors { + leaf-list tree-flavor { + type identityref { + base multicast-tree-type; + } + description + "Type of tree to be used."; + } + description + "Type of trees used by customer."; + } + container rp { + container rp-group-mappings { + list rp-group-mapping { + key id; + leaf id { + type uint16; + description + "Unique identifier for the mapping."; + } + container provider-managed { + leaf enabled { + type boolean; + default false; + description + "Set to true if the Rendezvous Point (RP) + must be a provider-managed node. Set to false + if it is a customer-managed node."; + } + leaf rp-redundancy { + type boolean; + default false; + description + "If true, a redundancy mechanism for the RP + is required."; + } + leaf optimal-traffic-delivery { + type boolean; + default false; + description + "If true, the SP must ensure that + traffic uses an optimal path. An SP may use + Anycast RP or RP-tree-to-SPT switchover + architectures."; + } + description + "Parameters for a provider-managed RP."; + } + leaf rp-address { + when "../provider-managed/enabled = 'false'" { + description + "Relevant when the RP is not provider-managed."; + } + type inet:ip-address; + mandatory true; + description + "Defines the address of the RP. + Used if the RP is customer-managed."; + } + container groups { + list group { + key id; + leaf id { + type uint16; + description + "Identifier for the group."; + } + uses multicast-rp-group-cfg; + description + "List of multicast groups."; + } + description + "Multicast groups associated with the RP."; + } + description + "List of RP-to-group mappings."; + } + description + "RP-to-group mappings parameters."; + } + container rp-discovery { + leaf rp-discovery-type { + type identityref { + base multicast-rp-discovery-type; + } + default static-rp; + description + "Type of RP discovery used."; + } + container bsr-candidates { + when "derived-from-or-self(../rp-discovery-type, "+ + "'l3vpn-svc:bsr-rp')" { + description + "Only applicable if discovery type + is BSR-RP."; + } + leaf-list bsr-candidate-address { + type inet:ip-address; + description + "Address of BSR candidate."; + } + description + "Container for List of Customer + BSR candidate's addresses."; + } + description + "RP discovery parameters."; + } + description + "RP parameters."; + } + description + "Multicast global parameters for the VPN service."; + } + description + "Grouping for multicast VPN definition."; + } + grouping vpn-service-mpls { + leaf carrierscarrier { + if-feature carrierscarrier; + type boolean; + default false; + description + "The VPN is using CsC, and so MPLS is required."; + } + description + "Grouping for MPLS CsC definition."; + } + grouping customer-location-info { + container locations { + list location { + key location-id; + leaf location-id { + type svc-id; + description + "Identifier for a particular location."; + } + leaf address { + type string; + description + "Address (number and street) of the site."; + } + leaf postal-code { + type string; + description + "Postal code of the site."; + } + leaf state { + type string; + description + "State of the site. This leaf can also be + used to describe a region for a country that + does not have states."; + } + leaf city { + type string; + description + "City of the site."; + } + leaf country-code { + type string { + pattern '[A-Z]{2}'; + } + description + "Country of the site. + Expressed as ISO ALPHA-2 code."; + } + description + "Location of the site."; + } + description + "List of locations for the site."; + } + description + "This grouping defines customer location parameters."; + } + grouping site-group { + container groups { + list group { + key group-id; + leaf group-id { + type string; + description + "Group-id the site belongs to."; + } + description + "List of group-ids."; + } + description + "Groups the site or site-network-access belongs to."; + } + description + "Grouping definition to assign + group-ids to site or site-network-access."; + } + grouping site-diversity { + container site-diversity { + if-feature site-diversity; + uses site-group; + description + "Diversity constraint type. All + site-network-accesses will inherit + the group values defined here."; + } + description + "This grouping defines site + diversity parameters."; + } + grouping access-diversity { + container access-diversity { + if-feature site-diversity; + uses site-group; + container constraints { + list constraint { + key constraint-type; + leaf constraint-type { + type identityref { + base placement-diversity; + } + description + "Diversity constraint type."; + } + container target { + choice target-flavor { + default id; + case id { + list group { + key group-id; + leaf group-id { + type string; + description + "The constraint will be applied against + this particular group-id for this site + network access level."; + } + description + "List of group-ids associated with one specific + constraint for this site network access level."; + } + } + case all-accesses { + leaf all-other-accesses { + type empty; + description + "The constraint will be applied against + all other site network accesses of this site."; + } + } + case all-groups { + leaf all-other-groups { + type empty; + description + "The constraint will be applied against + all other groups managed by the customer."; + } + } + description + "Choice for the target flavor definition."; + } + description + "The constraint will be applied against a + Specific target, and the target can be a list + of group-ids,all other site network accesses of + this site, or all other groups managed by the + customer."; + } + description + "List of constraints."; + } + description + "Placement constraints for this site network access."; + } + description + "Diversity parameters."; + } + description + "This grouping defines access diversity parameters."; + } + grouping operational-requirements { + leaf requested-site-start { + type yang:date-and-time; + description + "Optional leaf indicating requested date and + time when the service at a particular site is + expected to start."; + } + + leaf requested-site-stop { + type yang:date-and-time; + description + "Optional leaf indicating requested date and + time when the service at a particular site is + expected to stop."; + } + description + "This grouping defines some operational + parameters."; + } + grouping operational-requirements-ops { + leaf actual-site-start { + type yang:date-and-time; + config false; + description + "Optional leaf indicating actual date and + time when the service at a particular site + actually started."; + } + leaf actual-site-stop { + type yang:date-and-time; + config false; + description + "Optional leaf indicating actual date and + time when the service at a particular site + actually stopped."; + } + description + "This grouping defines some operational + parameters."; + } + grouping flow-definition { + container match-flow { + leaf dscp { + type inet:dscp; + description + "DSCP value."; + } + leaf dot1p { + type uint8 { + range "0..7"; + } + description + "802.1p matching."; + } + leaf ipv4-src-prefix { + type inet:ipv4-prefix; + description + "Match on IPv4 src address."; + } + leaf ipv6-src-prefix { + type inet:ipv6-prefix; + description + "Match on IPv6 src address."; + } + leaf ipv4-dst-prefix { + type inet:ipv4-prefix; + description + "Match on IPv4 dst address."; + } + leaf ipv6-dst-prefix { + type inet:ipv6-prefix; + description + "Match on IPv6 dst address."; + } + leaf l4-src-port { + type inet:port-number; + must "current() < ../l4-src-port-range/lower-port or "+ + "current() > ../l4-src-port-range/upper-port" { + description + "If l4-src-port and l4-src-port-range/lower-port and + upper-port are set at the same time, l4-src-port + should not overlap with l4-src-port-range."; + } + description + "Match on Layer 4 src port."; + } + leaf-list target-sites { + if-feature target-sites; + type svc-id; + description + "Identify a site as traffic destination."; + } + container l4-src-port-range { + leaf lower-port { + type inet:port-number; + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + description + "Upper boundary for port. If it + exists, the upper boundary must be + higher than the lower boundary."; + } + description + "Upper boundary for port."; + } + description + "Match on Layer 4 src port range. When + only the lower-port is present, it represents + a single port. When both the lower-port and + upper-port are specified, it implies + a range inclusive of both values."; + } + leaf l4-dst-port { + type inet:port-number; + must "current() < ../l4-dst-port-range/lower-port or "+ + "current() > ../l4-dst-port-range/upper-port" { + description + "If l4-dst-port and l4-dst-port-range/lower-port + and upper-port are set at the same time, + l4-dst-port should not overlap with + l4-src-port-range."; + } + description + "Match on Layer 4 dst port."; + } + container l4-dst-port-range { + leaf lower-port { + type inet:port-number; + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + description + "Upper boundary must be + higher than lower boundary."; + } + description + "Upper boundary for port. If it exists, + upper boundary must be higher than lower + boundary."; + } + description + "Match on Layer 4 dst port range. When only + lower-port is present, it represents a single + port. When both lower-port and upper-port are + specified, it implies a range inclusive of both + values."; + } + leaf protocol-field { + type union { + type uint8; + type identityref { + base protocol-type; + } + } + description + "Match on IPv4 protocol or IPv6 Next Header field."; + } + description + "Describes flow-matching criteria."; + } + description + "Flow definition based on criteria."; + } + grouping site-service-basic { + leaf svc-input-bandwidth { + type uint64; + units bps; + mandatory true; + description + "From the customer site's perspective, the service + input bandwidth of the connection or download + bandwidth from the SP to the site."; + } + leaf svc-output-bandwidth { + type uint64; + units bps; + mandatory true; + description + "From the customer site's perspective, the service + output bandwidth of the connection or upload + bandwidth from the site to the SP."; + } + leaf svc-mtu { + type uint16; + units bytes; + mandatory true; + description + "MTU at service level. If the service is IP, + it refers to the IP MTU. If CsC is enabled, + the requested 'svc-mtu' leaf will refer to the + MPLS MTU and not to the IP MTU."; + } + description + "Defines basic service parameters for a site."; + } + grouping site-protection { + container traffic-protection { + if-feature fast-reroute; + leaf enabled { + type boolean; + default false; + description + "Enables traffic protection of access link."; + } + description + "Fast Reroute service parameters for the site."; + } + description + "Defines protection service parameters for a site."; + } + grouping site-service-mpls { + container carrierscarrier { + if-feature carrierscarrier; + leaf signalling-type { + type enumeration { + enum ldp { + description + "Use LDP as the signalling protocol + between the PE and the CE. In this case, + an IGP routing protocol must also be activated."; + } + enum bgp { + description + "Use BGP (as per RFC 8277) as the signalling protocol + between the PE and the CE. + In this case, BGP must also be configured as + the routing protocol."; + } + } + default bgp; + description + "MPLS signalling type."; + } + description + "This container is used when the customer provides + MPLS-based services. This is only used in the case + of CsC (i.e., a customer builds an MPLS service using + an IP VPN to carry its traffic)."; + } + description + "Defines MPLS service parameters for a site."; + } + grouping site-service-qos-profile { + container qos { + if-feature qos; + container qos-classification-policy { + list rule { + key id; + ordered-by user; + leaf id { + type string; + description + "A description identifying the + qos-classification-policy rule."; + } + choice match-type { + default match-flow; + case match-flow { + uses flow-definition; + } + case match-application { + leaf match-application { + type identityref { + base customer-application; + } + description + "Defines the application to match."; + } + } + description + "Choice for classification."; + } + leaf target-class-id { + type string; + description + "Identification of the class of service. + This identifier is internal to the administration."; + } + description + "List of marking rules."; + } + description + "Configuration of the traffic classification policy."; + } + container qos-profile { + choice qos-profile { + description + "Choice for QoS profile. + Can be standard profile or customized profile."; + case standard { + description + "Standard QoS profile."; + leaf profile { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers"+ + "/qos-profile-identifier/id"; + } + description + "QoS profile to be used."; + } + } + case custom { + description + "Customized QoS profile."; + container classes { + if-feature qos-custom; + list class { + key class-id; + leaf class-id { + type string; + description + "Identification of the class of service. + This identifier is internal to the + administration."; + } + leaf direction { + type identityref { + base qos-profile-direction; + } + default both; + description + "The direction to which the QoS profile + is applied."; + } + leaf rate-limit { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units percent; + description + "To be used if the class must be rate-limited. + Expressed as percentage of the service + bandwidth."; + } + container latency { + choice flavor { + case lowest { + leaf use-lowest-latency { + type empty; + description + "The traffic class should use the path with the + lowest latency."; + } + } + case boundary { + leaf latency-boundary { + type uint16; + units msec; + default 400; + description + "The traffic class should use a path with a + defined maximum latency."; + } + } + description + "Latency constraint on the traffic class."; + } + description + "Latency constraint on the traffic class."; + } + container jitter { + choice flavor { + case lowest { + leaf use-lowest-jitter { + type empty; + description + "The traffic class should use the path with the + lowest jitter."; + } + } + case boundary { + leaf latency-boundary { + type uint32; + units usec; + default 40000; + description + "The traffic class should use a path with a + defined maximum jitter."; + } + } + description + "Jitter constraint on the traffic class."; + } + description + "Jitter constraint on the traffic class."; + } + container bandwidth { + leaf guaranteed-bw-percent { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units percent; + mandatory true; + description + "To be used to define the guaranteed bandwidth + as a percentage of the available service bandwidth."; + } + leaf end-to-end { + type empty; + description + "Used if the bandwidth reservation + must be done on the MPLS network too."; + } + description + "Bandwidth constraint on the traffic class."; + } + description + "List of classes of services."; + } + description + "Container for list of classes of services."; + } + } + } + description + "QoS profile configuration."; + } + description + "QoS configuration."; + } + description + "This grouping defines QoS parameters for a site."; + } + grouping site-security-authentication { + container authentication { + description + "Authentication parameters."; + } + description + "This grouping defines authentication parameters for a site."; + } + grouping site-security-encryption { + container encryption { + if-feature encryption; + leaf enabled { + type boolean; + default false; + description + "If true, traffic encryption on the connection is required."; + } + leaf layer { + when "../enabled = 'true'" { + description + "Require a value for layer when enabled is true."; + } + type enumeration { + enum layer2 { + description + "Encryption will occur at Layer 2."; + } + enum layer3 { + description + "Encryption will occur at Layer 3. + For example, IPsec may be used when + a customer requests Layer 3 encryption."; + } + } + description + "Layer on which encryption is applied."; + } + container encryption-profile { + choice profile { + case provider-profile { + leaf profile-name { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers"+ + "/encryption-profile-identifier/id"; + } + description + "Name of the SP profile to be applied."; + } + } + case customer-profile { + leaf algorithm { + type string; + description + "Encryption algorithm to be used."; + } + choice key-type { + default psk; + case psk { + leaf preshared-key { + type string; + description + "Pre-Shared Key (PSK) coming from the customer."; + } + } + description + "Type of keys to be used."; + } + } + description + "Choice of encryption profile. The encryption + profile can be the provider profile or customer profile."; + } + description + "Profile of encryption to be applied."; + } + description + "Encryption parameters."; + } + description + "This grouping defines encryption parameters for a site."; + } + grouping site-attachment-bearer { + container bearer { + container requested-type { + if-feature requested-type; + leaf requested-type { + type string; + description + "Type of requested bearer: Ethernet, DSL, + Wireless, etc. Operator specific."; + } + leaf strict { + type boolean; + default false; + description + "Defines whether requested-type is a preference + or a strict requirement."; + } + description + "Container for requested-type."; + } + leaf always-on { + if-feature always-on; + type boolean; + default true; + description + "Request for an always-on access type. + For example, this could mean no dial access type."; + } + leaf bearer-reference { + if-feature bearer-reference; + type string; + description + "This is an internal reference for the SP."; + } + description + "Bearer-specific parameters. + To be augmented."; + } + description + "Defines physical properties of a site attachment."; + } + grouping site-routing { + container routing-protocols { + list routing-protocol { + key type; + leaf type { + type identityref { + base routing-protocol-type; + } + description + "Type of routing protocol."; + } + container ospf { + when "derived-from-or-self(../type, 'l3vpn-svc:ospf')" { + description + "Only applies when protocol is OSPF."; + } + if-feature rtg-ospf; + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If OSPF is used on this site, this node + contains a configured value. This node + contains at least one address family + to be activated."; + } + leaf area-address { + type yang:dotted-quad; + mandatory true; + description + "Area address."; + } + leaf metric { + type uint16; + default 1; + description + "Metric of the PE-CE link. It is used + in the routing state calculation and + path selection."; + } + container sham-links { + if-feature rtg-ospf-sham-link; + list sham-link { + key target-site; + leaf target-site { + type svc-id; + description + "Target site for the sham link connection. + The site is referred to by its ID."; + } + leaf metric { + type uint16; + default 1; + description + "Metric of the sham link. It is used in + the routing state calculation and path + selection. The default value is set + to 1."; + } + description + "Creates a sham link with another site."; + } + description + "List of sham links."; + } + description + "OSPF-specific configuration."; + } + container bgp { + when "derived-from-or-self(../type, 'l3vpn-svc:bgp')" { + description + "Only applies when protocol is BGP."; + } + if-feature rtg-bgp; + leaf autonomous-system { + type uint32; + mandatory true; + description + "Customer AS number in case the customer + requests BGP routing."; + } + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If BGP is used on this site, this node + contains a configured value. This node + contains at least one address family + to be activated."; + } + description + "BGP-specific configuration."; + } + container static { + when "derived-from-or-self(../type, 'l3vpn-svc:static')" { + description + "Only applies when protocol is static. + BGP activation requires the SP to know + the address of the customer peer. When + BGP is enabled, the 'static-address' + allocation type for the IP connection + MUST be used."; + } + container cascaded-lan-prefixes { + list ipv4-lan-prefixes { + if-feature ipv4; + key "lan next-hop"; + leaf lan { + type inet:ipv4-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in VPN policies."; + } + leaf next-hop { + type inet:ipv4-address; + description + "Next-hop address to use on the customer side."; + } + description + "List of LAN prefixes for the site."; + } + list ipv6-lan-prefixes { + if-feature ipv6; + key "lan next-hop"; + leaf lan { + type inet:ipv6-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in VPN policies."; + } + leaf next-hop { + type inet:ipv6-address; + description + "Next-hop address to use on the customer side."; + } + description + "List of LAN prefixes for the site."; + } + description + "LAN prefixes from the customer."; + } + description + "Configuration specific to static routing."; + } + container rip { + when "derived-from-or-self(../type, 'l3vpn-svc:rip')" { + description + "Only applies when the protocol is RIP. For IPv4, + the model assumes that RIP version 2 is used."; + } + if-feature rtg-rip; + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If RIP is used on this site, this node + contains a configured value. This node + contains at least one address family + to be activated."; + } + description + "Configuration specific to RIP routing."; + } + container vrrp { + when "derived-from-or-self(../type, 'l3vpn-svc:vrrp')" { + description + "Only applies when protocol is VRRP."; + } + if-feature rtg-vrrp; + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If VRRP is used on this site, this node + contains a configured value. This node contains + at least one address family to be activated."; + } + description + "Configuration specific to VRRP routing."; + } + description + "List of routing protocols used on + the site. This list can be augmented."; + } + description + "Defines routing protocols."; + } + description + "Grouping for routing protocols."; + } + grouping site-attachment-ip-connection { + container ip-connection { + container ipv4 { + if-feature ipv4; + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + must "not(derived-from-or-self(current(), 'l3vpn-svc:slaac') or "+ + "derived-from-or-self(current(), "+ + "'l3vpn-svc:provider-dhcp-slaac'))" { + error-message "SLAAC is only applicable to IPv6"; + } + description + "Defines how addresses are allocated. + If there is no value for the address + allocation type, then IPv4 is not enabled."; + } + container provider-dhcp { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp')" { + description + "Only applies when addresses are allocated by DHCP."; + } + leaf provider-address { + type inet:ipv4-address; + description + "Address of provider side. If provider-address is not + specified, then prefix length should not be specified + either. It also implies provider-dhcp allocation is + not enabled. If provider-address is specified, then + the prefix length may or may not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + must "(../provider-address)" { + error-message + "If the prefix length is specified, provider-address + must also be specified."; + description + "If the prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. + If not specified, or specified as zero, + this means the customer leaves the actual + prefix length value to the provider."; + } + choice address-assign { + default number; + case number { + leaf number-of-dynamic-address { + type uint16; + default 1; + description + "Describes the number of IP addresses + the customer requires."; + } + } + case explicit { + container customer-addresses { + list address-group { + key "group-id"; + leaf group-id { + type string; + description + "Group-id for the address range from + start-address to end-address."; + } + leaf start-address { + type inet:ipv4-address; + description + "First address."; + } + leaf end-address { + type inet:ipv4-address; + description + "Last address."; + } + description + "Describes IP addresses allocated by DHCP. + When only start-address or only end-address + is present, it represents a single address. + When both start-address and end-address are + specified, it implies a range inclusive of both + addresses. If no address is specified, it implies + customer addresses group is not supported."; + } + description + "Container for customer addresses is allocated by DHCP."; + } + } + description + "Choice for the way to assign addresses."; + } + description + "DHCP allocated addresses related parameters."; + } + container dhcp-relay { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-relay')" { + description + "Only applies when provider is required to implement + DHCP relay function."; + } + leaf provider-address { + type inet:ipv4-address; + description + "Address of provider side. If provider-address is not + specified, then prefix length should not be specified + either. It also implies provider-dhcp allocation is + not enabled. If provider-address is specified, then + prefix length may or may not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; +} + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + container customer-dhcp-servers { + leaf-list server-ip-address { + type inet:ipv4-address; + description + "IP address of customer DHCP server."; + } + description + "Container for list of customer DHCP servers."; + } + description + "DHCP relay provided by operator."; +} + container addresses { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:static-address')" { + description + "Only applies when protocol allocation type is static."; + } + leaf provider-address { + type inet:ipv4-address; + description + "IPv4 Address List of the provider side. + When the protocol allocation type is static, + the provider address must be configured."; + } + leaf customer-address { + type inet:ipv4-address; + description + "IPv4 Address of customer side."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "Subnet prefix length expressed in bits. + It is applied to both provider-address + and customer-address."; + } + description + "Describes IPv4 addresses used."; + } + description + "IPv4-specific parameters."; + } + container ipv6 { + if-feature ipv6; + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + description + "Defines how addresses are allocated. + If there is no value for the address + allocation type, then IPv6 is + not enabled."; + } + + container provider-dhcp { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp') "+ + "or derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-slaac')" { + description + "Only applies when addresses are allocated by DHCP."; + } + leaf provider-address { + type inet:ipv6-address; + description + "Address of the provider side. If provider-address + is not specified, then prefix length should not be + specified either. It also implies provider-dhcp + allocation is not enabled. If provider-address is + specified, then prefix length may or may + not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + choice address-assign { + default number; + case number { + leaf number-of-dynamic-address { + type uint16; + default 1; + description + "Describes the number of IP addresses the customer + requires."; + } + } + case explicit { + container customer-addresses { + list address-group { + key "group-id"; + leaf group-id { + type string; + description + "Group-id for the address range from + start-address to end-address."; + } + leaf start-address { + type inet:ipv6-address; + description + "First address."; + } + leaf end-address { + type inet:ipv6-address; + description + "Last address."; + } + description + "Describes IP addresses allocated by DHCP. When only + start-address or only end-address is present, it + represents a single address. When both start-address + and end-address are specified, it implies a range + inclusive of both addresses. If no address is + specified, it implies customer addresses group is + not supported."; + } + description + "Container for customer addresses allocated by DHCP."; + } + } + description + "Choice for the way to assign addresses."; + } + description + "DHCP allocated addresses related parameters."; + } + container dhcp-relay { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-relay')" { + description + "Only applies when the provider is required + to implement DHCP relay function."; + } + leaf provider-address { + type inet:ipv6-address; + description + "Address of the provider side. If provider-address is + not specified, then prefix length should not be + specified either. It also implies provider-dhcp + allocation is not enabled. If provider address + is specified, then prefix length may or may + not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + container customer-dhcp-servers { + leaf-list server-ip-address { + type inet:ipv6-address; + description + "This node contains the IP address of + the customer DHCP server. If the DHCP relay + function is implemented by the + provider, this node contains the + configured value."; + } + description + "Container for list of customer DHCP servers."; + } + description + "DHCP relay provided by operator."; + } + container addresses { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:static-address')" { + description + "Only applies when protocol allocation type is static."; + } + leaf provider-address { + type inet:ipv6-address; + description + "IPv6 Address of the provider side. When the protocol + allocation type is static, the provider address + must be configured."; + } + leaf customer-address { + type inet:ipv6-address; + description + "The IPv6 Address of the customer side."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + description + "Subnet prefix length expressed in bits. + It is applied to both provider-address and + customer-address."; + } + description + "Describes IPv6 addresses used."; + } + description + "IPv6-specific parameters."; + } + container oam { + container bfd { + if-feature bfd; + leaf enabled { + type boolean; + default false; + description + "If true, BFD activation is required."; + } + choice holdtime { + default fixed; + case fixed { + leaf fixed-value { + type uint32; + units msec; + description + "Expected BFD holdtime expressed in msec. The customer + may impose some fixed values for the holdtime period + if the provider allows the customer use this function. + If the provider doesn't allow the customer to use this + function, the fixed-value will not be set."; + } + } + case profile { + leaf profile-name { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers/"+ + "bfd-profile-identifier/id"; + } + description + "Well-known SP profile name. The provider can propose + some profiles to the customer, depending on the service + level the customer wants to achieve. Profile names + must be communicated to the customer."; + } + description + "Well-known SP profile."; + } + description + "Choice for holdtime flavor."; + } + description + "Container for BFD."; + } + description + "Defines the Operations, Administration, and Maintenance (OAM) + mechanisms used on the connection. BFD is set as a fault + detection mechanism, but the 'oam' container can easily + be augmented by other mechanisms"; + } + description + "Defines connection parameters."; + } + description + "This grouping defines IP connection parameters."; + } + grouping site-service-multicast { + container multicast { + if-feature multicast; + leaf multicast-site-type { + type enumeration { + enum receiver-only { + description + "The site only has receivers."; + } + enum source-only { + description + "The site only has sources."; + } + enum source-receiver { + description + "The site has both sources and receivers."; + } + } + default source-receiver; + description + "Type of multicast site."; + } + container multicast-address-family { + leaf ipv4 { + if-feature ipv4; + type boolean; + default false; + description + "Enables IPv4 multicast."; + } + leaf ipv6 { + if-feature ipv6; + type boolean; + default false; + description + "Enables IPv6 multicast."; + } + description + "Defines protocol to carry multicast."; + } + leaf protocol-type { + type enumeration { + enum host { + description + "Hosts are directly connected to the provider network. + Host protocols such as IGMP or MLD are required."; + } + enum router { + description + "Hosts are behind a customer router. + PIM will be implemented."; + } + enum both { + description + "Some hosts are behind a customer router, and + some others are directly connected to the + provider network. Both host and routing protocols + must be used. Typically, IGMP and PIM will be + implemented."; + } + } + default "both"; + description + "Multicast protocol type to be used with the customer site."; + } + description + "Multicast parameters for the site."; + } + description + "Multicast parameters for the site."; + } + grouping site-management { + container management { + leaf type { + type identityref { + base management; + } + mandatory true; + description + "Management type of the connection."; + } + description + "Management configuration."; + } + description + "Management parameters for the site."; + } + grouping site-devices { + container devices { + when "derived-from-or-self(../management/type, "+ + "'l3vpn-svc:provider-managed') or "+ + "derived-from-or-self(../management/type, 'l3vpn-svc:co-managed')" { + description + "Applicable only for provider-managed or + co-managed device."; + } + list device { + key device-id; + leaf device-id { + type svc-id; + description + "Identifier for the device."; + } + leaf location { + type leafref { + path "../../../locations/"+ + "location/location-id"; + } + mandatory true; + description + "Location of the device."; + } + container management { + when "derived-from-or-self(../../../management/type,"+ + "'l3vpn-svc:co-managed')" { + description + "Applicable only for co-managed device."; + } + leaf address-family { + type address-family; + description + "Address family used for management."; + } + leaf address { + when "(../address-family)" { + description + "If address-family is specified, then address should + also be specified. If address-family is not specified, + then address should also not be specified."; + } + type inet:ip-address; + mandatory true; + description + "Management address."; + } + description + "Management configuration. Applicable only for + co-managed device."; + } + description + "List of devices requested by customer."; + } + description + "Device configuration."; + } + description + "Grouping for device allocation."; + } + grouping site-vpn-flavor { + leaf site-vpn-flavor { + type identityref { + base site-vpn-flavor; + } + default site-vpn-flavor-single; + description + "Defines the way the VPN multiplexing is done, e.g., whether + the site belongs to a single VPN site or a multiVPN; or, in the case + of a multiVPN, whether the logical accesses of the sites belong + to the same set of VPNs or each logical access maps to + different VPNs."; + } + description + "Grouping for site VPN flavor."; + } + grouping site-vpn-policy { + container vpn-policies { + list vpn-policy { + key vpn-policy-id; + leaf vpn-policy-id { + type svc-id; + description + "Unique identifier for the VPN policy."; + } + list entries { + key id; + leaf id { + type svc-id; + description + "Unique identifier for the policy entry."; + } + container filters { + list filter { + key type; + ordered-by user; + leaf type { + type identityref { + base vpn-policy-filter-type; + } + description + "Type of VPN Policy filter."; + } + leaf-list lan-tag { + when "derived-from-or-self(../type, 'l3vpn-svc:lan')" { + description + "Only applies when the VPN Policy filter is a + LAN Tag filter."; + } + if-feature lan-tag; + type string; + description + "List of 'lan-tag' items to be matched. LAN Tag + is an Internal tag to be used in VPN policies "; + } + leaf-list ipv4-lan-prefix { + when "derived-from-or-self(../type, 'l3vpn-svc:ipv4')" { + description + "Only applies when VPN Policy filter is IPv4 Prefix filter."; + } + if-feature ipv4; + type inet:ipv4-prefix; + description + "List of IPv4 prefixes as LAN Prefixes to be matched."; + } + leaf-list ipv6-lan-prefix { + when "derived-from-or-self(../type, 'l3vpn-svc:ipv6')" { + description + "Only applies when VPN Policy filter is IPv6 Prefix filter."; + } + if-feature ipv6; + type inet:ipv6-prefix; + description + "List of IPv6 prefixes as LAN prefixes to be matched."; + } + description + "List of filters used on the site. This list can + be augmented."; + } + description + "If a more-granular VPN attachment is necessary, filtering can + be used. If used, it permits the splitting of site LANs among + multiple VPNs. The Site LAN can be split based on either LAN + Tag or LAN prefix. If no filter is used, all the LANs will be + part of the same VPNs with the same role."; + } + list vpn { + key vpn-id; + leaf vpn-id { + type leafref { + path "/l3vpn-svc/vpn-services/"+ + "vpn-service/vpn-id"; + } + mandatory true; + description + "Reference to an IP VPN."; + } + leaf site-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "Role of the site in the IP VPN."; + } + description + "List of VPNs the LAN is associated with."; + } + description + "List of entries for export policy."; + } + description + "List of VPN policies."; + } + description + "VPN policy."; + } + description + "VPN policy parameters for the site."; + } + grouping site-maximum-routes { + container maximum-routes { + list address-family { + key af; + leaf af { + type address-family; + description + "Address family."; + } + leaf maximum-routes { + type uint32; + description + "Maximum prefixes the VRF can accept + for this address family."; + } + description + "List of address families."; + } + description + "Defines 'maximum-routes' for the VRF."; + } + description + "Defines 'maximum-routes' for the site."; + } + grouping site-security { + container security { + uses site-security-authentication; + uses site-security-encryption; + description + "Site-specific security parameters."; + } + description + "Grouping for security parameters."; + } + grouping site-service { + container service { + uses site-service-qos-profile; + uses site-service-mpls; + uses site-service-multicast; + description + "Service parameters on the attachment."; + } + description + "Grouping for service parameters."; + } + grouping site-network-access-service { + container service { + uses site-service-basic; + uses site-service-qos-profile; + uses site-service-mpls; + uses site-service-multicast; + description + "Service parameters on the attachment."; + } + description + "Grouping for service parameters."; + } + grouping vpn-extranet { + container extranet-vpns { + if-feature extranet-vpn; + list extranet-vpn { + key vpn-id; + leaf vpn-id { + type svc-id; + description + "Identifies the target VPN the local VPN want to access."; + } + leaf local-sites-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "This describes the role of the + local sites in the target VPN topology. In the any-to-any VPN + service topology, the local sites must have the same role, which + will be 'any-to-any-role'. In the Hub-and-Spoke VPN service + topology or the Hub-and-Spoke disjoint VPN service topology, + the local sites must have a Hub role or a Spoke role."; + } + description + "List of extranet VPNs or target VPNs the local VPN is + attached to."; + } + description + "Container for extranet VPN configuration."; + } + description + "Grouping for extranet VPN configuration. + This provides an easy way to interconnect + all sites from two VPNs."; + } + grouping site-attachment-availability { + container availability { + leaf access-priority { + type uint32; + default 100; + description + "Defines the priority for the access. + The higher the access-priority value, + the higher the preference of the + access will be."; + } + description + "Availability parameters (used for multihoming)."; + } + description + "Defines availability parameters for a site."; + } + grouping access-vpn-policy { + container vpn-attachment { + choice attachment-flavor { + case vpn-policy-id { + leaf vpn-policy-id { + type leafref { + path "../../../../"+ + "vpn-policies/vpn-policy/"+ + "vpn-policy-id"; + } + description + "Reference to a VPN policy. When referencing VPN + policy for attachment, the vpn-policy-id must be + configured."; + } + } + case vpn-id { + leaf vpn-id { + type leafref { + path "/l3vpn-svc/vpn-services"+ + "/vpn-service/vpn-id"; + } + description + "Reference to an IP VPN. Referencing a vpn-id provides + an easy way to attach a particular logical access to + a VPN. In this case, vpn-id must be configured."; + } + leaf site-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "Role of the site in the IP VPN. When referencing a vpn-id, + the site-role setting must be added to express the role of + the site in the target VPN service topology."; + } + } + mandatory true; + description + "Choice for VPN attachment flavor. A choice is implemented + to allow the user to choose the flavor that provides the + best fit."; + } + description + "Defines VPN attachment of a site."; + } + description + "Defines the VPN attachment rules for + a site's logical access."; + } + grouping vpn-profile-cfg { + container valid-provider-identifiers { + list cloud-identifier { + if-feature cloud-access; + key id; + leaf id { + type string; + description + "Identification of cloud service. + Local administration meaning."; + } + description + "List for Cloud Identifiers."; + } + list encryption-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the SP encryption profile + to be used. Local administration meaning."; + } + description + "List for encryption profile identifiers."; + } + list qos-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the QoS Profile to be used. + Local administration meaning."; + } + description + "List for QoS Profile Identifiers."; + } + list bfd-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the SP BFD Profile to be used. + Local administration meaning."; + } + description + "List for BFD Profile identifiers."; + } + nacm:default-deny-write; + description + "Container for Valid Provider Identifies."; + } + description + "Grouping for VPN Profile configuration."; + } + grouping vpn-svc-cfg { + leaf vpn-id { + type svc-id; + description + "VPN identifier. Local administration meaning."; + } + leaf customer-name { + type string; + description + "Name of the customer that actually uses the VPN service. + In the case that any intermediary (e.g., Tier-2 provider + or partner) sells the VPN service to their end user + on behalf of the original service provider (e.g., Tier-1 + provider), the original service provider may require the + customer name to provide smooth activation/commissioning + and operation for the service."; + } + leaf vpn-service-topology { + type identityref { + base vpn-topology; + } + default any-to-any; + description + "VPN service topology."; + } + uses vpn-service-cloud-access; + uses vpn-service-multicast; + uses vpn-service-mpls; + uses vpn-extranet; + description + "Grouping for VPN service configuration."; + } + grouping site-top-level-cfg { + uses operational-requirements; + uses customer-location-info; + uses site-devices; + uses site-diversity; + uses site-management; + uses site-vpn-policy; + uses site-vpn-flavor; + uses site-maximum-routes; + uses site-security; + uses site-service; + uses site-protection; + uses site-routing; + description + "Grouping for site top-level configuration."; + } + grouping site-network-access-top-level-cfg { + leaf site-network-access-type { + type identityref { + base site-network-access-type; + } + default point-to-point; + description + "Describes the type of connection, e.g., + point-to-point or multipoint."; + } + choice location-flavor { + case location { + when "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:customer-managed')" { + description + "Applicable only for customer-managed device."; + } + leaf location-reference { + type leafref { + path "../../../locations/location/location-id"; + } + description + "Location of the site-network-access."; + } + } + case device { + when "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:provider-managed') or "+ + "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:co-managed')" { + description + "Applicable only for provider-managed or co-managed device."; + } + leaf device-reference { + type leafref { + path "../../../devices/device/device-id"; + } + description + "Identifier of CE to use."; + } + } + mandatory true; + description + "Choice of how to describe the site's location."; + } + uses access-diversity; + uses site-attachment-bearer; + uses site-attachment-ip-connection; + uses site-security; + uses site-network-access-service; + uses site-routing; + uses site-attachment-availability; + uses access-vpn-policy; + description + "Grouping for site network access top-level configuration."; + } + /* Main blocks */ + container l3vpn-svc { + container vpn-profiles { + uses vpn-profile-cfg; + description + "Container for VPN Profiles."; + } + container vpn-services { + list vpn-service { + key vpn-id; + uses vpn-svc-cfg; + description + "List of VPN services."; + } + description + "Top-level container for the VPN services."; + } + container sites { + list site { + key site-id; + leaf site-id { + type svc-id; + description + "Identifier of the site."; + } + uses site-top-level-cfg; + uses operational-requirements-ops; + container site-network-accesses { + list site-network-access { + key site-network-access-id; + leaf site-network-access-id { + type svc-id; + description + "Identifier for the access."; + } + uses site-network-access-top-level-cfg; + description + "List of accesses for a site."; + } + description + "List of accesses for a site."; + } + description + "List of sites."; + } + description + "Container for sites."; + } + description + "Main container for L3VPN service configuration."; + } +} diff --git a/models/ietf/RFC/ietf-l3vpn-svc@2017-01-27.yang b/models/ietf/RFC/ietf-l3vpn-svc@2017-01-27.yang new file mode 100644 index 0000000000000000000000000000000000000000..1e86f485eecda0bbb0b37e8eab5f5769d44bb8d1 --- /dev/null +++ b/models/ietf/RFC/ietf-l3vpn-svc@2017-01-27.yang @@ -0,0 +1,2401 @@ +module ietf-l3vpn-svc { + namespace "urn:ietf:params:xml:ns:yang:ietf-l3vpn-svc"; + + prefix l3vpn-svc; + + import ietf-inet-types { + prefix inet; + } + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF L3SM Working Group"; + + contact + "WG List: <mailto:l3sm@ietf.org> + + Editor: + L3SM WG + + Chairs: + Adrian Farrel, Qin Wu + "; + + description + "This YANG module defines a generic service configuration + model for Layer 3 VPNs. This model is common across all + vendor implementations."; + + revision 2017-01-27 { + description + "Initial document."; + reference + "RFC 8049."; + } + + /* Features */ + + feature cloud-access { + description + "Allows the VPN to connect to a CSP."; + } + feature multicast { + description + "Enables multicast capabilities in a VPN."; + } + feature ipv4 { + description + "Enables IPv4 support in a VPN."; + } + feature ipv6 { + description + "Enables IPv6 support in a VPN."; + } + feature carrierscarrier { + description + "Enables support of CsC."; + } + feature extranet-vpn { + description + "Enables support of extranet VPNs."; + } + feature site-diversity { + description + "Enables support of site diversity constraints."; + } + feature encryption { + description + "Enables support of encryption."; + } + feature qos { + description + "Enables support of classes of services."; + } + feature qos-custom { + description + "Enables support of the custom QoS profile."; + } + feature rtg-bgp { + description + "Enables support of the BGP routing protocol."; + } + + feature rtg-rip { + description + "Enables support of the RIP routing protocol."; + } + feature rtg-ospf { + description + "Enables support of the OSPF routing protocol."; + } + feature rtg-ospf-sham-link { + description + "Enables support of OSPF sham links."; + } + feature rtg-vrrp { + description + "Enables support of the VRRP routing protocol."; + } + feature fast-reroute { + description + "Enables support of Fast Reroute."; + } + feature bfd { + description + "Enables support of BFD."; + } + feature always-on { + description + "Enables support of the 'always-on' access constraint."; + } + feature requested-type { + description + "Enables support of the 'requested-type' access constraint."; + } + feature bearer-reference { + description + "Enables support of the 'bearer-reference' access constraint."; + } + + /* Typedefs */ + + typedef svc-id { + type string; + description + "Defines a type of service component identifier."; + } + + typedef template-id { + type string; + description + "Defines a type of service template identifier."; + } + + typedef address-family { + type enumeration { + enum ipv4 { + description + "IPv4 address family."; + } + enum ipv6 { + description + "IPv6 address family."; + } + } + description + "Defines a type for the address family."; + } + + /* Identities */ + + identity site-network-access-type { + description + "Base identity for site-network-access type."; + } + identity point-to-point { + base site-network-access-type; + description + "Identity for point-to-point connection."; + } + identity multipoint { + base site-network-access-type; + description + "Identity for multipoint connection. + Example: Ethernet broadcast segment."; + } + identity placement-diversity { + description + "Base identity for site placement constraints."; + } + identity bearer-diverse { + base placement-diversity; + description + "Identity for bearer diversity. + The bearers should not use common elements."; + } + identity pe-diverse { + base placement-diversity; + description + "Identity for PE diversity."; + } + identity pop-diverse { + base placement-diversity; + description + "Identity for POP diversity."; + } + identity linecard-diverse { + base placement-diversity; + description + "Identity for linecard diversity."; + } + identity same-pe { + base placement-diversity; + description + "Identity for having sites connected on the same PE."; + } + identity same-bearer { + base placement-diversity; + description + "Identity for having sites connected using the same bearer."; + } + identity customer-application { + description + "Base identity for customer application."; + } + identity web { + base customer-application; + description + "Identity for Web application (e.g., HTTP, HTTPS)."; + } + identity mail { + base customer-application; + description + "Identity for mail application."; + } + identity file-transfer { + base customer-application; + description + "Identity for file transfer application (e.g., FTP, SFTP)."; + } + + identity database { + base customer-application; + description + "Identity for database application."; + } + identity social { + base customer-application; + description + "Identity for social-network application."; + } + identity games { + base customer-application; + description + "Identity for gaming application."; + } + identity p2p { + base customer-application; + description + "Identity for peer-to-peer application."; + } + identity network-management { + base customer-application; + description + "Identity for management application + (e.g., Telnet, syslog, SNMP)."; + } + identity voice { + base customer-application; + description + "Identity for voice application."; + } + identity video { + base customer-application; + description + "Identity for video conference application."; + } + identity site-vpn-flavor { + description + "Base identity for the site VPN service flavor."; + } + identity site-vpn-flavor-single { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when the site belongs to only one VPN."; + } + + identity site-vpn-flavor-multi { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when a logical connection of a site + belongs to multiple VPNs."; + } + identity site-vpn-flavor-sub { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when a site has multiple logical connections. + Each connection may belong to different multiple VPNs."; + } + identity site-vpn-flavor-nni { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used to describe an NNI option A connection."; + } + identity management { + description + "Base identity for site management scheme."; + } + identity co-managed { + base management; + description + "Base identity for co-managed site."; + } + identity customer-managed { + base management; + description + "Base identity for customer-managed site."; + } + identity provider-managed { + base management; + description + "Base identity for provider-managed site."; + } + identity address-allocation-type { + description + "Base identity for address-allocation-type for PE-CE link."; + } + identity provider-dhcp { + base address-allocation-type; + description + "Provider network provides DHCP service to customer."; + } + identity provider-dhcp-relay { + base address-allocation-type; + description + "Provider network provides DHCP relay service to customer."; + } + identity provider-dhcp-slaac { + base address-allocation-type; + description + "Provider network provides DHCP service to customer, + as well as SLAAC."; + } + identity static-address { + base address-allocation-type; + description + "Provider-to-customer addressing is static."; + } + identity slaac { + base address-allocation-type; + description + "Use IPv6 SLAAC."; + } + + identity site-role { + description + "Base identity for site type."; + } + identity any-to-any-role { + base site-role; + description + "Site in an any-to-any IP VPN."; + } + identity spoke-role { + base site-role; + description + "Spoke site in a Hub-and-Spoke IP VPN."; + } + identity hub-role { + base site-role; + description + "Hub site in a Hub-and-Spoke IP VPN."; + } + + identity vpn-topology { + description + "Base identity for VPN topology."; + } + identity any-to-any { + base vpn-topology; + description + "Identity for any-to-any VPN topology."; + } + identity hub-spoke { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology."; + } + identity hub-spoke-disjoint { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology + where Hubs cannot communicate with each other."; + } + + identity multicast-tree-type { + description + "Base identity for multicast tree type."; + } + identity ssm-tree-type { + base multicast-tree-type; + description + "Identity for SSM tree type."; + } + identity asm-tree-type { + base multicast-tree-type; + description + "Identity for ASM tree type."; + } + identity bidir-tree-type { + base multicast-tree-type; + description + "Identity for bidirectional tree type."; + } + + identity multicast-rp-discovery-type { + description + "Base identity for RP discovery type."; + } + + identity auto-rp { + base multicast-rp-discovery-type; + description + "Base identity for Auto-RP discovery type."; + } + identity static-rp { + base multicast-rp-discovery-type; + description + "Base identity for static type."; + } + identity bsr-rp { + base multicast-rp-discovery-type; + description + "Base identity for BSR discovery type."; + } + + identity routing-protocol-type { + description + "Base identity for routing protocol type."; + } + identity ospf { + base routing-protocol-type; + description + "Identity for OSPF protocol type."; + } + identity bgp { + base routing-protocol-type; + description + "Identity for BGP protocol type."; + } + identity static { + base routing-protocol-type; + description + "Identity for static routing protocol type."; + } + identity rip { + base routing-protocol-type; + description + "Identity for RIP protocol type."; + } + identity vrrp { + base routing-protocol-type; + description + "Identity for VRRP protocol type. + This is to be used when LANs are directly connected + to PE routers."; + } + + identity direct { + base routing-protocol-type; + description + "Identity for direct protocol type."; + } + + identity protocol-type { + description + "Base identity for protocol field type."; + } + identity tcp { + base protocol-type; + description + "TCP protocol type."; + } + identity udp { + base protocol-type; + description + "UDP protocol type."; + } + identity icmp { + base protocol-type; + description + "ICMP protocol type."; + } + identity icmp6 { + base protocol-type; + description + "ICMPv6 protocol type."; + } + identity gre { + base protocol-type; + description + "GRE protocol type."; + } + identity ipip { + base protocol-type; + description + "IP-in-IP protocol type."; + } + identity hop-by-hop { + base protocol-type; + description + "Hop-by-Hop IPv6 header type."; + } + + identity routing { + base protocol-type; + description + "Routing IPv6 header type."; + } + identity esp { + base protocol-type; + description + "ESP header type."; + } + identity ah { + base protocol-type; + description + "AH header type."; + } + + /* Groupings */ + + grouping vpn-service-cloud-access { + container cloud-accesses { + if-feature cloud-access; + list cloud-access { + + key cloud-identifier; + + leaf cloud-identifier { + type string; + description + "Identification of cloud service. + Local administration meaning."; + } + choice list-flavor { + case permit-any { + leaf permit-any { + type empty; + description + "Allows all sites."; + } + } + case deny-any-except { + leaf-list permit-site { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID to be authorized."; + } + } + case permit-any-except { + leaf-list deny-site { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID to be denied."; + } + } + description + "Choice for cloud access policy."; + } + container authorized-sites { + list authorized-site { + key site-id; + + leaf site-id { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID."; + } + description + "List of authorized sites."; + } + description + "Configuration of authorized sites."; + } + container denied-sites { + list denied-site { + key site-id; + + leaf site-id { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID."; + } + description + "List of denied sites."; + } + description + "Configuration of denied sites."; + } + + container address-translation { + container nat44 { + leaf enabled { + type boolean; + default false; + description + "Controls whether or not address translation is required."; + } + leaf nat44-customer-address { + type inet:ipv4-address; + must "../enabled = 'true'" { + description + "Applicable only if address translation is enabled."; + } + description + "Address to be used for translation. + This is to be used if the customer is + providing the address."; + } + description + "IPv4-to-IPv4 translation."; + } + description + "Container for NAT."; + } + description + "Cloud access configuration."; + } + description + "Container for cloud access configurations."; + } + description + "Grouping for VPN cloud definition."; + } + + grouping multicast-rp-group-cfg { + choice group-format { + case startend { + leaf group-start { + type inet:ip-address; + description + "First group address."; + } + leaf group-end { + type inet:ip-address; + description + "Last group address."; + } + } + case singleaddress { + leaf group-address { + type inet:ip-address; + description + "Group address."; + } + } + description + "Choice for group format."; + } + description + "Definition of groups for RP-to-group mapping."; + } + + grouping vpn-service-multicast { + container multicast { + if-feature multicast; + leaf enabled { + type boolean; + default false; + description + "Enables multicast."; + } + container customer-tree-flavors { + leaf-list tree-flavor { + type identityref { + base multicast-tree-type; + } + description + "Type of tree to be used."; + } + description + "Type of trees used by customer."; + } + container rp { + container rp-group-mappings { + list rp-group-mapping { + key id; + + leaf id { + type uint16; + description + "Unique identifier for the mapping."; + } + container provider-managed { + leaf enabled { + type boolean; + default false; + description + "Set to true if the RP must be a provider-managed node. + Set to false if it is a customer-managed node."; + } + leaf rp-redundancy { + when "../enabled = 'true'" { + description + "Relevant when the RP is provider-managed."; + } + type boolean; + default false; + description + "If true, a redundancy mechanism for the RP is required."; + } + leaf optimal-traffic-delivery { + when "../enabled = 'true'" { + description + "Relevant when the RP is provider-managed."; + } + type boolean; + default false; + description + "If true, the SP must ensure that + traffic uses an optimal path."; + } + description + "Parameters for a provider-managed RP."; + } + + leaf rp-address { + when "../provider-managed/enabled = 'false'" { + description + "Relevant when the RP is provider-managed."; + } + type inet:ip-address; + description + "Defines the address of the RP. + Used if the RP is customer-managed."; + } + + container groups { + list group { + key id; + + leaf id { + type uint16; + description + "Identifier for the group."; + } + uses multicast-rp-group-cfg; + description + "List of groups."; + } + + description + "Multicast groups associated with the RP."; + } + + description + "List of RP-to-group mappings."; + } + description + "RP-to-group mappings."; + } + container rp-discovery { + leaf rp-discovery-type { + type identityref { + base multicast-rp-discovery-type; + } + default static-rp; + description + "Type of RP discovery used."; + } + + container bsr-candidates { + when "../rp-discovery-type = 'bsr-rp'" { + description + "Only applicable if discovery type is BSR-RP."; + } + leaf-list bsr-candidate-address { + type inet:ip-address; + description + "Address of BSR candidate."; + } + description + "Customer BSR candidate's address."; + } + description + "RP discovery parameters."; + } + + description + "RP parameters."; + } + description + "Multicast global parameters for the VPN service."; + } + description + "Grouping for multicast VPN definition."; + } + + grouping vpn-service-mpls { + leaf carrierscarrier { + if-feature carrierscarrier; + type boolean; + default false; + description + "The VPN is using CsC, and so MPLS is required."; + } + description + "Grouping for MPLS CsC definition."; + } + + grouping customer-location-info { + container locations { + list location { + key location-id; + + leaf location-id { + type svc-id; + description + "Identifier for a particular location."; + } + leaf address { + type string; + description + "Address (number and street) of the site."; + } + leaf postal-code { + type string; + description + "Postal code of the site."; + } + leaf state { + type string; + description + "State of the site. This leaf can also be used to describe + a region for a country that does not have states."; + } + leaf city { + type string; + description + "City of the site."; + } + leaf country-code { + type string { + pattern '[A-Z]{2}'; + } + description + "Country of the site. + Expressed as ISO ALPHA-2 code."; + } + description + "Location of the site."; + } + description + "List of locations for the site."; + } + description + "This grouping defines customer location parameters."; + } + grouping site-group { + container groups { + list group { + key group-id; + + leaf group-id { + type string; + description + "Group-id the site belongs to."; + } + description + "List of group-ids."; + } + description + "Groups the site or site-network-access belongs to."; + } + description + "Grouping definition to assign + group-ids to site or site-network-access."; + } + grouping site-diversity { + container site-diversity { + if-feature site-diversity; + + uses site-group; + + description + "Diversity constraint type. + All site-network-accesses will inherit the group values + defined here."; + } + description + "This grouping defines site diversity parameters."; + } + grouping access-diversity { + container access-diversity { + if-feature site-diversity; + + uses site-group; + + container constraints { + list constraint { + key constraint-type; + + leaf constraint-type { + type identityref { + base placement-diversity; + } + description + "Diversity constraint type."; + } + container target { + choice target-flavor { + case id { + list group { + key group-id; + + leaf group-id { + type string; + description + "The constraint will be applied against + this particular group-id."; + } + description + "List of groups."; + } + } + case all-accesses { + leaf all-other-accesses { + type empty; + description + "The constraint will be applied against + all other site network accesses of this site."; + } + } + case all-groups { + leaf all-other-groups { + type empty; + description + "The constraint will be applied against + all other groups managed by the customer."; + } + } + description + "Choice for the group definition."; + } + + description + "The constraint will be applied against + this list of groups."; + } + description + "List of constraints."; + } + description + "Placement constraints for this site network access."; + } + + description + "Diversity parameters."; + } + description + "This grouping defines access diversity parameters."; + } + + grouping operational-requirements { + leaf requested-site-start { + type yang:date-and-time; + description + "Optional leaf indicating requested date and time when the + service at a particular site is expected to start."; + } + + leaf requested-site-stop { + type yang:date-and-time; + description + "Optional leaf indicating requested date and time when the + service at a particular site is expected to stop."; + } + description + "This grouping defines some operational parameters."; + } + + grouping operational-requirements-ops { + leaf actual-site-start { + type yang:date-and-time; + config false; + description + "Optional leaf indicating actual date and time when the + service at a particular site actually started."; + } + leaf actual-site-stop { + type yang:date-and-time; + config false; + description + "Optional leaf indicating actual date and time when the + service at a particular site actually stopped."; + } + description + "This grouping defines some operational parameters."; + } + + grouping flow-definition { + container match-flow { + leaf dscp { + type inet:dscp; + description + "DSCP value."; + } + leaf dot1p { + type uint8 { + range "0..7"; + } + description + "802.1p matching."; + } + leaf ipv4-src-prefix { + type inet:ipv4-prefix; + description + "Match on IPv4 src address."; + } + leaf ipv6-src-prefix { + type inet:ipv6-prefix; + description + "Match on IPv6 src address."; + } + leaf ipv4-dst-prefix { + type inet:ipv4-prefix; + description + "Match on IPv4 dst address."; + } + leaf ipv6-dst-prefix { + type inet:ipv6-prefix; + description + "Match on IPv6 dst address."; + } + leaf l4-src-port { + type inet:port-number; + description + "Match on Layer 4 src port."; + } + leaf-list target-sites { + type svc-id; + description + "Identify a site as traffic destination."; + } + container l4-src-port-range { + leaf lower-port { + type inet:port-number; + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + description + "Upper boundary must be higher than lower boundary."; + } + description + "Upper boundary for port."; + } + description + "Match on Layer 4 src port range."; + } + leaf l4-dst-port { + type inet:port-number; + description + "Match on Layer 4 dst port."; + } + container l4-dst-port-range { + leaf lower-port { + type inet:port-number; + description + "Lower boundary for port."; + } + + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + description + "Upper boundary must be higher than lower boundary."; + } + description + "Upper boundary for port."; + } + description + "Match on Layer 4 dst port range."; + } + leaf protocol-field { + type union { + type uint8; + type identityref { + base protocol-type; + } + } + description + "Match on IPv4 protocol or IPv6 Next Header field."; + } + + description + "Describes flow-matching criteria."; + } + description + "Flow definition based on criteria."; + } + grouping site-service-basic { + leaf svc-input-bandwidth { + type uint32; + units bps; + description + "From the PE's perspective, the service input + bandwidth of the connection."; + } + leaf svc-output-bandwidth { + type uint32; + units bps; + description + "From the PE's perspective, the service output + bandwidth of the connection."; + } + + leaf svc-mtu { + type uint16; + units bytes; + description + "MTU at service level. If the service is IP, + it refers to the IP MTU."; + } + description + "Defines basic service parameters for a site."; + } + grouping site-protection { + container traffic-protection { + if-feature fast-reroute; + leaf enabled { + type boolean; + default false; + description + "Enables traffic protection of access link."; + } + description + "Fast Reroute service parameters for the site."; + } + description + "Defines protection service parameters for a site."; + } + grouping site-service-mpls { + container carrierscarrier { + if-feature carrierscarrier; + leaf signalling-type { + type enumeration { + enum "ldp" { + description + "Use LDP as the signalling protocol + between the PE and the CE."; + } + enum "bgp" { + description + "Use BGP (as per RFC 3107) as the signalling protocol + between the PE and the CE. + In this case, BGP must also be configured as + the routing protocol."; + } + } + description + "MPLS signalling type."; + } + + description + "This container is used when the customer provides + MPLS-based services. This is used in the case of CsC."; + } + description + "Defines MPLS service parameters for a site."; + } + grouping site-service-qos-profile { + container qos { + if-feature qos; + container qos-classification-policy { + list rule { + key id; + ordered-by user; + + leaf id { + type uint16; + description + "ID of the rule."; + } + + choice match-type { + case match-flow { + uses flow-definition; + } + case match-application { + leaf match-application { + type identityref { + base customer-application; + } + description + "Defines the application to match."; + } + } + description + "Choice for classification."; + } + + leaf target-class-id { + type string; + description + "Identification of the class of service. + This identifier is internal to the administration."; + } + + description + "List of marking rules."; + } + description + "Configuration of the traffic classification policy."; + } + container qos-profile { + + choice qos-profile { + description + "Choice for QoS profile. + Can be standard profile or custom."; + case standard { + leaf profile { + type string; + description + "QoS profile to be used."; + } + } + case custom { + container classes { + if-feature qos-custom; + list class { + key class-id; + + leaf class-id { + type string; + description + "Identification of the class of service. + This identifier is internal to the administration."; + } + leaf rate-limit { + type uint8; + units percent; + description + "To be used if the class must be rate-limited. + Expressed as percentage of the service bandwidth."; + } + container latency { + choice flavor { + case lowest { + leaf use-lowest-latency { + type empty; + description + "The traffic class should use the path with the + lowest latency."; + } + } + + case boundary { + leaf latency-boundary { + type uint16; + units msec; + description + "The traffic class should use a path with a + defined maximum latency."; + } + } + description + "Latency constraint on the traffic class."; + } + description + "Latency constraint on the traffic class."; + } + container jitter { + choice flavor { + case lowest { + leaf use-lowest-jitter { + type empty; + description + "The traffic class should use the path with the + lowest jitter."; + } + } + case boundary { + leaf latency-boundary { + type uint32; + units usec; + description + "The traffic class should use a path with a + defined maximum jitter."; + } + } + description + "Jitter constraint on the traffic class."; + } + description + "Jitter constraint on the traffic class."; + } + container bandwidth { + leaf guaranteed-bw-percent { + type uint8; + units percent; + description + "To be used to define the guaranteed bandwidth + as a percentage of the available service bandwidth."; + } + leaf end-to-end { + type empty; + description + "Used if the bandwidth reservation + must be done on the MPLS network too."; + } + description + "Bandwidth constraint on the traffic class."; + } + description + "List of classes of services."; + } + description + "Container for list of classes of services."; + } + + } + + } + description + "QoS profile configuration."; + } + description + "QoS configuration."; + } + description + "This grouping defines QoS parameters for a site."; + } + + grouping site-security-authentication { + container authentication { + description + "Authentication parameters."; + } + description + "This grouping defines authentication parameters for a site."; + + } + grouping site-security-encryption { + container encryption { + if-feature encryption; + leaf enabled { + type boolean; + default false; + description + "If true, access encryption is required."; + } + + leaf layer { + type enumeration { + enum layer2 { + description + "Encryption will occur at Layer 2."; + } + enum layer3 { + description + "Encryption will occur at Layer 3. + For example, IPsec may be used."; + } + } + mandatory true; + description + "Layer on which encryption is applied."; + } + container encryption-profile { + choice profile { + case provider-profile { + leaf profile-name { + type string; + description + "Name of the SP profile to be applied."; + } + } + case customer-profile { + leaf algorithm { + type string; + description + "Encryption algorithm to be used."; + } + choice key-type { + case psk { + leaf preshared-key { + type string; + description + "Key coming from customer."; + } + } + case pki { + + } + description + "Type of keys to be used."; + } + } + + description + "Choice of profile."; + } + description + "Profile of encryption to be applied."; + } + description + "Encryption parameters."; + } + description + "This grouping defines encryption parameters for a site."; + } + + grouping site-attachment-bearer { + container bearer { + container requested-type { + if-feature requested-type; + leaf requested-type { + type string; + description + "Type of requested bearer: Ethernet, DSL, + Wireless, etc. Operator specific."; + } + leaf strict { + type boolean; + default false; + description + "Defines whether requested-type is a preference + or a strict requirement."; + } + description + "Container for requested-type."; + } + leaf always-on { + if-feature always-on; + type boolean; + default true; + description + "Request for an always-on access type. + For example, this could mean no dial access type."; + } + leaf bearer-reference { + if-feature bearer-reference; + type string; + description + "This is an internal reference for the SP."; + } + + description + "Bearer-specific parameters. + To be augmented."; + } + description + "Defines physical properties of a site attachment."; + } + + grouping site-routing { + container routing-protocols { + list routing-protocol { + key type; + + leaf type { + type identityref { + base routing-protocol-type; + } + description + "Type of routing protocol."; + } + + container ospf { + when "../type = 'ospf'" { + description + "Only applies when protocol is OSPF."; + } + if-feature rtg-ospf; + leaf-list address-family { + type address-family; + + description + "Address family to be activated."; + } + leaf area-address { + type yang:dotted-quad; + description + "Area address."; + } + leaf metric { + type uint16; + description + "Metric of the PE-CE link."; + } + + container sham-links { + if-feature rtg-ospf-sham-link; + list sham-link { + key target-site; + + leaf target-site { + type svc-id; + description + "Target site for the sham link connection. + The site is referred to by its ID."; + } + leaf metric { + type uint16; + description + "Metric of the sham link."; + } + description + "Creates a sham link with another site."; + } + description + "List of sham links."; + } + description + "OSPF-specific configuration."; + } + + container bgp { + + when "../type = 'bgp'" { + description + "Only applies when protocol is BGP."; + } + if-feature rtg-bgp; + leaf autonomous-system { + type uint32; + description + "AS number."; + } + leaf-list address-family { + type address-family; + + description + "Address family to be activated."; + } + description + "BGP-specific configuration."; + } + + container static { + when "../type = 'static'" { + description + "Only applies when protocol is static."; + } + + container cascaded-lan-prefixes { + list ipv4-lan-prefixes { + if-feature ipv4; + key "lan next-hop"; + + leaf lan { + type inet:ipv4-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in VPN policies."; + } + leaf next-hop { + type inet:ipv4-address; + description + "Next-hop address to use on the customer side."; + } + description + "List of LAN prefixes for the site."; + } + list ipv6-lan-prefixes { + if-feature ipv6; + key "lan next-hop"; + + leaf lan { + type inet:ipv6-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in VPN policies."; + } + leaf next-hop { + type inet:ipv6-address; + description + "Next-hop address to use on the customer side."; + } + description + "List of LAN prefixes for the site."; + } + description + "LAN prefixes from the customer."; + } + description + "Configuration specific to static routing."; + } + container rip { + + when "../type = 'rip'" { + description + "Only applies when protocol is RIP."; + } + if-feature rtg-rip; + leaf-list address-family { + type address-family; + + description + "Address family to be activated."; + } + + description + "Configuration specific to RIP routing."; + } + + container vrrp { + + when "../type = 'vrrp'" { + description + "Only applies when protocol is VRRP."; + } + if-feature rtg-vrrp; + leaf-list address-family { + type address-family; + + description + "Address family to be activated."; + } + description + "Configuration specific to VRRP routing."; + } + + description + "List of routing protocols used on + the site. This list can be augmented."; + } + description + "Defines routing protocols."; + } + description + "Grouping for routing protocols."; + } + + grouping site-attachment-ip-connection { + container ip-connection { + container ipv4 { + if-feature ipv4; + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + default "static-address"; + description + "Defines how addresses are allocated."; + } + + leaf number-of-dynamic-address { + when "../address-allocation-type = 'provider-dhcp'" { + description + "Only applies when addresses are allocated by DHCP."; + } + type uint8; + default 1; + description + "Describes the number of IP addresses the customer requires."; + } + container dhcp-relay { + when "../address-allocation-type = 'provider-dhcp-relay'" { + description + "Only applies when provider is required to implement + DHCP relay function."; + } + container customer-dhcp-servers { + leaf-list server-ip-address { + type inet:ipv4-address; + description + "IP address of customer DHCP server."; + } + description + "Container for list of customer DHCP servers."; + } + description + "DHCP relay provided by operator."; + } + container addresses { + when "../address-allocation-type = 'static-address'" { + description + "Only applies when protocol allocation type is static."; + } + leaf provider-address { + type inet:ipv4-address; + description + "Address of provider side."; + } + leaf customer-address { + type inet:ipv4-address; + description + "Address of customer side."; + } + leaf mask { + type uint8 { + range "0..31"; + } + description + "Subnet mask expressed in bits."; + } + description + "Describes IP addresses used."; + } + + description + "IPv4-specific parameters."; + + } + container ipv6 { + if-feature ipv6; + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + default "static-address"; + description + "Defines how addresses are allocated."; + } + leaf number-of-dynamic-address { + when + "../address-allocation-type = 'provider-dhcp' "+ + "or ../address-allocation-type "+ + "= 'provider-dhcp-slaac'" { + description + "Only applies when addresses are allocated by DHCP."; + } + type uint8; + default 1; + description + "Describes the number of IP addresses the customer requires."; + } + container dhcp-relay { + when "../address-allocation-type = 'provider-dhcp-relay'" { + description + "Only applies when provider is required to implement + DHCP relay function."; + } + container customer-dhcp-servers { + leaf-list server-ip-address { + type inet:ipv6-address; + description + "IP address of customer DHCP server."; + } + description + "Container for list of customer DHCP servers."; + } + description + "DHCP relay provided by operator."; + } + container addresses { + when "../address-allocation-type = 'static-address'" { + description + "Only applies when protocol allocation type is static."; + } + leaf provider-address { + type inet:ipv6-address; + description + "Address of provider side."; + } + leaf customer-address { + type inet:ipv6-address; + description + "Address of customer side."; + } + leaf mask { + type uint8 { + range "0..127"; + } + description + "Subnet mask expressed in bits."; + } + description + "Describes IP addresses used."; + } + description + "IPv6-specific parameters."; + + } + container oam { + container bfd { + if-feature bfd; + leaf enabled { + type boolean; + default false; + description + "BFD activation."; + } + + choice holdtime { + case profile { + leaf profile-name { + type string; + description + "Well-known SP profile."; + } + description + "Well-known SP profile."; + } + case fixed { + leaf fixed-value { + type uint32; + units msec; + description + "Expected holdtime expressed in msec."; + } + } + description + "Choice for holdtime flavor."; + } + description + "Container for BFD."; + } + description + "Defines the OAM mechanisms used on the connection."; + } + description + "Defines connection parameters."; + } + description + "This grouping defines IP connection parameters."; + } + + grouping site-service-multicast { + container multicast { + if-feature multicast; + leaf multicast-site-type { + type enumeration { + enum receiver-only { + description + "The site only has receivers."; + } + enum source-only { + description + "The site only has sources."; + } + enum source-receiver { + description + "The site has both sources and receivers."; + } + } + default "source-receiver"; + description + "Type of multicast site."; + } + container multicast-address-family { + leaf ipv4 { + if-feature ipv4; + type boolean; + default true; + description + "Enables IPv4 multicast."; + } + leaf ipv6 { + if-feature ipv6; + type boolean; + default false; + description + "Enables IPv6 multicast."; + } + description + "Defines protocol to carry multicast."; + } + leaf protocol-type { + type enumeration { + enum host { + description + "Hosts are directly connected to the provider network. + Host protocols such as IGMP or MLD are required."; + } + + enum router { + description + "Hosts are behind a customer router. + PIM will be implemented."; + } + enum both { + description + "Some hosts are behind a customer router, and some others + are directly connected to the provider network. + Both host and routing protocols must be used. + Typically, IGMP and PIM will be implemented."; + } + } + default "both"; + description + "Multicast protocol type to be used with the customer site."; + } + + description + "Multicast parameters for the site."; + } + description + "Multicast parameters for the site."; + } + + grouping site-management { + container management { + leaf type { + type identityref { + base management; + } + description + "Management type of the connection."; + } + description + "Management configuration."; + } + description + "Management parameters for the site."; + } + + grouping site-devices { + container devices { + must "/l3vpn-svc/sites/site/management/type = "+ + "'provider-managed' or "+ + "/l3vpn-svc/sites/site/management/type = "+ + "'co-managed'" { + description + "Applicable only for provider-managed or co-managed device."; + } + list device { + key device-id; + + leaf device-id { + type svc-id; + description + "Identifier for the device."; + } + leaf location { + type leafref { + path "/l3vpn-svc/sites/site/locations/"+ + "location/location-id"; + } + description + "Location of the device."; + } + container management { + must "/l3vpn-svc/sites/site/management/type"+ + "= 'co-managed'" { + description + "Applicable only for co-managed device."; + } + leaf address-family { + type address-family; + + description + "Address family used for management."; + } + leaf address { + type inet:ip-address; + description + "Management address."; + } + description + "Management configuration. Applicable only for + co-managed device."; + } + + description + "Device configuration."; + } + description + "List of devices requested by customer."; + } + description + "Grouping for device allocation."; + } + grouping site-vpn-flavor { + leaf site-vpn-flavor { + type identityref { + base site-vpn-flavor; + } + default site-vpn-flavor-single; + description + "Defines whether the site is, for example, + a single VPN site or a multiVPN."; + } + description + "Grouping for site VPN flavor."; + } + + grouping site-vpn-policy { + container vpn-policies { + list vpn-policy { + key vpn-policy-id; + + leaf vpn-policy-id { + type svc-id; + description + "Unique identifier for the VPN policy."; + } + + list entries { + key id; + + leaf id { + type svc-id; + description + "Unique identifier for the policy entry."; + } + + container filter { + choice lan { + case prefixes { + leaf-list ipv4-lan-prefix { + if-feature ipv4; + type inet:ipv4-prefix; + description + "List of IPv4 prefixes to be matched."; + } + leaf-list ipv6-lan-prefix { + if-feature ipv6; + type inet:ipv6-prefix; + description + "List of IPv6 prefixes to be matched."; + } + } + case lan-tag { + leaf-list lan-tag { + type string; + description + "List of 'lan-tag' items to be matched."; + } + } + description + "Choice of ways to do LAN matching."; + } + description + "If used, it permits the splitting of + site LANs among multiple VPNs. + If no filter is used, all the LANs will be + part of the same VPNs with the same role."; + } + container vpn { + leaf vpn-id { + type leafref { + path "/l3vpn-svc/vpn-services/"+ + "vpn-service/vpn-id"; + } + mandatory true; + description + "Reference to an IP VPN."; + } + + leaf site-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "Role of the site in the IP VPN."; + } + description + "List of VPNs the LAN is associated with."; + } + description + "List of entries for export policy."; + } + description + "List of VPN policies."; + } + description + "VPN policy."; + } + description + "VPN policy parameters for the site."; + } + + grouping site-maximum-routes { + container maximum-routes { + list address-family { + key af; + + leaf af { + type address-family; + + description + "Address family."; + } + leaf maximum-routes { + type uint32; + description + "Maximum prefixes the VRF can accept for this address family."; + } + description + "List of address families."; + } + + description + "Defines 'maximum-routes' for the VRF."; + } + + description + "Defines 'maximum-routes' for the site."; + } + + grouping site-security { + container security { + uses site-security-authentication; + uses site-security-encryption; + + description + "Site-specific security parameters."; + } + description + "Grouping for security parameters."; + } + + grouping site-service { + container service { + uses site-service-qos-profile; + uses site-service-mpls; + uses site-service-multicast; + + description + "Service parameters on the attachment."; + } + description + "Grouping for service parameters."; + } + + grouping site-network-access-service { + container service { + uses site-service-basic; + uses site-service-qos-profile; + uses site-service-mpls; + uses site-service-multicast; + + description + "Service parameters on the attachment."; + } + description + "Grouping for service parameters."; + } + + grouping vpn-extranet { + container extranet-vpns { + if-feature extranet-vpn; + list extranet-vpn { + key vpn-id; + + leaf vpn-id { + type svc-id; + description + "Identifies the target VPN."; + } + leaf local-sites-role { + type identityref { + base site-role; + + } + default any-to-any-role; + description + "This describes the role of the + local sites in the target VPN topology."; + } + description + "List of extranet VPNs the local VPN is attached to."; + } + description + "Container for extranet VPN configuration."; + } + description + "Grouping for extranet VPN configuration. + This provides an easy way to interconnect + all sites from two VPNs."; + } + + grouping site-attachment-availability { + container availability { + leaf access-priority { + type uint32; + default 1; + description + "Defines the priority for the access. + The higher the access-priority value, + the higher the preference of the access will be."; + } + description + "Availability parameters (used for multihoming)."; + } + + description + "Defines availability parameters for a site."; + } + + grouping access-vpn-policy { + container vpn-attachment { + + choice attachment-flavor { + case vpn-policy-id { + leaf vpn-policy-id { + type leafref { + path "/l3vpn-svc/sites/site/"+ + "vpn-policies/vpn-policy/"+ + "vpn-policy-id"; + } + description + "Reference to a VPN policy."; + } + } + case vpn-id { + leaf vpn-id { + type leafref { + path "/l3vpn-svc/vpn-services"+ + "/vpn-service/vpn-id"; + } + description + "Reference to a VPN."; + } + leaf site-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "Role of the site in the IP VPN."; + } + } + mandatory true; + description + "Choice for VPN attachment flavor."; + } + description + "Defines VPN attachment of a site."; + } + description + "Defines the VPN attachment rules for a site's logical access."; + } + + grouping vpn-svc-cfg { + leaf vpn-id { + type svc-id; + description + "VPN identifier. Local administration meaning."; + } + leaf customer-name { + type string; + description + "Name of the customer."; + } + leaf vpn-service-topology { + type identityref { + base vpn-topology; + } + default "any-to-any"; + description + "VPN service topology."; + } + + uses vpn-service-cloud-access; + uses vpn-service-multicast; + uses vpn-service-mpls; + uses vpn-extranet; + + description + "Grouping for VPN service configuration."; + } + + grouping site-top-level-cfg { + uses operational-requirements; + uses customer-location-info; + uses site-devices; + uses site-diversity; + uses site-management; + uses site-vpn-policy; + uses site-vpn-flavor; + uses site-maximum-routes; + uses site-security; + uses site-service; + uses site-protection; + uses site-routing; + + description + "Grouping for site top-level configuration."; + } + + grouping site-network-access-top-level-cfg { + leaf site-network-access-type { + type identityref { + base site-network-access-type; + } + default "point-to-point"; + description + "Describes the type of connection, e.g., + point-to-point or multipoint."; + } + + choice location-flavor { + case location { + when "/l3vpn-svc/sites/site/management/type = "+ + "'customer-managed'" { + description + "Applicable only for customer-managed device."; + } + leaf location-reference { + type leafref { + path "/l3vpn-svc/sites/site/locations/"+ + "location/location-id"; + } + description + "Location of the site-network-access."; + } + } + case device { + when "/l3vpn-svc/sites/site/management/type = "+ + "'provider-managed' or "+ + "/l3vpn-svc/sites/site/management/type = "+ + "'co-managed'" { + description + "Applicable only for provider-managed or co-managed device."; + } + leaf device-reference { + type leafref { + path "/l3vpn-svc/sites/site/devices/"+ + "device/device-id"; + } + description + "Identifier of CE to use."; + } + } + mandatory true; + description + "Choice of how to describe the site's location."; + } + uses access-diversity; + uses site-attachment-bearer; + uses site-attachment-ip-connection; + uses site-security; + uses site-network-access-service; + uses site-routing; + uses site-attachment-availability; + uses access-vpn-policy; + + description + "Grouping for site network access top-level configuration."; + } + + /* Main blocks */ + + container l3vpn-svc { + container vpn-services { + list vpn-service { + key vpn-id; + + uses vpn-svc-cfg; + + description + "List of VPN services."; + } + description + "Top-level container for the VPN services."; + } + + container sites { + list site { + key site-id; + + leaf site-id { + type svc-id; + description + "Identifier of the site."; + } + + uses site-top-level-cfg; + uses operational-requirements-ops; + + container site-network-accesses { + list site-network-access { + key site-network-access-id; + + leaf site-network-access-id { + type svc-id; + description + "Identifier for the access."; + } + uses site-network-access-top-level-cfg; + + description + "List of accesses for a site."; + } + description + "List of accesses for a site."; + } + + description + "List of sites."; + } + description + "Container for sites."; + } + + description + "Main container for L3VPN service configuration."; + } + +} diff --git a/models/ietf/RFC/ietf-l3vpn-svc@2018-01-19.yang b/models/ietf/RFC/ietf-l3vpn-svc@2018-01-19.yang new file mode 100644 index 0000000000000000000000000000000000000000..9c2ab5a3fe55a663998a7fbbc9a8bfcd8e4d911d --- /dev/null +++ b/models/ietf/RFC/ietf-l3vpn-svc@2018-01-19.yang @@ -0,0 +1,2797 @@ +module ietf-l3vpn-svc { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l3vpn-svc"; + prefix l3vpn-svc; + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + organization + "IETF L3SM Working Group"; + contact + "WG List: <mailto:l3sm@ietf.org> + Editor: + L3SM WG + Chairs: + Adrian Farrel, Qin Wu + "; + description + "This YANG module defines a generic service configuration + model for Layer 3 VPNs. This model is common across all + vendor implementations. + + Copyright (c) 2018 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 Simplified 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 8299; see + the RFC itself for full legal notices."; + + revision 2018-01-19 { + description + "Revision of RFC 8049 to fix implementation issues."; + reference + "RFC 8299"; + } + revision 2017-01-27 { + description + "Initial document."; + reference + "RFC 8049."; + } + /* Features */ + feature cloud-access { + description + "Allows the VPN to connect to a CSP."; + } + feature multicast { + description + "Enables multicast capabilities in a VPN."; + } + feature ipv4 { + description + "Enables IPv4 support in a VPN."; + } + feature ipv6 { + description + "Enables IPv6 support in a VPN."; + } + feature lan-tag { + description + "Enables LAN Tag support in a VPN Policy filter."; + } + feature carrierscarrier { + description + "Enables support of CsC."; + } + feature extranet-vpn { + description + "Enables support of extranet VPNs."; + } + feature site-diversity { + description + "Enables support of site diversity constraints."; + } + feature encryption { + description + "Enables support of encryption."; + } + feature qos { + description + "Enables support of classes of services."; + } + feature qos-custom { + description + "Enables support of the custom QoS profile."; + } + feature rtg-bgp { + description + "Enables support of the BGP routing protocol."; + } + feature rtg-rip { + description + "Enables support of the RIP routing protocol."; + } + feature rtg-ospf { + description + "Enables support of the OSPF routing protocol."; + } + feature rtg-ospf-sham-link { + description + "Enables support of OSPF sham links."; + } + feature rtg-vrrp { + description + "Enables support of the VRRP routing protocol."; + } + feature fast-reroute { + description + "Enables support of Fast Reroute."; + } + feature bfd { + description + "Enables support of BFD."; + } + feature always-on { + description + "Enables support of the 'always-on' access constraint."; + } + feature requested-type { + description + "Enables support of the 'requested-type' access constraint."; + } + feature bearer-reference { + description + "Enables support of the 'bearer-reference' access constraint."; + } + feature target-sites { + description + "Enables support of the 'target-sites' match flow parameter."; + } + /* Typedefs */ + typedef svc-id { + type string; + description + "Defines a type of service component identifier."; + } + typedef template-id { + type string; + description + "Defines a type of service template identifier."; + } + typedef address-family { + type enumeration { + enum ipv4 { + description + "IPv4 address family."; + } + enum ipv6 { + description + "IPv6 address family."; + } + } + description + "Defines a type for the address family."; + } + /* Identities */ + identity site-network-access-type { + description + "Base identity for site-network-access type."; + } + identity point-to-point { + base site-network-access-type; + description + "Identity for point-to-point connection."; + } + identity multipoint { + base site-network-access-type; + description + "Identity for multipoint connection. + Example: Ethernet broadcast segment."; + } + identity placement-diversity { + description + "Base identity for site placement constraints."; + } + identity bearer-diverse { + base placement-diversity; + description + "Identity for bearer diversity. + The bearers should not use common elements."; + } + identity pe-diverse { + base placement-diversity; + description + "Identity for PE diversity."; + } + identity pop-diverse { + base placement-diversity; + description + "Identity for POP diversity."; + } + identity linecard-diverse { + base placement-diversity; + description + "Identity for linecard diversity."; + } + identity same-pe { + base placement-diversity; + description + "Identity for having sites connected on the same PE."; + } + identity same-bearer { + base placement-diversity; + description + "Identity for having sites connected using the same bearer."; + } + identity customer-application { + description + "Base identity for customer application."; + } + identity web { + base customer-application; + description + "Identity for Web application (e.g., HTTP, HTTPS)."; + } + identity mail { + base customer-application; + description + "Identity for mail application."; + } + identity file-transfer { + base customer-application; + description + "Identity for file transfer application (e.g., FTP, SFTP)."; + } + identity database { + base customer-application; + description + "Identity for database application."; + } + identity social { + base customer-application; + description + "Identity for social-network application."; + } + identity games { + base customer-application; + description + "Identity for gaming application."; + } + identity p2p { + base customer-application; + description + "Identity for peer-to-peer application."; + } + identity network-management { + base customer-application; + description + "Identity for management application + (e.g., Telnet, syslog, SNMP)."; + } + identity voice { + base customer-application; + description + "Identity for voice application."; + } + identity video { + base customer-application; + description + "Identity for video conference application."; + } + identity embb { + base customer-application; + description + "Identity for an enhanced Mobile Broadband (eMBB) + application. Note that an eMBB application demands + network performance with a wide variety of + characteristics, such as data rate, latency, + loss rate, reliability, and many other parameters."; +} +identity urllc { + base customer-application; + description + "Identity for an Ultra-Reliable and Low Latency + Communications (URLLC) application. Note that a + URLLC application demands network performance + with a wide variety of characteristics, such as latency, + reliability, and many other parameters."; + } + identity mmtc { + base customer-application; + description + "Identity for a massive Machine Type + Communications (mMTC) application. Note that an + mMTC application demands network performance + with a wide variety of characteristics, such as data + rate, latency, loss rate, reliability, and many + other parameters."; + } + identity site-vpn-flavor { + description + "Base identity for the site VPN service flavor."; + } + identity site-vpn-flavor-single { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when the site belongs to only one VPN."; + } + identity site-vpn-flavor-multi { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when a logical connection of a site + belongs to multiple VPNs."; + } + identity site-vpn-flavor-sub { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when a site has multiple logical connections. + Each connection may belong to different multiple VPNs."; + } + identity site-vpn-flavor-nni { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used to describe an NNI option A connection."; + } + identity management { + description + "Base identity for site management scheme."; + } + identity co-managed { + base management; + description + "Base identity for co-managed site."; + } + identity customer-managed { + base management; + description + "Base identity for customer-managed site."; + } + identity provider-managed { + base management; + description + "Base identity for provider-managed site."; + } + identity address-allocation-type { + description + "Base identity for address-allocation-type for PE-CE link."; + } + identity provider-dhcp { + base address-allocation-type; + description + "Provider network provides DHCP service to customer."; + } + identity provider-dhcp-relay { + base address-allocation-type; + description + "Provider network provides DHCP relay service to customer."; + } + identity provider-dhcp-slaac { + base address-allocation-type; + description + "Provider network provides DHCP service to customer, + as well as SLAAC."; + } + identity static-address { + base address-allocation-type; + description + "Provider-to-customer addressing is static."; + } + identity slaac { + base address-allocation-type; + description + "Use IPv6 SLAAC."; + } + identity site-role { + description + "Base identity for site type."; + } + identity any-to-any-role { + base site-role; + description + "Site in an any-to-any IP VPN."; + } + identity spoke-role { + base site-role; + description + "Spoke site in a Hub-and-Spoke IP VPN."; + } + identity hub-role { + base site-role; + description + "Hub site in a Hub-and-Spoke IP VPN."; + } + identity vpn-topology { + description + "Base identity for VPN topology."; + } + identity any-to-any { + base vpn-topology; + description + "Identity for any-to-any VPN topology."; + } + identity hub-spoke { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology."; + } + identity hub-spoke-disjoint { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology + where Hubs cannot communicate with each other."; + } + identity multicast-tree-type { + description + "Base identity for multicast tree type."; + } + identity ssm-tree-type { + base multicast-tree-type; + description + "Identity for SSM tree type."; + } + identity asm-tree-type { + base multicast-tree-type; + description + "Identity for ASM tree type."; + } + identity bidir-tree-type { + base multicast-tree-type; + description + "Identity for bidirectional tree type."; + } + identity multicast-rp-discovery-type { + description + "Base identity for RP discovery type."; + } + identity auto-rp { + base multicast-rp-discovery-type; + description + "Base identity for Auto-RP discovery type."; + } + identity static-rp { + base multicast-rp-discovery-type; + description + "Base identity for static type."; + } + identity bsr-rp { + base multicast-rp-discovery-type; + description + "Base identity for BSR discovery type."; + } + identity routing-protocol-type { + description + "Base identity for routing protocol type."; + } + identity ospf { + base routing-protocol-type; + description + "Identity for OSPF protocol type."; + } + identity bgp { + base routing-protocol-type; + description + "Identity for BGP protocol type."; + } + identity static { + base routing-protocol-type; + description + "Identity for static routing protocol type."; + } + identity rip { + base routing-protocol-type; + description + "Identity for RIP protocol type."; + } + identity vrrp { + base routing-protocol-type; + description + "Identity for VRRP protocol type. + This is to be used when LANs are directly connected + to PE routers."; + } + identity direct { + base routing-protocol-type; + description + "Identity for direct protocol type."; + } + identity protocol-type { + description + "Base identity for protocol field type."; + } + identity tcp { + base protocol-type; + description + "TCP protocol type."; + } + identity udp { + base protocol-type; + description + "UDP protocol type."; + } + + identity icmp { + base protocol-type; + description + "ICMP protocol type."; + } + identity icmp6 { + base protocol-type; + description + "ICMPv6 protocol type."; + } + identity gre { + base protocol-type; + description + "GRE protocol type."; + } + identity ipip { + base protocol-type; + description + "IP-in-IP protocol type."; + } + identity hop-by-hop { + base protocol-type; + description + "Hop-by-Hop IPv6 header type."; + } + identity routing { + base protocol-type; + description + "Routing IPv6 header type."; + } + identity esp { + base protocol-type; + description + "ESP header type."; + } + identity ah { + base protocol-type; + description + "AH header type."; + } + identity vpn-policy-filter-type { + description + "Base identity for VPN Policy filter type."; + } + identity ipv4 { + base vpn-policy-filter-type; + description + "Identity for IPv4 Prefix filter type."; + } + identity ipv6 { + base vpn-policy-filter-type; + description + "Identity for IPv6 Prefix filter type."; +} + identity lan { + base vpn-policy-filter-type; + description + "Identity for LAN Tag filter type."; +} + + identity qos-profile-direction { + description + "Base identity for QoS profile direction."; + } + + identity site-to-wan { + base qos-profile-direction; + description + "Identity for Site-to-WAN direction."; + } + identity wan-to-site { + base qos-profile-direction; + description + "Identity for WAN-to-Site direction."; + } + identity both { + base qos-profile-direction; + description + "Identity for both WAN-to-Site direction + and Site-to-WAN direction."; + } + /* Groupings */ + grouping vpn-service-cloud-access { + container cloud-accesses { + if-feature cloud-access; + list cloud-access { + key cloud-identifier; + leaf cloud-identifier { + type leafref { + path "/l3vpn-svc/vpn-profiles/"+ + "valid-provider-identifiers/cloud-identifier/id"; + } + description + "Identification of cloud service. + Local administration meaning."; + } + choice list-flavor { + case permit-any { + leaf permit-any { + type empty; + description + "Allows all sites."; + } + } + case deny-any-except { + leaf-list permit-site { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID to be authorized."; + } + } + case permit-any-except { + leaf-list deny-site { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID to be denied."; + } + } + description + "Choice for cloud access policy. By + default, all sites in the IP VPN MUST + be authorized to access the cloud."; + } + container address-translation { + container nat44 { + leaf enabled { + type boolean; + default false; + description + "Controls whether or not Network address + translation from IPv4 to IPv4 (NAT44) + [RFC3022] is required."; + } + leaf nat44-customer-address { + type inet:ipv4-address; + description + "Address to be used for network address + translation from IPv4 to IPv4. This is + to be used if the customer is providing + the IPv4 address. If the customer address + is not set, the model assumes that the + provider will allocate the address."; + } + description + "IPv4-to-IPv4 translation."; + } + description + "Container for NAT."; + } + description + "Cloud access configuration."; + } + description + "Container for cloud access configurations."; + } + description + "Grouping for VPN cloud definition."; + } + grouping multicast-rp-group-cfg { + choice group-format { + mandatory true; + case singleaddress { + leaf group-address { + type inet:ip-address; + description + "A single multicast group address."; + } + } + case startend { + leaf group-start { + type inet:ip-address; + description + "The first multicast group address in + the multicast group address range."; + } + leaf group-end { + type inet:ip-address; + description + "The last multicast group address in + the multicast group address range."; + } + } + description + "Choice for multicast group format."; + } + description + "This grouping defines multicast group or + multicast groups for RP-to-group mapping."; + } + grouping vpn-service-multicast { + container multicast { + if-feature multicast; + leaf enabled { + type boolean; + default false; + description + "Enables multicast."; + } + container customer-tree-flavors { + leaf-list tree-flavor { + type identityref { + base multicast-tree-type; + } + description + "Type of tree to be used."; + } + description + "Type of trees used by customer."; + } + container rp { + container rp-group-mappings { + list rp-group-mapping { + key id; + leaf id { + type uint16; + description + "Unique identifier for the mapping."; + } + container provider-managed { + leaf enabled { + type boolean; + default false; + description + "Set to true if the Rendezvous Point (RP) + must be a provider-managed node. Set to false + if it is a customer-managed node."; + } + leaf rp-redundancy { + type boolean; + default false; + description + "If true, a redundancy mechanism for the RP + is required."; + } + leaf optimal-traffic-delivery { + type boolean; + default false; + description + "If true, the SP must ensure that + traffic uses an optimal path. An SP may use + Anycast RP or RP-tree-to-SPT switchover + architectures."; + } + description + "Parameters for a provider-managed RP."; + } + leaf rp-address { + when "../provider-managed/enabled = 'false'" { + description + "Relevant when the RP is not provider-managed."; + } + type inet:ip-address; + mandatory true; + description + "Defines the address of the RP. + Used if the RP is customer-managed."; + } + container groups { + list group { + key id; + leaf id { + type uint16; + description + "Identifier for the group."; + } + uses multicast-rp-group-cfg; + description + "List of multicast groups."; + } + description + "Multicast groups associated with the RP."; + } + description + "List of RP-to-group mappings."; + } + description + "RP-to-group mappings parameters."; + } + container rp-discovery { + leaf rp-discovery-type { + type identityref { + base multicast-rp-discovery-type; + } + default static-rp; + description + "Type of RP discovery used."; + } + container bsr-candidates { + when "derived-from-or-self(../rp-discovery-type, "+ + "'l3vpn-svc:bsr-rp')" { + description + "Only applicable if discovery type + is BSR-RP."; + } + leaf-list bsr-candidate-address { + type inet:ip-address; + description + "Address of BSR candidate."; + } + description + "Container for List of Customer + BSR candidate's addresses."; + } + description + "RP discovery parameters."; + } + description + "RP parameters."; + } + description + "Multicast global parameters for the VPN service."; + } + description + "Grouping for multicast VPN definition."; + } + grouping vpn-service-mpls { + leaf carrierscarrier { + if-feature carrierscarrier; + type boolean; + default false; + description + "The VPN is using CsC, and so MPLS is required."; + } + description + "Grouping for MPLS CsC definition."; + } + grouping customer-location-info { + container locations { + list location { + key location-id; + leaf location-id { + type svc-id; + description + "Identifier for a particular location."; + } + leaf address { + type string; + description + "Address (number and street) of the site."; + } + leaf postal-code { + type string; + description + "Postal code of the site."; + } + leaf state { + type string; + description + "State of the site. This leaf can also be + used to describe a region for a country that + does not have states."; + } + leaf city { + type string; + description + "City of the site."; + } + leaf country-code { + type string { + pattern '[A-Z]{2}'; + } + description + "Country of the site. + Expressed as ISO ALPHA-2 code."; + } + description + "Location of the site."; + } + description + "List of locations for the site."; + } + description + "This grouping defines customer location parameters."; + } + grouping site-group { + container groups { + list group { + key group-id; + leaf group-id { + type string; + description + "Group-id the site belongs to."; + } + description + "List of group-ids."; + } + description + "Groups the site or site-network-access belongs to."; + } + description + "Grouping definition to assign + group-ids to site or site-network-access."; + } + grouping site-diversity { + container site-diversity { + if-feature site-diversity; + uses site-group; + description + "Diversity constraint type. All + site-network-accesses will inherit + the group values defined here."; + } + description + "This grouping defines site + diversity parameters."; + } + grouping access-diversity { + container access-diversity { + if-feature site-diversity; + uses site-group; + container constraints { + list constraint { + key constraint-type; + leaf constraint-type { + type identityref { + base placement-diversity; + } + description + "Diversity constraint type."; + } + container target { + choice target-flavor { + default id; + case id { + list group { + key group-id; + leaf group-id { + type string; + description + "The constraint will be applied against + this particular group-id for this site + network access level."; + } + description + "List of group-ids associated with one specific + constraint for this site network access level."; + } + } + case all-accesses { + leaf all-other-accesses { + type empty; + description + "The constraint will be applied against + all other site network accesses of this site."; + } + } + case all-groups { + leaf all-other-groups { + type empty; + description + "The constraint will be applied against + all other groups managed by the customer."; + } + } + description + "Choice for the target flavor definition."; + } + description + "The constraint will be applied against a + Specific target, and the target can be a list + of group-ids,all other site network accesses of + this site, or all other groups managed by the + customer."; + } + description + "List of constraints."; + } + description + "Placement constraints for this site network access."; + } + description + "Diversity parameters."; + } + description + "This grouping defines access diversity parameters."; + } + grouping operational-requirements { + leaf requested-site-start { + type yang:date-and-time; + description + "Optional leaf indicating requested date and + time when the service at a particular site is + expected to start."; + } + + leaf requested-site-stop { + type yang:date-and-time; + description + "Optional leaf indicating requested date and + time when the service at a particular site is + expected to stop."; + } + description + "This grouping defines some operational + parameters."; + } + grouping operational-requirements-ops { + leaf actual-site-start { + type yang:date-and-time; + config false; + description + "Optional leaf indicating actual date and + time when the service at a particular site + actually started."; + } + leaf actual-site-stop { + type yang:date-and-time; + config false; + description + "Optional leaf indicating actual date and + time when the service at a particular site + actually stopped."; + } + description + "This grouping defines some operational + parameters."; + } + grouping flow-definition { + container match-flow { + leaf dscp { + type inet:dscp; + description + "DSCP value."; + } + leaf dot1p { + type uint8 { + range "0..7"; + } + description + "802.1p matching."; + } + leaf ipv4-src-prefix { + type inet:ipv4-prefix; + description + "Match on IPv4 src address."; + } + leaf ipv6-src-prefix { + type inet:ipv6-prefix; + description + "Match on IPv6 src address."; + } + leaf ipv4-dst-prefix { + type inet:ipv4-prefix; + description + "Match on IPv4 dst address."; + } + leaf ipv6-dst-prefix { + type inet:ipv6-prefix; + description + "Match on IPv6 dst address."; + } + leaf l4-src-port { + type inet:port-number; + must "current() < ../l4-src-port-range/lower-port or "+ + "current() > ../l4-src-port-range/upper-port" { + description + "If l4-src-port and l4-src-port-range/lower-port and + upper-port are set at the same time, l4-src-port + should not overlap with l4-src-port-range."; + } + description + "Match on Layer 4 src port."; + } + leaf-list target-sites { + if-feature target-sites; + type svc-id; + description + "Identify a site as traffic destination."; + } + container l4-src-port-range { + leaf lower-port { + type inet:port-number; + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + description + "Upper boundary for port. If it + exists, the upper boundary must be + higher than the lower boundary."; + } + description + "Upper boundary for port."; + } + description + "Match on Layer 4 src port range. When + only the lower-port is present, it represents + a single port. When both the lower-port and + upper-port are specified, it implies + a range inclusive of both values."; + } + leaf l4-dst-port { + type inet:port-number; + must "current() < ../l4-dst-port-range/lower-port or "+ + "current() > ../l4-dst-port-range/upper-port" { + description + "If l4-dst-port and l4-dst-port-range/lower-port + and upper-port are set at the same time, + l4-dst-port should not overlap with + l4-src-port-range."; + } + description + "Match on Layer 4 dst port."; + } + container l4-dst-port-range { + leaf lower-port { + type inet:port-number; + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + description + "Upper boundary must be + higher than lower boundary."; + } + description + "Upper boundary for port. If it exists, + upper boundary must be higher than lower + boundary."; + } + description + "Match on Layer 4 dst port range. When only + lower-port is present, it represents a single + port. When both lower-port and upper-port are + specified, it implies a range inclusive of both + values."; + } + leaf protocol-field { + type union { + type uint8; + type identityref { + base protocol-type; + } + } + description + "Match on IPv4 protocol or IPv6 Next Header field."; + } + description + "Describes flow-matching criteria."; + } + description + "Flow definition based on criteria."; + } + grouping site-service-basic { + leaf svc-input-bandwidth { + type uint64; + units bps; + mandatory true; + description + "From the customer site's perspective, the service + input bandwidth of the connection or download + bandwidth from the SP to the site."; + } + leaf svc-output-bandwidth { + type uint64; + units bps; + mandatory true; + description + "From the customer site's perspective, the service + output bandwidth of the connection or upload + bandwidth from the site to the SP."; + } + leaf svc-mtu { + type uint16; + units bytes; + mandatory true; + description + "MTU at service level. If the service is IP, + it refers to the IP MTU. If CsC is enabled, + the requested 'svc-mtu' leaf will refer to the + MPLS MTU and not to the IP MTU."; + } + description + "Defines basic service parameters for a site."; + } + grouping site-protection { + container traffic-protection { + if-feature fast-reroute; + leaf enabled { + type boolean; + default false; + description + "Enables traffic protection of access link."; + } + description + "Fast Reroute service parameters for the site."; + } + description + "Defines protection service parameters for a site."; + } + grouping site-service-mpls { + container carrierscarrier { + if-feature carrierscarrier; + leaf signalling-type { + type enumeration { + enum ldp { + description + "Use LDP as the signalling protocol + between the PE and the CE. In this case, + an IGP routing protocol must also be activated."; + } + enum bgp { + description + "Use BGP (as per RFC 8277) as the signalling protocol + between the PE and the CE. + In this case, BGP must also be configured as + the routing protocol."; + } + } + default bgp; + description + "MPLS signalling type."; + } + description + "This container is used when the customer provides + MPLS-based services. This is only used in the case + of CsC (i.e., a customer builds an MPLS service using + an IP VPN to carry its traffic)."; + } + description + "Defines MPLS service parameters for a site."; + } + grouping site-service-qos-profile { + container qos { + if-feature qos; + container qos-classification-policy { + list rule { + key id; + ordered-by user; + leaf id { + type string; + description + "A description identifying the + qos-classification-policy rule."; + } + choice match-type { + default match-flow; + case match-flow { + uses flow-definition; + } + case match-application { + leaf match-application { + type identityref { + base customer-application; + } + description + "Defines the application to match."; + } + } + description + "Choice for classification."; + } + leaf target-class-id { + type string; + description + "Identification of the class of service. + This identifier is internal to the administration."; + } + description + "List of marking rules."; + } + description + "Configuration of the traffic classification policy."; + } + container qos-profile { + choice qos-profile { + description + "Choice for QoS profile. + Can be standard profile or customized profile."; + case standard { + description + "Standard QoS profile."; + leaf profile { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers"+ + "/qos-profile-identifier/id"; + } + description + "QoS profile to be used."; + } + } + case custom { + description + "Customized QoS profile."; + container classes { + if-feature qos-custom; + list class { + key class-id; + leaf class-id { + type string; + description + "Identification of the class of service. + This identifier is internal to the + administration."; + } + leaf direction { + type identityref { + base qos-profile-direction; + } + default both; + description + "The direction to which the QoS profile + is applied."; + } + leaf rate-limit { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units percent; + description + "To be used if the class must be rate-limited. + Expressed as percentage of the service + bandwidth."; + } + container latency { + choice flavor { + case lowest { + leaf use-lowest-latency { + type empty; + description + "The traffic class should use the path with the + lowest latency."; + } + } + case boundary { + leaf latency-boundary { + type uint16; + units msec; + default 400; + description + "The traffic class should use a path with a + defined maximum latency."; + } + } + description + "Latency constraint on the traffic class."; + } + description + "Latency constraint on the traffic class."; + } + container jitter { + choice flavor { + case lowest { + leaf use-lowest-jitter { + type empty; + description + "The traffic class should use the path with the + lowest jitter."; + } + } + case boundary { + leaf latency-boundary { + type uint32; + units usec; + default 40000; + description + "The traffic class should use a path with a + defined maximum jitter."; + } + } + description + "Jitter constraint on the traffic class."; + } + description + "Jitter constraint on the traffic class."; + } + container bandwidth { + leaf guaranteed-bw-percent { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units percent; + mandatory true; + description + "To be used to define the guaranteed bandwidth + as a percentage of the available service bandwidth."; + } + leaf end-to-end { + type empty; + description + "Used if the bandwidth reservation + must be done on the MPLS network too."; + } + description + "Bandwidth constraint on the traffic class."; + } + description + "List of classes of services."; + } + description + "Container for list of classes of services."; + } + } + } + description + "QoS profile configuration."; + } + description + "QoS configuration."; + } + description + "This grouping defines QoS parameters for a site."; + } + grouping site-security-authentication { + container authentication { + description + "Authentication parameters."; + } + description + "This grouping defines authentication parameters for a site."; + } + grouping site-security-encryption { + container encryption { + if-feature encryption; + leaf enabled { + type boolean; + default false; + description + "If true, traffic encryption on the connection is required."; + } + leaf layer { + when "../enabled = 'true'" { + description + "Require a value for layer when enabled is true."; + } + type enumeration { + enum layer2 { + description + "Encryption will occur at Layer 2."; + } + enum layer3 { + description + "Encryption will occur at Layer 3. + For example, IPsec may be used when + a customer requests Layer 3 encryption."; + } + } + description + "Layer on which encryption is applied."; + } + container encryption-profile { + choice profile { + case provider-profile { + leaf profile-name { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers"+ + "/encryption-profile-identifier/id"; + } + description + "Name of the SP profile to be applied."; + } + } + case customer-profile { + leaf algorithm { + type string; + description + "Encryption algorithm to be used."; + } + choice key-type { + default psk; + case psk { + leaf preshared-key { + type string; + description + "Pre-Shared Key (PSK) coming from the customer."; + } + } + description + "Type of keys to be used."; + } + } + description + "Choice of encryption profile. The encryption + profile can be the provider profile or customer profile."; + } + description + "Profile of encryption to be applied."; + } + description + "Encryption parameters."; + } + description + "This grouping defines encryption parameters for a site."; + } + grouping site-attachment-bearer { + container bearer { + container requested-type { + if-feature requested-type; + leaf requested-type { + type string; + description + "Type of requested bearer: Ethernet, DSL, + Wireless, etc. Operator specific."; + } + leaf strict { + type boolean; + default false; + description + "Defines whether requested-type is a preference + or a strict requirement."; + } + description + "Container for requested-type."; + } + leaf always-on { + if-feature always-on; + type boolean; + default true; + description + "Request for an always-on access type. + For example, this could mean no dial access type."; + } + leaf bearer-reference { + if-feature bearer-reference; + type string; + description + "This is an internal reference for the SP."; + } + description + "Bearer-specific parameters. + To be augmented."; + } + description + "Defines physical properties of a site attachment."; + } + grouping site-routing { + container routing-protocols { + list routing-protocol { + key type; + leaf type { + type identityref { + base routing-protocol-type; + } + description + "Type of routing protocol."; + } + container ospf { + when "derived-from-or-self(../type, 'l3vpn-svc:ospf')" { + description + "Only applies when protocol is OSPF."; + } + if-feature rtg-ospf; + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If OSPF is used on this site, this node + contains a configured value. This node + contains at least one address family + to be activated."; + } + leaf area-address { + type yang:dotted-quad; + mandatory true; + description + "Area address."; + } + leaf metric { + type uint16; + default 1; + description + "Metric of the PE-CE link. It is used + in the routing state calculation and + path selection."; + } + container sham-links { + if-feature rtg-ospf-sham-link; + list sham-link { + key target-site; + leaf target-site { + type svc-id; + description + "Target site for the sham link connection. + The site is referred to by its ID."; + } + leaf metric { + type uint16; + default 1; + description + "Metric of the sham link. It is used in + the routing state calculation and path + selection. The default value is set + to 1."; + } + description + "Creates a sham link with another site."; + } + description + "List of sham links."; + } + description + "OSPF-specific configuration."; + } + container bgp { + when "derived-from-or-self(../type, 'l3vpn-svc:bgp')" { + description + "Only applies when protocol is BGP."; + } + if-feature rtg-bgp; + leaf autonomous-system { + type uint32; + mandatory true; + description + "Customer AS number in case the customer + requests BGP routing."; + } + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If BGP is used on this site, this node + contains a configured value. This node + contains at least one address family + to be activated."; + } + description + "BGP-specific configuration."; + } + container static { + when "derived-from-or-self(../type, 'l3vpn-svc:static')" { + description + "Only applies when protocol is static. + BGP activation requires the SP to know + the address of the customer peer. When + BGP is enabled, the 'static-address' + allocation type for the IP connection + MUST be used."; + } + container cascaded-lan-prefixes { + list ipv4-lan-prefixes { + if-feature ipv4; + key "lan next-hop"; + leaf lan { + type inet:ipv4-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in VPN policies."; + } + leaf next-hop { + type inet:ipv4-address; + description + "Next-hop address to use on the customer side."; + } + description + "List of LAN prefixes for the site."; + } + list ipv6-lan-prefixes { + if-feature ipv6; + key "lan next-hop"; + leaf lan { + type inet:ipv6-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in VPN policies."; + } + leaf next-hop { + type inet:ipv6-address; + description + "Next-hop address to use on the customer side."; + } + description + "List of LAN prefixes for the site."; + } + description + "LAN prefixes from the customer."; + } + description + "Configuration specific to static routing."; + } + container rip { + when "derived-from-or-self(../type, 'l3vpn-svc:rip')" { + description + "Only applies when the protocol is RIP. For IPv4, + the model assumes that RIP version 2 is used."; + } + if-feature rtg-rip; + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If RIP is used on this site, this node + contains a configured value. This node + contains at least one address family + to be activated."; + } + description + "Configuration specific to RIP routing."; + } + container vrrp { + when "derived-from-or-self(../type, 'l3vpn-svc:vrrp')" { + description + "Only applies when protocol is VRRP."; + } + if-feature rtg-vrrp; + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If VRRP is used on this site, this node + contains a configured value. This node contains + at least one address family to be activated."; + } + description + "Configuration specific to VRRP routing."; + } + description + "List of routing protocols used on + the site. This list can be augmented."; + } + description + "Defines routing protocols."; + } + description + "Grouping for routing protocols."; + } + grouping site-attachment-ip-connection { + container ip-connection { + container ipv4 { + if-feature ipv4; + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + must "not(derived-from-or-self(current(), 'l3vpn-svc:slaac') or "+ + "derived-from-or-self(current(), "+ + "'l3vpn-svc:provider-dhcp-slaac'))" { + error-message "SLAAC is only applicable to IPv6"; + } + description + "Defines how addresses are allocated. + If there is no value for the address + allocation type, then IPv4 is not enabled."; + } + container provider-dhcp { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp')" { + description + "Only applies when addresses are allocated by DHCP."; + } + leaf provider-address { + type inet:ipv4-address; + description + "Address of provider side. If provider-address is not + specified, then prefix length should not be specified + either. It also implies provider-dhcp allocation is + not enabled. If provider-address is specified, then + the prefix length may or may not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + must "(../provider-address)" { + error-message + "If the prefix length is specified, provider-address + must also be specified."; + description + "If the prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. + If not specified, or specified as zero, + this means the customer leaves the actual + prefix length value to the provider."; + } + choice address-assign { + default number; + case number { + leaf number-of-dynamic-address { + type uint16; + default 1; + description + "Describes the number of IP addresses + the customer requires."; + } + } + case explicit { + container customer-addresses { + list address-group { + key "group-id"; + leaf group-id { + type string; + description + "Group-id for the address range from + start-address to end-address."; + } + leaf start-address { + type inet:ipv4-address; + description + "First address."; + } + leaf end-address { + type inet:ipv4-address; + description + "Last address."; + } + description + "Describes IP addresses allocated by DHCP. + When only start-address or only end-address + is present, it represents a single address. + When both start-address and end-address are + specified, it implies a range inclusive of both + addresses. If no address is specified, it implies + customer addresses group is not supported."; + } + description + "Container for customer addresses is allocated by DHCP."; + } + } + description + "Choice for the way to assign addresses."; + } + description + "DHCP allocated addresses related parameters."; + } + container dhcp-relay { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-relay')" { + description + "Only applies when provider is required to implement + DHCP relay function."; + } + leaf provider-address { + type inet:ipv4-address; + description + "Address of provider side. If provider-address is not + specified, then prefix length should not be specified + either. It also implies provider-dhcp allocation is + not enabled. If provider-address is specified, then + prefix length may or may not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; +} + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + container customer-dhcp-servers { + leaf-list server-ip-address { + type inet:ipv4-address; + description + "IP address of customer DHCP server."; + } + description + "Container for list of customer DHCP servers."; + } + description + "DHCP relay provided by operator."; +} + container addresses { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:static-address')" { + description + "Only applies when protocol allocation type is static."; + } + leaf provider-address { + type inet:ipv4-address; + description + "IPv4 Address List of the provider side. + When the protocol allocation type is static, + the provider address must be configured."; + } + leaf customer-address { + type inet:ipv4-address; + description + "IPv4 Address of customer side."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "Subnet prefix length expressed in bits. + It is applied to both provider-address + and customer-address."; + } + description + "Describes IPv4 addresses used."; + } + description + "IPv4-specific parameters."; + } + container ipv6 { + if-feature ipv6; + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + description + "Defines how addresses are allocated. + If there is no value for the address + allocation type, then IPv6 is + not enabled."; + } + + container provider-dhcp { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp') "+ + "or derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-slaac')" { + description + "Only applies when addresses are allocated by DHCP."; + } + leaf provider-address { + type inet:ipv6-address; + description + "Address of the provider side. If provider-address + is not specified, then prefix length should not be + specified either. It also implies provider-dhcp + allocation is not enabled. If provider-address is + specified, then prefix length may or may + not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + choice address-assign { + default number; + case number { + leaf number-of-dynamic-address { + type uint16; + default 1; + description + "Describes the number of IP addresses the customer + requires."; + } + } + case explicit { + container customer-addresses { + list address-group { + key "group-id"; + leaf group-id { + type string; + description + "Group-id for the address range from + start-address to end-address."; + } + leaf start-address { + type inet:ipv6-address; + description + "First address."; + } + leaf end-address { + type inet:ipv6-address; + description + "Last address."; + } + description + "Describes IP addresses allocated by DHCP. When only + start-address or only end-address is present, it + represents a single address. When both start-address + and end-address are specified, it implies a range + inclusive of both addresses. If no address is + specified, it implies customer addresses group is + not supported."; + } + description + "Container for customer addresses allocated by DHCP."; + } + } + description + "Choice for the way to assign addresses."; + } + description + "DHCP allocated addresses related parameters."; + } + container dhcp-relay { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-relay')" { + description + "Only applies when the provider is required + to implement DHCP relay function."; + } + leaf provider-address { + type inet:ipv6-address; + description + "Address of the provider side. If provider-address is + not specified, then prefix length should not be + specified either. It also implies provider-dhcp + allocation is not enabled. If provider address + is specified, then prefix length may or may + not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + container customer-dhcp-servers { + leaf-list server-ip-address { + type inet:ipv6-address; + description + "This node contains the IP address of + the customer DHCP server. If the DHCP relay + function is implemented by the + provider, this node contains the + configured value."; + } + description + "Container for list of customer DHCP servers."; + } + description + "DHCP relay provided by operator."; + } + container addresses { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:static-address')" { + description + "Only applies when protocol allocation type is static."; + } + leaf provider-address { + type inet:ipv6-address; + description + "IPv6 Address of the provider side. When the protocol + allocation type is static, the provider address + must be configured."; + } + leaf customer-address { + type inet:ipv6-address; + description + "The IPv6 Address of the customer side."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + description + "Subnet prefix length expressed in bits. + It is applied to both provider-address and + customer-address."; + } + description + "Describes IPv6 addresses used."; + } + description + "IPv6-specific parameters."; + } + container oam { + container bfd { + if-feature bfd; + leaf enabled { + type boolean; + default false; + description + "If true, BFD activation is required."; + } + choice holdtime { + default fixed; + case fixed { + leaf fixed-value { + type uint32; + units msec; + description + "Expected BFD holdtime expressed in msec. The customer + may impose some fixed values for the holdtime period + if the provider allows the customer use this function. + If the provider doesn't allow the customer to use this + function, the fixed-value will not be set."; + } + } + case profile { + leaf profile-name { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers/"+ + "bfd-profile-identifier/id"; + } + description + "Well-known SP profile name. The provider can propose + some profiles to the customer, depending on the service + level the customer wants to achieve. Profile names + must be communicated to the customer."; + } + description + "Well-known SP profile."; + } + description + "Choice for holdtime flavor."; + } + description + "Container for BFD."; + } + description + "Defines the Operations, Administration, and Maintenance (OAM) + mechanisms used on the connection. BFD is set as a fault + detection mechanism, but the 'oam' container can easily + be augmented by other mechanisms"; + } + description + "Defines connection parameters."; + } + description + "This grouping defines IP connection parameters."; + } + grouping site-service-multicast { + container multicast { + if-feature multicast; + leaf multicast-site-type { + type enumeration { + enum receiver-only { + description + "The site only has receivers."; + } + enum source-only { + description + "The site only has sources."; + } + enum source-receiver { + description + "The site has both sources and receivers."; + } + } + default source-receiver; + description + "Type of multicast site."; + } + container multicast-address-family { + leaf ipv4 { + if-feature ipv4; + type boolean; + default false; + description + "Enables IPv4 multicast."; + } + leaf ipv6 { + if-feature ipv6; + type boolean; + default false; + description + "Enables IPv6 multicast."; + } + description + "Defines protocol to carry multicast."; + } + leaf protocol-type { + type enumeration { + enum host { + description + "Hosts are directly connected to the provider network. + Host protocols such as IGMP or MLD are required."; + } + enum router { + description + "Hosts are behind a customer router. + PIM will be implemented."; + } + enum both { + description + "Some hosts are behind a customer router, and + some others are directly connected to the + provider network. Both host and routing protocols + must be used. Typically, IGMP and PIM will be + implemented."; + } + } + default "both"; + description + "Multicast protocol type to be used with the customer site."; + } + description + "Multicast parameters for the site."; + } + description + "Multicast parameters for the site."; + } + grouping site-management { + container management { + leaf type { + type identityref { + base management; + } + mandatory true; + description + "Management type of the connection."; + } + description + "Management configuration."; + } + description + "Management parameters for the site."; + } + grouping site-devices { + container devices { + when "derived-from-or-self(../management/type, "+ + "'l3vpn-svc:provider-managed') or "+ + "derived-from-or-self(../management/type, 'l3vpn-svc:co-managed')" { + description + "Applicable only for provider-managed or + co-managed device."; + } + list device { + key device-id; + leaf device-id { + type svc-id; + description + "Identifier for the device."; + } + leaf location { + type leafref { + path "../../../locations/"+ + "location/location-id"; + } + mandatory true; + description + "Location of the device."; + } + container management { + when "derived-from-or-self(../../../management/type,"+ + "'l3vpn-svc:co-managed')" { + description + "Applicable only for co-managed device."; + } + leaf address-family { + type address-family; + description + "Address family used for management."; + } + leaf address { + when "(../address-family)" { + description + "If address-family is specified, then address should + also be specified. If address-family is not specified, + then address should also not be specified."; + } + type inet:ip-address; + mandatory true; + description + "Management address."; + } + description + "Management configuration. Applicable only for + co-managed device."; + } + description + "List of devices requested by customer."; + } + description + "Device configuration."; + } + description + "Grouping for device allocation."; + } + grouping site-vpn-flavor { + leaf site-vpn-flavor { + type identityref { + base site-vpn-flavor; + } + default site-vpn-flavor-single; + description + "Defines the way the VPN multiplexing is done, e.g., whether + the site belongs to a single VPN site or a multiVPN; or, in the case + of a multiVPN, whether the logical accesses of the sites belong + to the same set of VPNs or each logical access maps to + different VPNs."; + } + description + "Grouping for site VPN flavor."; + } + grouping site-vpn-policy { + container vpn-policies { + list vpn-policy { + key vpn-policy-id; + leaf vpn-policy-id { + type svc-id; + description + "Unique identifier for the VPN policy."; + } + list entries { + key id; + leaf id { + type svc-id; + description + "Unique identifier for the policy entry."; + } + container filters { + list filter { + key type; + ordered-by user; + leaf type { + type identityref { + base vpn-policy-filter-type; + } + description + "Type of VPN Policy filter."; + } + leaf-list lan-tag { + when "derived-from-or-self(../type, 'l3vpn-svc:lan')" { + description + "Only applies when the VPN Policy filter is a + LAN Tag filter."; + } + if-feature lan-tag; + type string; + description + "List of 'lan-tag' items to be matched. LAN Tag + is an Internal tag to be used in VPN policies "; + } + leaf-list ipv4-lan-prefix { + when "derived-from-or-self(../type, 'l3vpn-svc:ipv4')" { + description + "Only applies when VPN Policy filter is IPv4 Prefix filter."; + } + if-feature ipv4; + type inet:ipv4-prefix; + description + "List of IPv4 prefixes as LAN Prefixes to be matched."; + } + leaf-list ipv6-lan-prefix { + when "derived-from-or-self(../type, 'l3vpn-svc:ipv6')" { + description + "Only applies when VPN Policy filter is IPv6 Prefix filter."; + } + if-feature ipv6; + type inet:ipv6-prefix; + description + "List of IPv6 prefixes as LAN prefixes to be matched."; + } + description + "List of filters used on the site. This list can + be augmented."; + } + description + "If a more-granular VPN attachment is necessary, filtering can + be used. If used, it permits the splitting of site LANs among + multiple VPNs. The Site LAN can be split based on either LAN + Tag or LAN prefix. If no filter is used, all the LANs will be + part of the same VPNs with the same role."; + } + list vpn { + key vpn-id; + leaf vpn-id { + type leafref { + path "/l3vpn-svc/vpn-services/"+ + "vpn-service/vpn-id"; + } + mandatory true; + description + "Reference to an IP VPN."; + } + leaf site-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "Role of the site in the IP VPN."; + } + description + "List of VPNs the LAN is associated with."; + } + description + "List of entries for export policy."; + } + description + "List of VPN policies."; + } + description + "VPN policy."; + } + description + "VPN policy parameters for the site."; + } + grouping site-maximum-routes { + container maximum-routes { + list address-family { + key af; + leaf af { + type address-family; + description + "Address family."; + } + leaf maximum-routes { + type uint32; + description + "Maximum prefixes the VRF can accept + for this address family."; + } + description + "List of address families."; + } + description + "Defines 'maximum-routes' for the VRF."; + } + description + "Defines 'maximum-routes' for the site."; + } + grouping site-security { + container security { + uses site-security-authentication; + uses site-security-encryption; + description + "Site-specific security parameters."; + } + description + "Grouping for security parameters."; + } + grouping site-service { + container service { + uses site-service-qos-profile; + uses site-service-mpls; + uses site-service-multicast; + description + "Service parameters on the attachment."; + } + description + "Grouping for service parameters."; + } + grouping site-network-access-service { + container service { + uses site-service-basic; + uses site-service-qos-profile; + uses site-service-mpls; + uses site-service-multicast; + description + "Service parameters on the attachment."; + } + description + "Grouping for service parameters."; + } + grouping vpn-extranet { + container extranet-vpns { + if-feature extranet-vpn; + list extranet-vpn { + key vpn-id; + leaf vpn-id { + type svc-id; + description + "Identifies the target VPN the local VPN want to access."; + } + leaf local-sites-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "This describes the role of the + local sites in the target VPN topology. In the any-to-any VPN + service topology, the local sites must have the same role, which + will be 'any-to-any-role'. In the Hub-and-Spoke VPN service + topology or the Hub-and-Spoke disjoint VPN service topology, + the local sites must have a Hub role or a Spoke role."; + } + description + "List of extranet VPNs or target VPNs the local VPN is + attached to."; + } + description + "Container for extranet VPN configuration."; + } + description + "Grouping for extranet VPN configuration. + This provides an easy way to interconnect + all sites from two VPNs."; + } + grouping site-attachment-availability { + container availability { + leaf access-priority { + type uint32; + default 100; + description + "Defines the priority for the access. + The higher the access-priority value, + the higher the preference of the + access will be."; + } + description + "Availability parameters (used for multihoming)."; + } + description + "Defines availability parameters for a site."; + } + grouping access-vpn-policy { + container vpn-attachment { + choice attachment-flavor { + case vpn-policy-id { + leaf vpn-policy-id { + type leafref { + path "../../../../"+ + "vpn-policies/vpn-policy/"+ + "vpn-policy-id"; + } + description + "Reference to a VPN policy. When referencing VPN + policy for attachment, the vpn-policy-id must be + configured."; + } + } + case vpn-id { + leaf vpn-id { + type leafref { + path "/l3vpn-svc/vpn-services"+ + "/vpn-service/vpn-id"; + } + description + "Reference to an IP VPN. Referencing a vpn-id provides + an easy way to attach a particular logical access to + a VPN. In this case, vpn-id must be configured."; + } + leaf site-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "Role of the site in the IP VPN. When referencing a vpn-id, + the site-role setting must be added to express the role of + the site in the target VPN service topology."; + } + } + mandatory true; + description + "Choice for VPN attachment flavor. A choice is implemented + to allow the user to choose the flavor that provides the + best fit."; + } + description + "Defines VPN attachment of a site."; + } + description + "Defines the VPN attachment rules for + a site's logical access."; + } + grouping vpn-profile-cfg { + container valid-provider-identifiers { + list cloud-identifier { + if-feature cloud-access; + key id; + leaf id { + type string; + description + "Identification of cloud service. + Local administration meaning."; + } + description + "List for Cloud Identifiers."; + } + list encryption-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the SP encryption profile + to be used. Local administration meaning."; + } + description + "List for encryption profile identifiers."; + } + list qos-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the QoS Profile to be used. + Local administration meaning."; + } + description + "List for QoS Profile Identifiers."; + } + list bfd-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the SP BFD Profile to be used. + Local administration meaning."; + } + description + "List for BFD Profile identifiers."; + } + nacm:default-deny-write; + description + "Container for Valid Provider Identifies."; + } + description + "Grouping for VPN Profile configuration."; + } + grouping vpn-svc-cfg { + leaf vpn-id { + type svc-id; + description + "VPN identifier. Local administration meaning."; + } + leaf customer-name { + type string; + description + "Name of the customer that actually uses the VPN service. + In the case that any intermediary (e.g., Tier-2 provider + or partner) sells the VPN service to their end user + on behalf of the original service provider (e.g., Tier-1 + provider), the original service provider may require the + customer name to provide smooth activation/commissioning + and operation for the service."; + } + leaf vpn-service-topology { + type identityref { + base vpn-topology; + } + default any-to-any; + description + "VPN service topology."; + } + uses vpn-service-cloud-access; + uses vpn-service-multicast; + uses vpn-service-mpls; + uses vpn-extranet; + description + "Grouping for VPN service configuration."; + } + grouping site-top-level-cfg { + uses operational-requirements; + uses customer-location-info; + uses site-devices; + uses site-diversity; + uses site-management; + uses site-vpn-policy; + uses site-vpn-flavor; + uses site-maximum-routes; + uses site-security; + uses site-service; + uses site-protection; + uses site-routing; + description + "Grouping for site top-level configuration."; + } + grouping site-network-access-top-level-cfg { + leaf site-network-access-type { + type identityref { + base site-network-access-type; + } + default point-to-point; + description + "Describes the type of connection, e.g., + point-to-point or multipoint."; + } + choice location-flavor { + case location { + when "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:customer-managed')" { + description + "Applicable only for customer-managed device."; + } + leaf location-reference { + type leafref { + path "../../../locations/location/location-id"; + } + description + "Location of the site-network-access."; + } + } + case device { + when "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:provider-managed') or "+ + "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:co-managed')" { + description + "Applicable only for provider-managed or co-managed device."; + } + leaf device-reference { + type leafref { + path "../../../devices/device/device-id"; + } + description + "Identifier of CE to use."; + } + } + mandatory true; + description + "Choice of how to describe the site's location."; + } + uses access-diversity; + uses site-attachment-bearer; + uses site-attachment-ip-connection; + uses site-security; + uses site-network-access-service; + uses site-routing; + uses site-attachment-availability; + uses access-vpn-policy; + description + "Grouping for site network access top-level configuration."; + } + /* Main blocks */ + container l3vpn-svc { + container vpn-profiles { + uses vpn-profile-cfg; + description + "Container for VPN Profiles."; + } + container vpn-services { + list vpn-service { + key vpn-id; + uses vpn-svc-cfg; + description + "List of VPN services."; + } + description + "Top-level container for the VPN services."; + } + container sites { + list site { + key site-id; + leaf site-id { + type svc-id; + description + "Identifier of the site."; + } + uses site-top-level-cfg; + uses operational-requirements-ops; + container site-network-accesses { + list site-network-access { + key site-network-access-id; + leaf site-network-access-id { + type svc-id; + description + "Identifier for the access."; + } + uses site-network-access-top-level-cfg; + description + "List of accesses for a site."; + } + description + "List of accesses for a site."; + } + description + "List of sites."; + } + description + "Container for sites."; + } + description + "Main container for L3VPN service configuration."; + } +} diff --git a/models/ietf/RFC/ietf-layer0-types.yang b/models/ietf/RFC/ietf-layer0-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..f5e53949f848945e37f9693c20fab3b78c572986 --- /dev/null +++ b/models/ietf/RFC/ietf-layer0-types.yang @@ -0,0 +1,581 @@ +module ietf-layer0-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-layer0-types"; + prefix l0-types; + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/ccamp/> + WG List: <mailto:ccamp@ietf.org> + + Editor: Haomian Zheng + <mailto:zhenghaomian@huawei.com> + + Editor: Young Lee + <mailto:younglee.tx@gmail.com> + + Editor: Aihua Guo + <mailto:aihuaguo.ietf@gmail.com> + + Editor: Victor Lopez + <mailto:victor.lopez@nokia.com> + + Editor: Daniel King + <mailto:d.king@lancaster.ac.uk>"; + + description + "This module defines Optical Layer 0 types. This module + provides groupings that can be applicable to Layer 0 + Fixed Optical Networks (e.g., CWDM (Coarse Wavelength + Division Multiplexing) and DWDM (Dense Wavelength Division + Multiplexing)) and flexi-grid optical networks. + + Copyright (c) 2021 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 Simplified + 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 9093; see + the RFC itself for full legal notices."; + + revision 2021-08-13 { + description + "Initial version"; + reference + "RFC 9093: A YANG Data Model for Layer 0 Types"; + } + + typedef dwdm-n { + type int16; + description + "The given value 'N' is used to determine the nominal central + frequency. + + The nominal central frequency, 'f', is defined by: + f = 193100.000 GHz + N x channel spacing (measured in GHz), + + where 193100.000 GHz (193.100000 THz) is the ITU-T 'anchor + frequency' for transmission over the DWDM grid, and where + 'channel spacing' is defined by the dwdm-ch-spc-type."; + reference + "RFC6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + typedef cwdm-n { + type int16; + description + "The given value 'N' is used to determine the nominal central + wavelength. + + The nominal central wavelength is defined by: + Wavelength = 1471 nm + N x channel spacing (measured in nm) + + where 1471 nm is the conventional 'anchor wavelength' for + transmission over the CWDM grid, and where 'channel spacing' + is defined by the cwdm-ch-spc-type."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + typedef flexi-n { + type int16; + description + "The given value 'N' is used to determine the nominal central + frequency. + + The nominal central frequency, 'f', is defined by: + f = 193100.000 GHz + N x channel spacing (measured in GHz), + + where 193100.000 GHz (193.100000 THz) is the ITU-T 'anchor + frequency' for transmission over the DWDM grid, and where + 'channel spacing' is defined by the flexi-ch-spc-type. + + Note that the term 'channel spacing' can be substituted by the + term 'nominal central frequency granularity' defined in + clause 8 of ITU-T G.694.1."; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + typedef flexi-m { + type uint16; + description + "The given value 'M' is used to determine the slot width. + + A slot width is defined by: + slot width = M x SWG (measured in GHz), + + where SWG is defined by the flexi-slot-width-granularity."; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks. + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity l0-grid-type { + description + "Layer 0 grid type"; + reference + "RFC 6163: Framework for GMPLS and Path Computation Element + (PCE) Control of Wavelength Switched Optical Networks (WSONs), + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + identity flexi-grid-dwdm { + base l0-grid-type; + description + "Flexi-grid"; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity wson-grid-dwdm { + base l0-grid-type; + description + "DWDM grid"; + reference + "RFC 6163:Framework for GMPLS and Path Computation Element + (PCE) Control of Wavelength Switched Optical Networks (WSONs), + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity wson-grid-cwdm { + base l0-grid-type; + description + "CWDM grid"; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + identity dwdm-ch-spc-type { + description + "DWDM channel-spacing type"; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity dwdm-100ghz { + base dwdm-ch-spc-type; + description + "100 GHz channel spacing"; + } + + identity dwdm-50ghz { + base dwdm-ch-spc-type; + description + "50 GHz channel spacing"; + } + + identity dwdm-25ghz { + base dwdm-ch-spc-type; + description + "25 GHz channel spacing"; + } + + identity dwdm-12p5ghz { + base dwdm-ch-spc-type; + description + "12.5 GHz channel spacing"; + } + + identity flexi-ch-spc-type { + description + "Flexi-grid channel-spacing type"; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity flexi-ch-spc-6p25ghz { + base flexi-ch-spc-type; + description + "6.25 GHz channel spacing"; + } + + identity flexi-slot-width-granularity { + description + "Flexi-grid slot width granularity"; + } + + identity flexi-swg-12p5ghz { + base flexi-slot-width-granularity; + description + "12.5 GHz slot width granularity"; + } + + identity cwdm-ch-spc-type { + description + "CWDM channel-spacing type"; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + identity cwdm-20nm { + base cwdm-ch-spc-type; + description + "20nm channel spacing"; + } + + /* Groupings. */ + + grouping wson-label-start-end { + description + "The WSON label-start or label-end used to specify WSON label + range."; + choice grid-type { + description + "Label for DWDM or CWDM grid"; + case dwdm { + leaf dwdm-n { + when "derived-from-or-self(../../../grid-type, + \"wson-grid-dwdm\")" { + description + "Valid only when grid type is DWDM."; + } + type l0-types:dwdm-n; + description + "The central frequency of DWDM."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + case cwdm { + leaf cwdm-n { + when "derived-from-or-self(../../../grid-type, + \"wson-grid-cwdm\")" { + description + "Valid only when grid type is CWDM."; + } + type l0-types:cwdm-n; + description + "Channel wavelength computing input."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + } + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers"; + } + + grouping wson-label-hop { + description + "Generic label-hop information for WSON"; + choice grid-type { + description + "Label for DWDM or CWDM grid"; + case dwdm { + choice single-or-super-channel { + description + "single or super channel"; + case single { + leaf dwdm-n { + type l0-types:dwdm-n; + description + "The given value 'N' is used to determine the + nominal central frequency."; + } + } + case super { + leaf-list subcarrier-dwdm-n { + type l0-types:dwdm-n; + description + "The given values 'N' are used to determine the + nominal central frequency for each subcarrier + channel."; + reference + "ITU-T Recommendation G.694.1: Spectral grids for + WDM applications: DWDM frequency grid"; + } + } + } + } + case cwdm { + leaf cwdm-n { + type l0-types:cwdm-n; + description + "The given value 'N' is used to determine the nominal + central wavelength."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + } + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers"; + } + + grouping l0-label-range-info { + description + "Information about Layer 0 label range."; + leaf grid-type { + type identityref { + base l0-grid-type; + } + description + "Grid type"; + } + leaf priority { + type uint8; + description + "Priority in Interface Switching Capability Descriptor + (ISCD)."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + } + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers"; + } + + grouping wson-label-step { + description + "Label step information for WSON"; + choice l0-grid-type { + description + "Grid type: DWDM, CWDM, etc."; + case dwdm { + leaf wson-dwdm-channel-spacing { + when "derived-from-or-self(../../grid-type, + \"wson-grid-dwdm\")" { + description + "Valid only when grid type is DWDM."; + } + type identityref { + base dwdm-ch-spc-type; + } + description + "Label-step is the channel spacing (GHz), e.g., 100.000, + 50.000, 25.000, or 12.500 GHz for DWDM."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + case cwdm { + leaf wson-cwdm-channel-spacing { + when "derived-from-or-self(../../grid-type, + \"wson-grid-cwdm\")" { + description + "Valid only when grid type is CWDM."; + } + type identityref { + base cwdm-ch-spc-type; + } + description + "Label-step is the channel spacing (nm), i.e., 20 nm + for CWDM, which is the only value defined for CWDM."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + } + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + grouping flexi-grid-label-start-end { + description + "The flexi-grid label-start or label-end used to specify + flexi-grid label range."; + leaf flexi-n { + type l0-types:flexi-n; + description + "The given value 'N' is used to determine the nominal + central frequency."; + } + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + + grouping flexi-grid-frequency-slot { + description + "Flexi-grid frequency slot grouping."; + uses flexi-grid-label-start-end; + leaf flexi-m { + type l0-types:flexi-m; + description + "The given value 'M' is used to determine the slot width."; + } + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + + grouping flexi-grid-label-hop { + description + "Generic label-hop information for flexi-grid"; + choice single-or-super-channel { + description + "single or super channel"; + case single { + uses flexi-grid-frequency-slot; + } + case super { + list subcarrier-flexi-n { + key "flexi-n"; + uses flexi-grid-frequency-slot; + description + "List of subcarrier channels for flexi-grid super + channel."; + } + } + } + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + + grouping flexi-grid-label-range-info { + description + "Flexi-grid-specific label range related information"; + uses l0-label-range-info; + container flexi-grid { + description + "flexi-grid definition"; + leaf slot-width-granularity { + type identityref { + base flexi-slot-width-granularity; + } + default "flexi-swg-12p5ghz"; + description + "Minimum space between slot widths. Default is 12.500 + GHz."; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based + Control of Flexi-Grid Dense Wavelength Division + Multiplexing (DWDM) Networks"; + } + leaf min-slot-width-factor { + type uint16 { + range "1..max"; + } + default "1"; + description + "A multiplier of the slot width granularity, indicating + the minimum slot width supported by an optical port. + + Minimum slot width is calculated by: + Minimum slot width (GHz) = + min-slot-width-factor * slot-width-granularity."; + reference + "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi- + Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + + leaf max-slot-width-factor { + type uint16 { + range "1..max"; + } + must '. >= ../min-slot-width-factor' { + error-message + "Maximum slot width must be greater than or equal to + minimum slot width."; + } + description + "A multiplier of the slot width granularity, indicating + the maximum slot width supported by an optical port. + + Maximum slot width is calculated by: + Maximum slot width (GHz) = + max-slot-width-factor * slot-width-granularity + + If specified, maximum slot width must be greater than or + equal to minimum slot width. If not specified, maximum + slot width is equal to minimum slot width."; + reference + "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi- + Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + } + } + + grouping flexi-grid-label-step { + description + "Label step information for flexi-grid"; + leaf flexi-grid-channel-spacing { + type identityref { + base flexi-ch-spc-type; + } + default "flexi-ch-spc-6p25ghz"; + description + "Label-step is the nominal central frequency granularity + (GHz), e.g., 6.25 GHz."; + reference + "RFC 7699: Generalized Labels for the Flexi-Grid in Lambda + Switch Capable (LSC) Label Switching Routers"; + } + leaf flexi-n-step { + type uint8; + description + "This attribute defines the multiplier for the supported + values of 'N'. + + For example, given a grid with a nominal central frequency + granularity of 6.25 GHz, the granularity of the supported + values of the nominal central frequency could be 12.5 GHz. + In this case, the values of flexi-n should be even and this + constraint is reported by setting the flexi-n-step to 2. + + This attribute is also known as central frequency + granularity in RFC 8363."; + reference + "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi-Grid + Dense Wavelength Division Multiplexing (DWDM) Networks"; + } + } +} diff --git a/models/ietf/RFC/ietf-layer0-types@2021-08-13.yang b/models/ietf/RFC/ietf-layer0-types@2021-08-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..f5e53949f848945e37f9693c20fab3b78c572986 --- /dev/null +++ b/models/ietf/RFC/ietf-layer0-types@2021-08-13.yang @@ -0,0 +1,581 @@ +module ietf-layer0-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-layer0-types"; + prefix l0-types; + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/ccamp/> + WG List: <mailto:ccamp@ietf.org> + + Editor: Haomian Zheng + <mailto:zhenghaomian@huawei.com> + + Editor: Young Lee + <mailto:younglee.tx@gmail.com> + + Editor: Aihua Guo + <mailto:aihuaguo.ietf@gmail.com> + + Editor: Victor Lopez + <mailto:victor.lopez@nokia.com> + + Editor: Daniel King + <mailto:d.king@lancaster.ac.uk>"; + + description + "This module defines Optical Layer 0 types. This module + provides groupings that can be applicable to Layer 0 + Fixed Optical Networks (e.g., CWDM (Coarse Wavelength + Division Multiplexing) and DWDM (Dense Wavelength Division + Multiplexing)) and flexi-grid optical networks. + + Copyright (c) 2021 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 Simplified + 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 9093; see + the RFC itself for full legal notices."; + + revision 2021-08-13 { + description + "Initial version"; + reference + "RFC 9093: A YANG Data Model for Layer 0 Types"; + } + + typedef dwdm-n { + type int16; + description + "The given value 'N' is used to determine the nominal central + frequency. + + The nominal central frequency, 'f', is defined by: + f = 193100.000 GHz + N x channel spacing (measured in GHz), + + where 193100.000 GHz (193.100000 THz) is the ITU-T 'anchor + frequency' for transmission over the DWDM grid, and where + 'channel spacing' is defined by the dwdm-ch-spc-type."; + reference + "RFC6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + typedef cwdm-n { + type int16; + description + "The given value 'N' is used to determine the nominal central + wavelength. + + The nominal central wavelength is defined by: + Wavelength = 1471 nm + N x channel spacing (measured in nm) + + where 1471 nm is the conventional 'anchor wavelength' for + transmission over the CWDM grid, and where 'channel spacing' + is defined by the cwdm-ch-spc-type."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + typedef flexi-n { + type int16; + description + "The given value 'N' is used to determine the nominal central + frequency. + + The nominal central frequency, 'f', is defined by: + f = 193100.000 GHz + N x channel spacing (measured in GHz), + + where 193100.000 GHz (193.100000 THz) is the ITU-T 'anchor + frequency' for transmission over the DWDM grid, and where + 'channel spacing' is defined by the flexi-ch-spc-type. + + Note that the term 'channel spacing' can be substituted by the + term 'nominal central frequency granularity' defined in + clause 8 of ITU-T G.694.1."; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + typedef flexi-m { + type uint16; + description + "The given value 'M' is used to determine the slot width. + + A slot width is defined by: + slot width = M x SWG (measured in GHz), + + where SWG is defined by the flexi-slot-width-granularity."; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks. + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity l0-grid-type { + description + "Layer 0 grid type"; + reference + "RFC 6163: Framework for GMPLS and Path Computation Element + (PCE) Control of Wavelength Switched Optical Networks (WSONs), + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + identity flexi-grid-dwdm { + base l0-grid-type; + description + "Flexi-grid"; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity wson-grid-dwdm { + base l0-grid-type; + description + "DWDM grid"; + reference + "RFC 6163:Framework for GMPLS and Path Computation Element + (PCE) Control of Wavelength Switched Optical Networks (WSONs), + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity wson-grid-cwdm { + base l0-grid-type; + description + "CWDM grid"; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + identity dwdm-ch-spc-type { + description + "DWDM channel-spacing type"; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity dwdm-100ghz { + base dwdm-ch-spc-type; + description + "100 GHz channel spacing"; + } + + identity dwdm-50ghz { + base dwdm-ch-spc-type; + description + "50 GHz channel spacing"; + } + + identity dwdm-25ghz { + base dwdm-ch-spc-type; + description + "25 GHz channel spacing"; + } + + identity dwdm-12p5ghz { + base dwdm-ch-spc-type; + description + "12.5 GHz channel spacing"; + } + + identity flexi-ch-spc-type { + description + "Flexi-grid channel-spacing type"; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks, + ITU-T G.694.1 (10/2020): Spectral grids for WDM applications: + DWDM frequency grid"; + } + + identity flexi-ch-spc-6p25ghz { + base flexi-ch-spc-type; + description + "6.25 GHz channel spacing"; + } + + identity flexi-slot-width-granularity { + description + "Flexi-grid slot width granularity"; + } + + identity flexi-swg-12p5ghz { + base flexi-slot-width-granularity; + description + "12.5 GHz slot width granularity"; + } + + identity cwdm-ch-spc-type { + description + "CWDM channel-spacing type"; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + identity cwdm-20nm { + base cwdm-ch-spc-type; + description + "20nm channel spacing"; + } + + /* Groupings. */ + + grouping wson-label-start-end { + description + "The WSON label-start or label-end used to specify WSON label + range."; + choice grid-type { + description + "Label for DWDM or CWDM grid"; + case dwdm { + leaf dwdm-n { + when "derived-from-or-self(../../../grid-type, + \"wson-grid-dwdm\")" { + description + "Valid only when grid type is DWDM."; + } + type l0-types:dwdm-n; + description + "The central frequency of DWDM."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + case cwdm { + leaf cwdm-n { + when "derived-from-or-self(../../../grid-type, + \"wson-grid-cwdm\")" { + description + "Valid only when grid type is CWDM."; + } + type l0-types:cwdm-n; + description + "Channel wavelength computing input."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + } + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers"; + } + + grouping wson-label-hop { + description + "Generic label-hop information for WSON"; + choice grid-type { + description + "Label for DWDM or CWDM grid"; + case dwdm { + choice single-or-super-channel { + description + "single or super channel"; + case single { + leaf dwdm-n { + type l0-types:dwdm-n; + description + "The given value 'N' is used to determine the + nominal central frequency."; + } + } + case super { + leaf-list subcarrier-dwdm-n { + type l0-types:dwdm-n; + description + "The given values 'N' are used to determine the + nominal central frequency for each subcarrier + channel."; + reference + "ITU-T Recommendation G.694.1: Spectral grids for + WDM applications: DWDM frequency grid"; + } + } + } + } + case cwdm { + leaf cwdm-n { + type l0-types:cwdm-n; + description + "The given value 'N' is used to determine the nominal + central wavelength."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + } + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers"; + } + + grouping l0-label-range-info { + description + "Information about Layer 0 label range."; + leaf grid-type { + type identityref { + base l0-grid-type; + } + description + "Grid type"; + } + leaf priority { + type uint8; + description + "Priority in Interface Switching Capability Descriptor + (ISCD)."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + } + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers"; + } + + grouping wson-label-step { + description + "Label step information for WSON"; + choice l0-grid-type { + description + "Grid type: DWDM, CWDM, etc."; + case dwdm { + leaf wson-dwdm-channel-spacing { + when "derived-from-or-self(../../grid-type, + \"wson-grid-dwdm\")" { + description + "Valid only when grid type is DWDM."; + } + type identityref { + base dwdm-ch-spc-type; + } + description + "Label-step is the channel spacing (GHz), e.g., 100.000, + 50.000, 25.000, or 12.500 GHz for DWDM."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + case cwdm { + leaf wson-cwdm-channel-spacing { + when "derived-from-or-self(../../grid-type, + \"wson-grid-cwdm\")" { + description + "Valid only when grid type is CWDM."; + } + type identityref { + base cwdm-ch-spc-type; + } + description + "Label-step is the channel spacing (nm), i.e., 20 nm + for CWDM, which is the only value defined for CWDM."; + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable + (LSC) Label Switching Routers"; + } + } + } + reference + "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC) + Label Switching Routers, + ITU-T G.694.2 (12/2003): Spectral grids for WDM applications: + CWDM wavelength grid"; + } + + grouping flexi-grid-label-start-end { + description + "The flexi-grid label-start or label-end used to specify + flexi-grid label range."; + leaf flexi-n { + type l0-types:flexi-n; + description + "The given value 'N' is used to determine the nominal + central frequency."; + } + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + + grouping flexi-grid-frequency-slot { + description + "Flexi-grid frequency slot grouping."; + uses flexi-grid-label-start-end; + leaf flexi-m { + type l0-types:flexi-m; + description + "The given value 'M' is used to determine the slot width."; + } + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + + grouping flexi-grid-label-hop { + description + "Generic label-hop information for flexi-grid"; + choice single-or-super-channel { + description + "single or super channel"; + case single { + uses flexi-grid-frequency-slot; + } + case super { + list subcarrier-flexi-n { + key "flexi-n"; + uses flexi-grid-frequency-slot; + description + "List of subcarrier channels for flexi-grid super + channel."; + } + } + } + reference + "RFC 7698: Framework and Requirements for GMPLS-Based Control + of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + + grouping flexi-grid-label-range-info { + description + "Flexi-grid-specific label range related information"; + uses l0-label-range-info; + container flexi-grid { + description + "flexi-grid definition"; + leaf slot-width-granularity { + type identityref { + base flexi-slot-width-granularity; + } + default "flexi-swg-12p5ghz"; + description + "Minimum space between slot widths. Default is 12.500 + GHz."; + reference + "RFC 7698: Framework and Requirements for GMPLS-Based + Control of Flexi-Grid Dense Wavelength Division + Multiplexing (DWDM) Networks"; + } + leaf min-slot-width-factor { + type uint16 { + range "1..max"; + } + default "1"; + description + "A multiplier of the slot width granularity, indicating + the minimum slot width supported by an optical port. + + Minimum slot width is calculated by: + Minimum slot width (GHz) = + min-slot-width-factor * slot-width-granularity."; + reference + "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi- + Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + + leaf max-slot-width-factor { + type uint16 { + range "1..max"; + } + must '. >= ../min-slot-width-factor' { + error-message + "Maximum slot width must be greater than or equal to + minimum slot width."; + } + description + "A multiplier of the slot width granularity, indicating + the maximum slot width supported by an optical port. + + Maximum slot width is calculated by: + Maximum slot width (GHz) = + max-slot-width-factor * slot-width-granularity + + If specified, maximum slot width must be greater than or + equal to minimum slot width. If not specified, maximum + slot width is equal to minimum slot width."; + reference + "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi- + Grid Dense Wavelength Division Multiplexing (DWDM) + Networks"; + } + } + } + + grouping flexi-grid-label-step { + description + "Label step information for flexi-grid"; + leaf flexi-grid-channel-spacing { + type identityref { + base flexi-ch-spc-type; + } + default "flexi-ch-spc-6p25ghz"; + description + "Label-step is the nominal central frequency granularity + (GHz), e.g., 6.25 GHz."; + reference + "RFC 7699: Generalized Labels for the Flexi-Grid in Lambda + Switch Capable (LSC) Label Switching Routers"; + } + leaf flexi-n-step { + type uint8; + description + "This attribute defines the multiplier for the supported + values of 'N'. + + For example, given a grid with a nominal central frequency + granularity of 6.25 GHz, the granularity of the supported + values of the nominal central frequency could be 12.5 GHz. + In this case, the values of flexi-n should be even and this + constraint is reported by setting the flexi-n-step to 2. + + This attribute is also known as central frequency + granularity in RFC 8363."; + reference + "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi-Grid + Dense Wavelength Division Multiplexing (DWDM) Networks"; + } + } +} diff --git a/models/ietf/RFC/ietf-lime-time-types.yang b/models/ietf/RFC/ietf-lime-time-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..9f94e0c2cdfb44b12dfd026c8e983919b9852198 --- /dev/null +++ b/models/ietf/RFC/ietf-lime-time-types.yang @@ -0,0 +1,121 @@ +module ietf-lime-time-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-lime-time-types"; + prefix lime; + + organization + "IETF LIME Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/lime> + WG List: <mailto:lmap@ietf.org> + + Editor: Qin Wu + <bill.wu@huawei.com>"; + description + "This module provides time-related definitions used by the data + models written for Layer Independent OAM Management in the + Multi-Layer Environment (LIME). This module defines + identities but no schema tree elements. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8532; see + the RFC itself for full legal notices."; + + revision 2019-04-16 { + description + "Initial version."; + reference + "RFC 8532: Generic YANG Data Model for the Management of + Operations, Administration, and Maintenance (OAM) Protocols + That Use Connectionless Communications"; + } + + /*** Collection of common types related to time ***/ + /*** Time unit identity ***/ + + identity time-unit-type { + description + "Time unit type."; + } + + identity hours { + base time-unit-type; + description + "Time unit in hours."; + } + + identity minutes { + base time-unit-type; + description + "Time unit in minutes."; + } + + identity seconds { + base time-unit-type; + description + "Time unit in seconds."; + } + + identity milliseconds { + base time-unit-type; + description + "Time unit in milliseconds."; + } + + identity microseconds { + base time-unit-type; + description + "Time unit in microseconds."; + } + + identity nanoseconds { + base time-unit-type; + description + "Time unit in nanoseconds."; + } + + /*** Timestamp format Identity ***/ + + identity timestamp-type { + description + "Base identity for Timestamp Type."; + } + + identity truncated-ptp { + base timestamp-type; + description + "Identity for 64-bit short-format PTP timestamp."; + } + + identity truncated-ntp { + base timestamp-type; + description + "Identity for 32-bit short-format NTP timestamp."; + } + + identity ntp64 { + base timestamp-type; + description + "Identity for 64-bit NTP timestamp."; + } + + identity icmp { + base timestamp-type; + description + "Identity for 32-bit ICMP timestamp."; + } + identity ptp80 { + base timestamp-type; + description + "Identity for 80-bit PTP timestamp."; + } +} diff --git a/models/ietf/RFC/ietf-lime-time-types@2019-04-16.yang b/models/ietf/RFC/ietf-lime-time-types@2019-04-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..9f94e0c2cdfb44b12dfd026c8e983919b9852198 --- /dev/null +++ b/models/ietf/RFC/ietf-lime-time-types@2019-04-16.yang @@ -0,0 +1,121 @@ +module ietf-lime-time-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-lime-time-types"; + prefix lime; + + organization + "IETF LIME Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/lime> + WG List: <mailto:lmap@ietf.org> + + Editor: Qin Wu + <bill.wu@huawei.com>"; + description + "This module provides time-related definitions used by the data + models written for Layer Independent OAM Management in the + Multi-Layer Environment (LIME). This module defines + identities but no schema tree elements. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8532; see + the RFC itself for full legal notices."; + + revision 2019-04-16 { + description + "Initial version."; + reference + "RFC 8532: Generic YANG Data Model for the Management of + Operations, Administration, and Maintenance (OAM) Protocols + That Use Connectionless Communications"; + } + + /*** Collection of common types related to time ***/ + /*** Time unit identity ***/ + + identity time-unit-type { + description + "Time unit type."; + } + + identity hours { + base time-unit-type; + description + "Time unit in hours."; + } + + identity minutes { + base time-unit-type; + description + "Time unit in minutes."; + } + + identity seconds { + base time-unit-type; + description + "Time unit in seconds."; + } + + identity milliseconds { + base time-unit-type; + description + "Time unit in milliseconds."; + } + + identity microseconds { + base time-unit-type; + description + "Time unit in microseconds."; + } + + identity nanoseconds { + base time-unit-type; + description + "Time unit in nanoseconds."; + } + + /*** Timestamp format Identity ***/ + + identity timestamp-type { + description + "Base identity for Timestamp Type."; + } + + identity truncated-ptp { + base timestamp-type; + description + "Identity for 64-bit short-format PTP timestamp."; + } + + identity truncated-ntp { + base timestamp-type; + description + "Identity for 32-bit short-format NTP timestamp."; + } + + identity ntp64 { + base timestamp-type; + description + "Identity for 64-bit NTP timestamp."; + } + + identity icmp { + base timestamp-type; + description + "Identity for 32-bit ICMP timestamp."; + } + identity ptp80 { + base timestamp-type; + description + "Identity for 80-bit PTP timestamp."; + } +} diff --git a/models/ietf/RFC/ietf-lmap-common.yang b/models/ietf/RFC/ietf-lmap-common.yang new file mode 100644 index 0000000000000000000000000000000000000000..01ea9b59d420dc203498f4fd9d9f2487015f1ca4 --- /dev/null +++ b/models/ietf/RFC/ietf-lmap-common.yang @@ -0,0 +1,389 @@ +module ietf-lmap-common { + + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-lmap-common"; + prefix "lmap"; + + import ietf-inet-types { + prefix inet; + } + + organization + "IETF Large-Scale Measurement of Broadband Performance + Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/lmap> + WG List: <mailto:lmap@ietf.org> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Vaibhav Bajpai + <bajpaiv@in.tum.de>"; + + description + "This module provides common definitions used by the data + models written for Large-Scale Measurement Platforms (LMAPs). + This module defines typedefs and groupings but no schema + tree elements."; + + revision "2017-08-08" { + description + "Initial version"; + reference + "RFC 8194: A YANG Data Model for LMAP Measurement Agents"; + } + + /* + * Typedefs + */ + + typedef identifier { + type string { + length "1..max"; + } + description + "A string value used to name something."; + } + + typedef tag { + type string { + length "1..max"; + } + description + "A tag consists of at least one character."; + } + + typedef glob-pattern { + type string { + length "1..max"; + } + description + 'A glob style pattern (following POSIX.2 fnmatch() without + special treatment of file paths): + + * matches a sequence of characters + ? matches a single character + [seq] matches any character in seq + [!seq] matches any character not in seq + + A backslash followed by a character matches the following + character. In particular: + + \* matches * + \? matches ? + \\ matches \ + + A sequence seq may be a sequence of characters (e.g., [abc] + or a range of characters (e.g., [a-c]).'; + } + + typedef wildcard { + type string { + pattern '\*'; + } + description + "A wildcard for calendar scheduling entries."; + } + + typedef cycle-number { + type string { + pattern '[0-9]{8}\.[0-9]{6}'; + } + description + "A cycle number represented in the format YYYYMMDD.HHMMSS + where YYYY represents the year, MM the month (1..12), DD + the day of the months (01..31), HH the hour (00..23), MM + the minute (00..59), and SS the second (00..59). The cycle + number is using Coordinated Universal Time (UTC)."; + } + + typedef month { + type enumeration { + enum january { + value 1; + description + "January of the Gregorian calendar."; + } + enum february { + value 2; + description + "February of the Gregorian calendar."; + } + enum march { + value 3; + description + "March of the Gregorian calendar."; + } + enum april { + value 4; + description + "April of the Gregorian calendar."; + } + + enum may { + value 5; + description + "May of the Gregorian calendar."; + } + enum june { + value 6; + description + "June of the Gregorian calendar."; + } + enum july { + value 7; + description + "July of the Gregorian calendar."; + } + enum august { + value 8; + description + "August of the Gregorian calendar."; + } + enum september { + value 9; + description + "September of the Gregorian calendar."; + } + enum october { + value 10; + description + "October of the Gregorian calendar."; + } + enum november { + value 11; + description + "November of the Gregorian calendar."; + } + enum december { + value 12; + description + "December of the Gregorian calendar."; + } + } + description + "A type modeling the month in the Gregorian calendar."; + } + + typedef month-or-all { + type union { + type month; + type wildcard; + } + description + "A month or a wildcard indicating all twelve months."; + } + + typedef day-of-month { + type uint8 { range "1..31"; } + description + "A day of a month of the Gregorian calendar."; + } + + typedef day-of-months-or-all { + type union { + type day-of-month; + type wildcard; + } + description + "A day of a month or a wildcard indicating all days + of a month."; + } + + typedef weekday { + type enumeration { + enum monday { + value 1; + description + "Monday of the Gregorian calendar."; + } + enum tuesday { + value 2; + description + "Tuesday of the Gregorian calendar."; + } + enum wednesday { + value 3; + description + "Wednesday of the Gregorian calendar."; + } + enum thursday { + value 4; + description + "Thursday of the Gregorian calendar."; + } + + enum friday { + value 5; + description + "Friday of the Gregorian calendar."; + } + enum saturday { + value 6; + description + "Saturday of the Gregorian calendar."; + } + enum sunday { + value 7; + description + "Sunday of the Gregorian calendar."; + } + } + description + "A type modeling the weekdays in the Gregorian calendar. + The numbering follows the ISO 8601 scheme."; + reference + "ISO 8601:2004: Data elements and interchange formats -- + Information interchange -- Representation + of dates and times"; + } + + typedef weekday-or-all { + type union { + type weekday; + type wildcard; + } + description + "A weekday or a wildcard indicating all seven weekdays."; + } + + typedef hour { + type uint8 { range "0..23"; } + description + "An hour of a day."; + } + + typedef hour-or-all { + type union { + type hour; + type wildcard; + } + description + "An hour of a day or a wildcard indicating all hours + of a day."; + } + + typedef minute { + type uint8 { range "0..59"; } + description + "A minute of an hour."; + } + + typedef minute-or-all { + type union { + type minute; + type wildcard; + } + description + "A minute of an hour or a wildcard indicating all + minutes of an hour."; + } + + typedef second { + type uint8 { range "0..59"; } + description + "A second of a minute."; + } + + typedef second-or-all { + type union { + type second; + type wildcard; + } + description + "A second of a minute or a wildcard indicating all + seconds of a minute."; + } + + typedef status-code { + type int32; + description + "A status code returned by the execution of a Task. Note + that the actual range is implementation dependent, but it + should be portable to use values in the range 0..127 for + regular exit codes. By convention, 0 indicates successful + termination. Negative values may be used to indicate + abnormal termination due to a signal; the absolute value + may identify the signal number in this case."; + } + + typedef timezone-offset { + type string { + pattern 'Z|[\+\-]\d{2}:\d{2}'; + } + description + "A time zone offset as it is used by the date-and-time type + defined in the ietf-yang-types module. The value Z is + equivalent to +00:00. The value -00:00 indicates an + unknown time-offset."; + reference + "RFC 6991: Common YANG Data Types"; + } + + /* + * Groupings + */ + + grouping registry-grouping { + description + "This grouping models a list of entries in a registry + that identify functions of a Task."; + + list function { + key uri; + description + "A list of entries in a registry identifying functions."; + + leaf uri { + type inet:uri; + description + "A URI identifying an entry in a registry."; + } + + leaf-list role { + type string; + description + "A set of roles for the identified registry entry."; + } + } + } + + grouping options-grouping { + description + "A list of options of a Task. Each option is a name/value + pair (where the value may be absent)."; + + list option { + key "id"; + ordered-by user; + description + "A list of options passed to the Task. It is a list of + key/value pairs and may be used to model options. + Options may be used to identify the role of a Task + or to pass a Channel name to a Task."; + + leaf id { + type lmap:identifier; + description + "An identifier uniquely identifying an option. This + identifier is required by YANG to uniquely identify + a name/value pair, but it otherwise has no semantic + value"; + } + + leaf name { + type string; + description + "The name of the option."; + } + + leaf value { + type string; + description + "The value of the option."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-lmap-common@2017-08-08.yang b/models/ietf/RFC/ietf-lmap-common@2017-08-08.yang new file mode 100644 index 0000000000000000000000000000000000000000..01ea9b59d420dc203498f4fd9d9f2487015f1ca4 --- /dev/null +++ b/models/ietf/RFC/ietf-lmap-common@2017-08-08.yang @@ -0,0 +1,389 @@ +module ietf-lmap-common { + + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-lmap-common"; + prefix "lmap"; + + import ietf-inet-types { + prefix inet; + } + + organization + "IETF Large-Scale Measurement of Broadband Performance + Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/lmap> + WG List: <mailto:lmap@ietf.org> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Vaibhav Bajpai + <bajpaiv@in.tum.de>"; + + description + "This module provides common definitions used by the data + models written for Large-Scale Measurement Platforms (LMAPs). + This module defines typedefs and groupings but no schema + tree elements."; + + revision "2017-08-08" { + description + "Initial version"; + reference + "RFC 8194: A YANG Data Model for LMAP Measurement Agents"; + } + + /* + * Typedefs + */ + + typedef identifier { + type string { + length "1..max"; + } + description + "A string value used to name something."; + } + + typedef tag { + type string { + length "1..max"; + } + description + "A tag consists of at least one character."; + } + + typedef glob-pattern { + type string { + length "1..max"; + } + description + 'A glob style pattern (following POSIX.2 fnmatch() without + special treatment of file paths): + + * matches a sequence of characters + ? matches a single character + [seq] matches any character in seq + [!seq] matches any character not in seq + + A backslash followed by a character matches the following + character. In particular: + + \* matches * + \? matches ? + \\ matches \ + + A sequence seq may be a sequence of characters (e.g., [abc] + or a range of characters (e.g., [a-c]).'; + } + + typedef wildcard { + type string { + pattern '\*'; + } + description + "A wildcard for calendar scheduling entries."; + } + + typedef cycle-number { + type string { + pattern '[0-9]{8}\.[0-9]{6}'; + } + description + "A cycle number represented in the format YYYYMMDD.HHMMSS + where YYYY represents the year, MM the month (1..12), DD + the day of the months (01..31), HH the hour (00..23), MM + the minute (00..59), and SS the second (00..59). The cycle + number is using Coordinated Universal Time (UTC)."; + } + + typedef month { + type enumeration { + enum january { + value 1; + description + "January of the Gregorian calendar."; + } + enum february { + value 2; + description + "February of the Gregorian calendar."; + } + enum march { + value 3; + description + "March of the Gregorian calendar."; + } + enum april { + value 4; + description + "April of the Gregorian calendar."; + } + + enum may { + value 5; + description + "May of the Gregorian calendar."; + } + enum june { + value 6; + description + "June of the Gregorian calendar."; + } + enum july { + value 7; + description + "July of the Gregorian calendar."; + } + enum august { + value 8; + description + "August of the Gregorian calendar."; + } + enum september { + value 9; + description + "September of the Gregorian calendar."; + } + enum october { + value 10; + description + "October of the Gregorian calendar."; + } + enum november { + value 11; + description + "November of the Gregorian calendar."; + } + enum december { + value 12; + description + "December of the Gregorian calendar."; + } + } + description + "A type modeling the month in the Gregorian calendar."; + } + + typedef month-or-all { + type union { + type month; + type wildcard; + } + description + "A month or a wildcard indicating all twelve months."; + } + + typedef day-of-month { + type uint8 { range "1..31"; } + description + "A day of a month of the Gregorian calendar."; + } + + typedef day-of-months-or-all { + type union { + type day-of-month; + type wildcard; + } + description + "A day of a month or a wildcard indicating all days + of a month."; + } + + typedef weekday { + type enumeration { + enum monday { + value 1; + description + "Monday of the Gregorian calendar."; + } + enum tuesday { + value 2; + description + "Tuesday of the Gregorian calendar."; + } + enum wednesday { + value 3; + description + "Wednesday of the Gregorian calendar."; + } + enum thursday { + value 4; + description + "Thursday of the Gregorian calendar."; + } + + enum friday { + value 5; + description + "Friday of the Gregorian calendar."; + } + enum saturday { + value 6; + description + "Saturday of the Gregorian calendar."; + } + enum sunday { + value 7; + description + "Sunday of the Gregorian calendar."; + } + } + description + "A type modeling the weekdays in the Gregorian calendar. + The numbering follows the ISO 8601 scheme."; + reference + "ISO 8601:2004: Data elements and interchange formats -- + Information interchange -- Representation + of dates and times"; + } + + typedef weekday-or-all { + type union { + type weekday; + type wildcard; + } + description + "A weekday or a wildcard indicating all seven weekdays."; + } + + typedef hour { + type uint8 { range "0..23"; } + description + "An hour of a day."; + } + + typedef hour-or-all { + type union { + type hour; + type wildcard; + } + description + "An hour of a day or a wildcard indicating all hours + of a day."; + } + + typedef minute { + type uint8 { range "0..59"; } + description + "A minute of an hour."; + } + + typedef minute-or-all { + type union { + type minute; + type wildcard; + } + description + "A minute of an hour or a wildcard indicating all + minutes of an hour."; + } + + typedef second { + type uint8 { range "0..59"; } + description + "A second of a minute."; + } + + typedef second-or-all { + type union { + type second; + type wildcard; + } + description + "A second of a minute or a wildcard indicating all + seconds of a minute."; + } + + typedef status-code { + type int32; + description + "A status code returned by the execution of a Task. Note + that the actual range is implementation dependent, but it + should be portable to use values in the range 0..127 for + regular exit codes. By convention, 0 indicates successful + termination. Negative values may be used to indicate + abnormal termination due to a signal; the absolute value + may identify the signal number in this case."; + } + + typedef timezone-offset { + type string { + pattern 'Z|[\+\-]\d{2}:\d{2}'; + } + description + "A time zone offset as it is used by the date-and-time type + defined in the ietf-yang-types module. The value Z is + equivalent to +00:00. The value -00:00 indicates an + unknown time-offset."; + reference + "RFC 6991: Common YANG Data Types"; + } + + /* + * Groupings + */ + + grouping registry-grouping { + description + "This grouping models a list of entries in a registry + that identify functions of a Task."; + + list function { + key uri; + description + "A list of entries in a registry identifying functions."; + + leaf uri { + type inet:uri; + description + "A URI identifying an entry in a registry."; + } + + leaf-list role { + type string; + description + "A set of roles for the identified registry entry."; + } + } + } + + grouping options-grouping { + description + "A list of options of a Task. Each option is a name/value + pair (where the value may be absent)."; + + list option { + key "id"; + ordered-by user; + description + "A list of options passed to the Task. It is a list of + key/value pairs and may be used to model options. + Options may be used to identify the role of a Task + or to pass a Channel name to a Task."; + + leaf id { + type lmap:identifier; + description + "An identifier uniquely identifying an option. This + identifier is required by YANG to uniquely identify + a name/value pair, but it otherwise has no semantic + value"; + } + + leaf name { + type string; + description + "The name of the option."; + } + + leaf value { + type string; + description + "The value of the option."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-lmap-control.yang b/models/ietf/RFC/ietf-lmap-control.yang new file mode 100644 index 0000000000000000000000000000000000000000..d7e2bfc1b4ab84c493844ebb51034e65e465f7d9 --- /dev/null +++ b/models/ietf/RFC/ietf-lmap-control.yang @@ -0,0 +1,1019 @@ +module ietf-lmap-control { + + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-lmap-control"; + prefix "lmapc"; + + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + import ietf-lmap-common { + prefix lmap; + } + + organization + "IETF Large-Scale Measurement of Broadband Performance + Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/lmap> + WG List: <mailto:lmap@ietf.org> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Vaibhav Bajpai + <bajpaiv@in.tum.de>"; + + description + "This module defines a data model for controlling Measurement + Agents that are part of a Large-Scale Measurement Platform + (LMAP). This data model is expected to be implemented by + Measurement Agents."; + + revision "2017-08-08" { + description + "Initial version"; + reference + "RFC 8194: A YANG Data Model for LMAP Measurement Agents"; + } + + /* + * Typedefs + */ + + typedef event-ref { + type leafref { + path "/lmap/events/event/name"; + } + description + "This type is used by data models that need to reference + a configured event source."; + } + + typedef task-ref { + type leafref { + path "/lmap/tasks/task/name"; + } + description + "This type is used by data models that need to reference + a configured Task."; + } + + typedef schedule-ref { + type leafref { + path "/lmap/schedules/schedule/name"; + } + description + "This type is used by data models that need to reference + a configured Schedule."; + } + + /* + * Groupings + */ + + grouping start-end-grouping { + description + "A grouping that provides start and end times for + Event objects."; + leaf start { + type yang:date-and-time; + description + "The date and time when the Event object + starts to create triggers."; + } + leaf end { + type yang:date-and-time; + description + "The date and time when the Event object + stops to create triggers. + + It is generally a good idea to always configure + an end time and to refresh the end time as needed + to ensure that agents that lose connectivity to + their Controller do not continue executing Schedules + forever."; + } + } + + /* + * Capability, configuration, and state data nodes + */ + + container lmap { + description + "Configuration and control of a Measurement Agent."; + + container capabilities { + config false; + description + "Agent capabilities including a list of supported Tasks."; + + leaf version { + type string; + config false; + mandatory true; + description + "A short description of the software implementing the + Measurement Agent. This should include the version + number of the Measurement Agent software."; + } + + leaf-list tag { + type lmap:tag; + config false; + description + "An optional unordered set of tags that provide + additional information about the capabilities of + the Measurement Agent."; + } + + container tasks { + description + "A list of Tasks that the Measurement Agent supports."; + + list task { + key name; + description + "The list of Tasks supported by the Measurement Agent."; + + leaf name { + type lmap:identifier; + description + "The unique name of a Task capability."; + } + + uses lmap:registry-grouping; + + leaf version { + type string; + + description + "A short description of the software implementing + the Task. This should include the version + number of the Measurement Task software."; + } + + leaf program { + type string; + description + "The (local) program to invoke in order to execute + the Task."; + } + } + } + } + + /* + * Agent Configuration + */ + + container agent { + description + "Configuration of parameters affecting the whole + Measurement Agent."; + + leaf agent-id { + type yang:uuid; + description + "The agent-id identifies a Measurement Agent with + a very low probability of collision. In certain + deployments, the agent-id may be considered + sensitive, and hence this object is optional."; + } + + leaf group-id { + type string; + description + "The group-id identifies a group of Measurement + Agents. In certain deployments, the group-id + may be considered less sensitive than the + agent-id."; + } + + leaf measurement-point { + type string; + description + "The measurement point indicating where the + Measurement Agent is located on a path."; + reference + "RFC 7398: A Reference Path and Measurement Points + for Large-Scale Measurement of Broadband + Performance"; + } + + leaf report-agent-id { + type boolean; + must '. != "true" or ../agent-id' { + description + "An agent-id must exist for this to be set + to true."; + } + default false; + description + "The 'report-agent-id' controls whether the + 'agent-id' is reported to Collectors."; + } + + leaf report-group-id { + type boolean; + must '. != "true" or ../group-id' { + description + "A group-id must exist for this to be set + to true."; + } + default false; + description + "The 'report-group-id' controls whether the + 'group-id' is reported to Collectors."; + } + + leaf report-measurement-point { + type boolean; + must '. != "true" or ../measurement-point' { + description + "A measurement-point must exist for this to be + set to true."; + } + default false; + description + "The 'report-measurement-point' controls whether + the 'measurement-point' is reported to Collectors."; + } + + leaf controller-timeout { + type uint32; + units "seconds"; + description + "A timer is started after each successful contact + with a Controller. When the timer reaches the + controller-timeout, an event (controller-lost) is + raised indicating that connectivity to the Controller + has been lost."; + } + + leaf last-started { + type yang:date-and-time; + config false; + mandatory true; + description + "The date and time the Measurement Agent last started."; + } + } + + /* + * Task Configuration + */ + + container tasks { + description + "Configuration of LMAP Tasks."; + + list task { + key name; + description + "The list of Tasks configured on the Measurement + Agent. Note that a configured Task MUST resolve to a + Task listed in the capabilities. Attempts to execute + a configured Task that is not listed in the capabilities + result in a runtime execution error."; + + leaf name { + type lmap:identifier; + description + "The unique name of a Task."; + } + + uses lmap:registry-grouping; + + leaf program { + type string; + nacm:default-deny-write; + + description + "The (local) program to invoke in order to execute + the Task. If this leaf is not set, then the system + will try to identify a suitable program based on + the registry information present."; + } + + uses lmap:options-grouping { + description + "The list of Task-specific options."; + } + + leaf-list tag { + type lmap:identifier; + description + "A set of Task-specific tags that are reported + together with the measurement results to a Collector. + A tag can be used, for example, to carry the + Measurement Cycle ID."; + } + } + } + + /* + * Schedule Instructions + */ + + container schedules { + description + "Configuration of LMAP Schedules. Schedules control + which Tasks are executed by the LMAP implementation."; + + list schedule { + key name; + description + "Configuration of a particular Schedule."; + + leaf name { + type lmap:identifier; + description + "The locally unique, administratively assigned name + for this Schedule."; + } + + leaf start { + type event-ref; + mandatory true; + + description + "The event source controlling the start of the + scheduled Actions."; + } + + choice stop { + description + "This choice contains optional leafs that control the + graceful forced termination of scheduled Actions. + When the end has been reached, the scheduled Actions + should be forced to terminate the measurements. + This may involve being active some additional time in + order to properly finish the Action's activity (e.g., + waiting for any messages that are still outstanding)."; + + leaf end { + type event-ref; + description + "The event source controlling the graceful + forced termination of the scheduled Actions."; + } + + leaf duration { + type uint32; + units "seconds"; + description + "The duration controlling the graceful forced + termination of the scheduled Actions."; + } + } + + leaf execution-mode { + type enumeration { + enum sequential { + value 1; + description + "The Actions of the Schedule are executed + sequentially."; + } + enum parallel { + value 2; + description + "The Actions of the Schedule are executed + concurrently."; + } + enum pipelined { + value 3; + + description + "The Actions of the Schedule are executed in a + pipelined mode. Output created by an Action is + passed as input to the subsequent Action."; + } + } + default pipelined; + description + "The execution mode of this Schedule determines in + which order the Actions of the Schedule are executed."; + } + + leaf-list tag { + type lmap:tag; + description + "A set of Schedule-specific tags that are reported + together with the measurement results to a Collector."; + } + + leaf-list suppression-tag { + type lmap:tag; + description + "A set of Suppression tags that are used to select + Schedules to be suppressed."; + } + + leaf state { + type enumeration { + enum enabled { + value 1; + description + "The value 'enabled' indicates that the + Schedule is currently enabled."; + } + enum disabled { + value 2; + description + "The value 'disabled' indicates that the + Schedule is currently disabled."; + } + enum running { + value 3; + description + "The value 'running' indicates that the + Schedule is currently running."; + } + enum suppressed { + value 4; + description + "The value 'suppressed' indicates that the + Schedule is currently suppressed."; + } + } + config false; + mandatory true; + description + "The current state of the Schedule."; + } + + leaf storage { + type yang:gauge64; + units "bytes"; + config false; + mandatory true; + description + "The amount of secondary storage (e.g., allocated in a + file system) holding temporary data allocated to the + Schedule in bytes. This object reports the amount of + allocated physical storage and not the storage used + by logical data records."; + } + + leaf invocations { + type yang:counter32; + config false; + mandatory true; + description + "Number of invocations of this Schedule. This counter + does not include suppressed invocations or invocations + that were prevented due to an overlap with a previous + invocation of this Schedule."; + } + + leaf suppressions { + type yang:counter32; + config false; + mandatory true; + description + "Number of suppressed executions of this Schedule."; + } + + leaf overlaps { + type yang:counter32; + config false; + mandatory true; + + description + "Number of executions prevented due to overlaps with + a previous invocation of this Schedule."; + } + + leaf failures { + type yang:counter32; + config false; + mandatory true; + description + "Number of failed executions of this Schedule. A + failed execution is an execution where at least + one Action failed."; + } + + leaf last-invocation { + type yang:date-and-time; + config false; + description + "The date and time of the last invocation of + this Schedule."; + } + + list action { + key name; + description + "An Action describes a Task that is invoked by the + Schedule. Multiple Actions are invoked according to + the execution-mode of the Schedule."; + + leaf name { + type lmap:identifier; + description + "The unique identifier for this Action."; + } + + leaf task { + type task-ref; + mandatory true; + description + "The Task invoked by this Action."; + } + + container parameters { + description + "This container is a placeholder for runtime + parameters defined in Task-specific data models + augmenting the base LMAP control data model."; + choice extension { + description + "This choice is provided to augment in different + sets of parameters."; + } + } + + uses lmap:options-grouping { + description + "The list of Action-specific options that are + appended to the list of Task-specific options."; + } + + leaf-list destination { + type schedule-ref; + description + "A set of Schedules receiving the output produced + by this Action. The output is stored temporarily + since the Destination Schedules will in general + not be running when output is passed to them. The + behavior of an Action passing data to its own + Schedule is implementation specific. + + Data passed to a sequential or pipelined Schedule + is received by the Schedule's first Action. Data + passed to a parallel Schedule is received by all + Actions of the Schedule."; + } + + leaf-list tag { + type lmap:tag; + description + "A set of Action-specific tags that are reported + together with the measurement results to a + Collector."; + } + + leaf-list suppression-tag { + type lmap:tag; + description + "A set of Suppression tags that are used to select + Actions to be suppressed."; + } + + leaf state { + type enumeration { + enum enabled { + value 1; + description + "The value 'enabled' indicates that the + Action is currently enabled."; + } + enum disabled { + value 2; + description + "The value 'disabled' indicates that the + Action is currently disabled."; + } + enum running { + value 3; + description + "The value 'running' indicates that the + Action is currently running."; + } + enum suppressed { + value 4; + description + "The value 'suppressed' indicates that the + Action is currently suppressed."; + } + } + config false; + mandatory true; + description + "The current state of the Action."; + } + + leaf storage { + type yang:gauge64; + units "bytes"; + config false; + mandatory true; + description + "The amount of secondary storage (e.g., allocated in a + file system) holding temporary data allocated to the + Schedule in bytes. This object reports the amount of + allocated physical storage and not the storage used + by logical data records."; + } + + leaf invocations { + type yang:counter32; + config false; + mandatory true; + + description + "Number of invocations of this Action. This counter + does not include suppressed invocations or invocations + that were prevented due to an overlap with a previous + invocation of this Action."; + } + + leaf suppressions { + type yang:counter32; + config false; + mandatory true; + description + "Number of suppressed executions of this Action."; + } + + leaf overlaps { + type yang:counter32; + config false; + mandatory true; + description + "Number of executions prevented due to overlaps with + a previous invocation of this Action."; + } + + leaf failures { + type yang:counter32; + config false; + mandatory true; + description + "Number of failed executions of this Action."; + } + + leaf last-invocation { + type yang:date-and-time; + config false; + mandatory true; + description + "The date and time of the last invocation of + this Action."; + } + + leaf last-completion { + type yang:date-and-time; + config false; + mandatory true; + description + "The date and time of the last completion of + this Action."; + } + + leaf last-status { + type lmap:status-code; + config false; + mandatory true; + description + "The status code returned by the last execution of + this Action."; + } + + leaf last-message { + type string; + config false; + mandatory true; + description + "The status message produced by the last execution + of this Action."; + } + + leaf last-failed-completion { + type yang:date-and-time; + config false; + mandatory true; + description + "The date and time of the last failed completion + of this Action."; + } + + leaf last-failed-status { + type lmap:status-code; + config false; + mandatory true; + description + "The status code returned by the last failed + execution of this Action."; + } + + leaf last-failed-message { + type string; + config false; + mandatory true; + description + "The status message produced by the last failed + execution of this Action."; + } + } + } + } + + /* + * Suppression Instructions + */ + + container suppressions { + description + "Suppression information to prevent Schedules or + certain Actions from starting."; + + list suppression { + key name; + description + "Configuration of a particular Suppression."; + + leaf name { + type lmap:identifier; + description + "The locally unique, administratively assigned name + for this Suppression."; + } + + leaf start { + type event-ref; + description + "The event source controlling the start of the + Suppression period."; + } + + leaf end { + type event-ref; + description + "The event source controlling the end of the + Suppression period. If not present, Suppression + continues indefinitely."; + } + + leaf-list match { + type lmap:glob-pattern; + description + "A set of Suppression match patterns. The Suppression + will apply to all Schedules (and their Actions) that + have a matching value in their suppression-tags + and to all Actions that have a matching value in + their suppression-tags."; + } + + leaf stop-running { + type boolean; + default false; + description + "If 'stop-running' is true, running Schedules and + Actions matching the Suppression will be terminated + when Suppression is activated. If 'stop-running' is + false, running Schedules and Actions will not be + affected if Suppression is activated."; + } + + leaf state { + type enumeration { + enum enabled { + value 1; + description + "The value 'enabled' indicates that the + Suppression is currently enabled."; + } + enum disabled { + value 2; + description + "The value 'disabled' indicates that the + Suppression is currently disabled."; + } + enum active { + value 3; + description + "The value 'active' indicates that the + Suppression is currently active."; + } + } + config false; + mandatory true; + description + "The current state of the Suppression."; + } + } + } + + /* + * Event Instructions + */ + + container events { + description + "Configuration of LMAP events. + + Implementations may be forced to delay acting + upon the occurrence of events in the face of local + constraints. An Action triggered by an event + therefore should not rely on the accuracy + provided by the scheduler implementation."; + + list event { + key name; + description + "The list of event sources configured on the + Measurement Agent."; + + leaf name { + type lmap:identifier; + description + "The unique name of an event source."; + } + + leaf random-spread { + type uint32; + units seconds; + description + "This optional leaf adds a random spread to the + computation of the event's trigger time. The + random spread is a uniformly distributed random + number taken from the interval [0:random-spread]."; + } + + leaf cycle-interval { + type uint32; + units seconds; + description + "The optional cycle-interval defines the duration + of the time interval in seconds that is used to + calculate cycle numbers. No cycle number is + calculated if the optional cycle-interval does + not exist."; + } + + choice event-type { + description + "Different types of events are handled by + different branches of this choice. Note that + this choice can be extended via augmentations."; + + case periodic { + container periodic { + + description + "A periodic timing object triggers periodically + according to a regular interval."; + + leaf interval { + type uint32 { + range "1..max"; + } + units "seconds"; + mandatory true; + description + "The number of seconds between two triggers + generated by this periodic timing object."; + } + uses start-end-grouping; + } + } + + case calendar { + container calendar { + description + "A calendar timing object triggers based on the + current calendar date and time."; + + leaf-list month { + type lmap:month-or-all; + min-elements 1; + description + "A set of months at which this calendar timing + will trigger. The wildcard means all months."; + } + + leaf-list day-of-month { + type lmap:day-of-months-or-all; + min-elements 1; + description + "A set of days of the month at which this + calendar timing will trigger. The wildcard means + all days of a month."; + } + + leaf-list day-of-week { + type lmap:weekday-or-all; + min-elements 1; + description + "A set of weekdays at which this calendar timing + will trigger. The wildcard means all weekdays."; + } + leaf-list hour { + type lmap:hour-or-all; + min-elements 1; + description + "A set of hours at which this calendar timing will + trigger. The wildcard means all hours of a day."; + } + + leaf-list minute { + type lmap:minute-or-all; + min-elements 1; + description + "A set of minutes at which this calendar timing + will trigger. The wildcard means all minutes of + an hour."; + } + + leaf-list second { + type lmap:second-or-all; + min-elements 1; + description + "A set of seconds at which this calendar timing + will trigger. The wildcard means all seconds of + a minute."; + } + + leaf timezone-offset { + type lmap:timezone-offset; + description + "The time zone in which this calendar timing + object will be evaluated. If not present, + the system's local time zone will be used."; + } + uses start-end-grouping; + } + } + + case one-off { + container one-off { + description + "A one-off timing object triggers exactly once."; + + leaf time { + type yang:date-and-time; + mandatory true; + description + "This one-off timing object triggers once at + the configured date and time."; + } + } + } + + case immediate { + leaf immediate { + type empty; + mandatory true; + description + "This immediate Event object triggers immediately + when it is configured."; + } + } + + case startup { + leaf startup { + type empty; + mandatory true; + description + "This startup Event object triggers whenever the + Measurement Agent (re)starts."; + } + } + + case controller-lost { + leaf controller-lost { + type empty; + mandatory true; + description + "The controller-lost Event object triggers when + the connectivity to the Controller has been lost + for at least 'controller-timeout' seconds."; + } + } + + case controller-connected { + leaf controller-connected { + type empty; + mandatory true; + description + "The controller-connected Event object triggers + when the connectivity to the Controller has been + restored after it was lost for at least + 'controller-timeout' seconds."; + } + } + } + + } + } + } +} diff --git a/models/ietf/RFC/ietf-lmap-control@2017-08-08.yang b/models/ietf/RFC/ietf-lmap-control@2017-08-08.yang new file mode 100644 index 0000000000000000000000000000000000000000..d7e2bfc1b4ab84c493844ebb51034e65e465f7d9 --- /dev/null +++ b/models/ietf/RFC/ietf-lmap-control@2017-08-08.yang @@ -0,0 +1,1019 @@ +module ietf-lmap-control { + + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-lmap-control"; + prefix "lmapc"; + + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + import ietf-lmap-common { + prefix lmap; + } + + organization + "IETF Large-Scale Measurement of Broadband Performance + Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/lmap> + WG List: <mailto:lmap@ietf.org> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Vaibhav Bajpai + <bajpaiv@in.tum.de>"; + + description + "This module defines a data model for controlling Measurement + Agents that are part of a Large-Scale Measurement Platform + (LMAP). This data model is expected to be implemented by + Measurement Agents."; + + revision "2017-08-08" { + description + "Initial version"; + reference + "RFC 8194: A YANG Data Model for LMAP Measurement Agents"; + } + + /* + * Typedefs + */ + + typedef event-ref { + type leafref { + path "/lmap/events/event/name"; + } + description + "This type is used by data models that need to reference + a configured event source."; + } + + typedef task-ref { + type leafref { + path "/lmap/tasks/task/name"; + } + description + "This type is used by data models that need to reference + a configured Task."; + } + + typedef schedule-ref { + type leafref { + path "/lmap/schedules/schedule/name"; + } + description + "This type is used by data models that need to reference + a configured Schedule."; + } + + /* + * Groupings + */ + + grouping start-end-grouping { + description + "A grouping that provides start and end times for + Event objects."; + leaf start { + type yang:date-and-time; + description + "The date and time when the Event object + starts to create triggers."; + } + leaf end { + type yang:date-and-time; + description + "The date and time when the Event object + stops to create triggers. + + It is generally a good idea to always configure + an end time and to refresh the end time as needed + to ensure that agents that lose connectivity to + their Controller do not continue executing Schedules + forever."; + } + } + + /* + * Capability, configuration, and state data nodes + */ + + container lmap { + description + "Configuration and control of a Measurement Agent."; + + container capabilities { + config false; + description + "Agent capabilities including a list of supported Tasks."; + + leaf version { + type string; + config false; + mandatory true; + description + "A short description of the software implementing the + Measurement Agent. This should include the version + number of the Measurement Agent software."; + } + + leaf-list tag { + type lmap:tag; + config false; + description + "An optional unordered set of tags that provide + additional information about the capabilities of + the Measurement Agent."; + } + + container tasks { + description + "A list of Tasks that the Measurement Agent supports."; + + list task { + key name; + description + "The list of Tasks supported by the Measurement Agent."; + + leaf name { + type lmap:identifier; + description + "The unique name of a Task capability."; + } + + uses lmap:registry-grouping; + + leaf version { + type string; + + description + "A short description of the software implementing + the Task. This should include the version + number of the Measurement Task software."; + } + + leaf program { + type string; + description + "The (local) program to invoke in order to execute + the Task."; + } + } + } + } + + /* + * Agent Configuration + */ + + container agent { + description + "Configuration of parameters affecting the whole + Measurement Agent."; + + leaf agent-id { + type yang:uuid; + description + "The agent-id identifies a Measurement Agent with + a very low probability of collision. In certain + deployments, the agent-id may be considered + sensitive, and hence this object is optional."; + } + + leaf group-id { + type string; + description + "The group-id identifies a group of Measurement + Agents. In certain deployments, the group-id + may be considered less sensitive than the + agent-id."; + } + + leaf measurement-point { + type string; + description + "The measurement point indicating where the + Measurement Agent is located on a path."; + reference + "RFC 7398: A Reference Path and Measurement Points + for Large-Scale Measurement of Broadband + Performance"; + } + + leaf report-agent-id { + type boolean; + must '. != "true" or ../agent-id' { + description + "An agent-id must exist for this to be set + to true."; + } + default false; + description + "The 'report-agent-id' controls whether the + 'agent-id' is reported to Collectors."; + } + + leaf report-group-id { + type boolean; + must '. != "true" or ../group-id' { + description + "A group-id must exist for this to be set + to true."; + } + default false; + description + "The 'report-group-id' controls whether the + 'group-id' is reported to Collectors."; + } + + leaf report-measurement-point { + type boolean; + must '. != "true" or ../measurement-point' { + description + "A measurement-point must exist for this to be + set to true."; + } + default false; + description + "The 'report-measurement-point' controls whether + the 'measurement-point' is reported to Collectors."; + } + + leaf controller-timeout { + type uint32; + units "seconds"; + description + "A timer is started after each successful contact + with a Controller. When the timer reaches the + controller-timeout, an event (controller-lost) is + raised indicating that connectivity to the Controller + has been lost."; + } + + leaf last-started { + type yang:date-and-time; + config false; + mandatory true; + description + "The date and time the Measurement Agent last started."; + } + } + + /* + * Task Configuration + */ + + container tasks { + description + "Configuration of LMAP Tasks."; + + list task { + key name; + description + "The list of Tasks configured on the Measurement + Agent. Note that a configured Task MUST resolve to a + Task listed in the capabilities. Attempts to execute + a configured Task that is not listed in the capabilities + result in a runtime execution error."; + + leaf name { + type lmap:identifier; + description + "The unique name of a Task."; + } + + uses lmap:registry-grouping; + + leaf program { + type string; + nacm:default-deny-write; + + description + "The (local) program to invoke in order to execute + the Task. If this leaf is not set, then the system + will try to identify a suitable program based on + the registry information present."; + } + + uses lmap:options-grouping { + description + "The list of Task-specific options."; + } + + leaf-list tag { + type lmap:identifier; + description + "A set of Task-specific tags that are reported + together with the measurement results to a Collector. + A tag can be used, for example, to carry the + Measurement Cycle ID."; + } + } + } + + /* + * Schedule Instructions + */ + + container schedules { + description + "Configuration of LMAP Schedules. Schedules control + which Tasks are executed by the LMAP implementation."; + + list schedule { + key name; + description + "Configuration of a particular Schedule."; + + leaf name { + type lmap:identifier; + description + "The locally unique, administratively assigned name + for this Schedule."; + } + + leaf start { + type event-ref; + mandatory true; + + description + "The event source controlling the start of the + scheduled Actions."; + } + + choice stop { + description + "This choice contains optional leafs that control the + graceful forced termination of scheduled Actions. + When the end has been reached, the scheduled Actions + should be forced to terminate the measurements. + This may involve being active some additional time in + order to properly finish the Action's activity (e.g., + waiting for any messages that are still outstanding)."; + + leaf end { + type event-ref; + description + "The event source controlling the graceful + forced termination of the scheduled Actions."; + } + + leaf duration { + type uint32; + units "seconds"; + description + "The duration controlling the graceful forced + termination of the scheduled Actions."; + } + } + + leaf execution-mode { + type enumeration { + enum sequential { + value 1; + description + "The Actions of the Schedule are executed + sequentially."; + } + enum parallel { + value 2; + description + "The Actions of the Schedule are executed + concurrently."; + } + enum pipelined { + value 3; + + description + "The Actions of the Schedule are executed in a + pipelined mode. Output created by an Action is + passed as input to the subsequent Action."; + } + } + default pipelined; + description + "The execution mode of this Schedule determines in + which order the Actions of the Schedule are executed."; + } + + leaf-list tag { + type lmap:tag; + description + "A set of Schedule-specific tags that are reported + together with the measurement results to a Collector."; + } + + leaf-list suppression-tag { + type lmap:tag; + description + "A set of Suppression tags that are used to select + Schedules to be suppressed."; + } + + leaf state { + type enumeration { + enum enabled { + value 1; + description + "The value 'enabled' indicates that the + Schedule is currently enabled."; + } + enum disabled { + value 2; + description + "The value 'disabled' indicates that the + Schedule is currently disabled."; + } + enum running { + value 3; + description + "The value 'running' indicates that the + Schedule is currently running."; + } + enum suppressed { + value 4; + description + "The value 'suppressed' indicates that the + Schedule is currently suppressed."; + } + } + config false; + mandatory true; + description + "The current state of the Schedule."; + } + + leaf storage { + type yang:gauge64; + units "bytes"; + config false; + mandatory true; + description + "The amount of secondary storage (e.g., allocated in a + file system) holding temporary data allocated to the + Schedule in bytes. This object reports the amount of + allocated physical storage and not the storage used + by logical data records."; + } + + leaf invocations { + type yang:counter32; + config false; + mandatory true; + description + "Number of invocations of this Schedule. This counter + does not include suppressed invocations or invocations + that were prevented due to an overlap with a previous + invocation of this Schedule."; + } + + leaf suppressions { + type yang:counter32; + config false; + mandatory true; + description + "Number of suppressed executions of this Schedule."; + } + + leaf overlaps { + type yang:counter32; + config false; + mandatory true; + + description + "Number of executions prevented due to overlaps with + a previous invocation of this Schedule."; + } + + leaf failures { + type yang:counter32; + config false; + mandatory true; + description + "Number of failed executions of this Schedule. A + failed execution is an execution where at least + one Action failed."; + } + + leaf last-invocation { + type yang:date-and-time; + config false; + description + "The date and time of the last invocation of + this Schedule."; + } + + list action { + key name; + description + "An Action describes a Task that is invoked by the + Schedule. Multiple Actions are invoked according to + the execution-mode of the Schedule."; + + leaf name { + type lmap:identifier; + description + "The unique identifier for this Action."; + } + + leaf task { + type task-ref; + mandatory true; + description + "The Task invoked by this Action."; + } + + container parameters { + description + "This container is a placeholder for runtime + parameters defined in Task-specific data models + augmenting the base LMAP control data model."; + choice extension { + description + "This choice is provided to augment in different + sets of parameters."; + } + } + + uses lmap:options-grouping { + description + "The list of Action-specific options that are + appended to the list of Task-specific options."; + } + + leaf-list destination { + type schedule-ref; + description + "A set of Schedules receiving the output produced + by this Action. The output is stored temporarily + since the Destination Schedules will in general + not be running when output is passed to them. The + behavior of an Action passing data to its own + Schedule is implementation specific. + + Data passed to a sequential or pipelined Schedule + is received by the Schedule's first Action. Data + passed to a parallel Schedule is received by all + Actions of the Schedule."; + } + + leaf-list tag { + type lmap:tag; + description + "A set of Action-specific tags that are reported + together with the measurement results to a + Collector."; + } + + leaf-list suppression-tag { + type lmap:tag; + description + "A set of Suppression tags that are used to select + Actions to be suppressed."; + } + + leaf state { + type enumeration { + enum enabled { + value 1; + description + "The value 'enabled' indicates that the + Action is currently enabled."; + } + enum disabled { + value 2; + description + "The value 'disabled' indicates that the + Action is currently disabled."; + } + enum running { + value 3; + description + "The value 'running' indicates that the + Action is currently running."; + } + enum suppressed { + value 4; + description + "The value 'suppressed' indicates that the + Action is currently suppressed."; + } + } + config false; + mandatory true; + description + "The current state of the Action."; + } + + leaf storage { + type yang:gauge64; + units "bytes"; + config false; + mandatory true; + description + "The amount of secondary storage (e.g., allocated in a + file system) holding temporary data allocated to the + Schedule in bytes. This object reports the amount of + allocated physical storage and not the storage used + by logical data records."; + } + + leaf invocations { + type yang:counter32; + config false; + mandatory true; + + description + "Number of invocations of this Action. This counter + does not include suppressed invocations or invocations + that were prevented due to an overlap with a previous + invocation of this Action."; + } + + leaf suppressions { + type yang:counter32; + config false; + mandatory true; + description + "Number of suppressed executions of this Action."; + } + + leaf overlaps { + type yang:counter32; + config false; + mandatory true; + description + "Number of executions prevented due to overlaps with + a previous invocation of this Action."; + } + + leaf failures { + type yang:counter32; + config false; + mandatory true; + description + "Number of failed executions of this Action."; + } + + leaf last-invocation { + type yang:date-and-time; + config false; + mandatory true; + description + "The date and time of the last invocation of + this Action."; + } + + leaf last-completion { + type yang:date-and-time; + config false; + mandatory true; + description + "The date and time of the last completion of + this Action."; + } + + leaf last-status { + type lmap:status-code; + config false; + mandatory true; + description + "The status code returned by the last execution of + this Action."; + } + + leaf last-message { + type string; + config false; + mandatory true; + description + "The status message produced by the last execution + of this Action."; + } + + leaf last-failed-completion { + type yang:date-and-time; + config false; + mandatory true; + description + "The date and time of the last failed completion + of this Action."; + } + + leaf last-failed-status { + type lmap:status-code; + config false; + mandatory true; + description + "The status code returned by the last failed + execution of this Action."; + } + + leaf last-failed-message { + type string; + config false; + mandatory true; + description + "The status message produced by the last failed + execution of this Action."; + } + } + } + } + + /* + * Suppression Instructions + */ + + container suppressions { + description + "Suppression information to prevent Schedules or + certain Actions from starting."; + + list suppression { + key name; + description + "Configuration of a particular Suppression."; + + leaf name { + type lmap:identifier; + description + "The locally unique, administratively assigned name + for this Suppression."; + } + + leaf start { + type event-ref; + description + "The event source controlling the start of the + Suppression period."; + } + + leaf end { + type event-ref; + description + "The event source controlling the end of the + Suppression period. If not present, Suppression + continues indefinitely."; + } + + leaf-list match { + type lmap:glob-pattern; + description + "A set of Suppression match patterns. The Suppression + will apply to all Schedules (and their Actions) that + have a matching value in their suppression-tags + and to all Actions that have a matching value in + their suppression-tags."; + } + + leaf stop-running { + type boolean; + default false; + description + "If 'stop-running' is true, running Schedules and + Actions matching the Suppression will be terminated + when Suppression is activated. If 'stop-running' is + false, running Schedules and Actions will not be + affected if Suppression is activated."; + } + + leaf state { + type enumeration { + enum enabled { + value 1; + description + "The value 'enabled' indicates that the + Suppression is currently enabled."; + } + enum disabled { + value 2; + description + "The value 'disabled' indicates that the + Suppression is currently disabled."; + } + enum active { + value 3; + description + "The value 'active' indicates that the + Suppression is currently active."; + } + } + config false; + mandatory true; + description + "The current state of the Suppression."; + } + } + } + + /* + * Event Instructions + */ + + container events { + description + "Configuration of LMAP events. + + Implementations may be forced to delay acting + upon the occurrence of events in the face of local + constraints. An Action triggered by an event + therefore should not rely on the accuracy + provided by the scheduler implementation."; + + list event { + key name; + description + "The list of event sources configured on the + Measurement Agent."; + + leaf name { + type lmap:identifier; + description + "The unique name of an event source."; + } + + leaf random-spread { + type uint32; + units seconds; + description + "This optional leaf adds a random spread to the + computation of the event's trigger time. The + random spread is a uniformly distributed random + number taken from the interval [0:random-spread]."; + } + + leaf cycle-interval { + type uint32; + units seconds; + description + "The optional cycle-interval defines the duration + of the time interval in seconds that is used to + calculate cycle numbers. No cycle number is + calculated if the optional cycle-interval does + not exist."; + } + + choice event-type { + description + "Different types of events are handled by + different branches of this choice. Note that + this choice can be extended via augmentations."; + + case periodic { + container periodic { + + description + "A periodic timing object triggers periodically + according to a regular interval."; + + leaf interval { + type uint32 { + range "1..max"; + } + units "seconds"; + mandatory true; + description + "The number of seconds between two triggers + generated by this periodic timing object."; + } + uses start-end-grouping; + } + } + + case calendar { + container calendar { + description + "A calendar timing object triggers based on the + current calendar date and time."; + + leaf-list month { + type lmap:month-or-all; + min-elements 1; + description + "A set of months at which this calendar timing + will trigger. The wildcard means all months."; + } + + leaf-list day-of-month { + type lmap:day-of-months-or-all; + min-elements 1; + description + "A set of days of the month at which this + calendar timing will trigger. The wildcard means + all days of a month."; + } + + leaf-list day-of-week { + type lmap:weekday-or-all; + min-elements 1; + description + "A set of weekdays at which this calendar timing + will trigger. The wildcard means all weekdays."; + } + leaf-list hour { + type lmap:hour-or-all; + min-elements 1; + description + "A set of hours at which this calendar timing will + trigger. The wildcard means all hours of a day."; + } + + leaf-list minute { + type lmap:minute-or-all; + min-elements 1; + description + "A set of minutes at which this calendar timing + will trigger. The wildcard means all minutes of + an hour."; + } + + leaf-list second { + type lmap:second-or-all; + min-elements 1; + description + "A set of seconds at which this calendar timing + will trigger. The wildcard means all seconds of + a minute."; + } + + leaf timezone-offset { + type lmap:timezone-offset; + description + "The time zone in which this calendar timing + object will be evaluated. If not present, + the system's local time zone will be used."; + } + uses start-end-grouping; + } + } + + case one-off { + container one-off { + description + "A one-off timing object triggers exactly once."; + + leaf time { + type yang:date-and-time; + mandatory true; + description + "This one-off timing object triggers once at + the configured date and time."; + } + } + } + + case immediate { + leaf immediate { + type empty; + mandatory true; + description + "This immediate Event object triggers immediately + when it is configured."; + } + } + + case startup { + leaf startup { + type empty; + mandatory true; + description + "This startup Event object triggers whenever the + Measurement Agent (re)starts."; + } + } + + case controller-lost { + leaf controller-lost { + type empty; + mandatory true; + description + "The controller-lost Event object triggers when + the connectivity to the Controller has been lost + for at least 'controller-timeout' seconds."; + } + } + + case controller-connected { + leaf controller-connected { + type empty; + mandatory true; + description + "The controller-connected Event object triggers + when the connectivity to the Controller has been + restored after it was lost for at least + 'controller-timeout' seconds."; + } + } + } + + } + } + } +} diff --git a/models/ietf/RFC/ietf-lmap-report.yang b/models/ietf/RFC/ietf-lmap-report.yang new file mode 100644 index 0000000000000000000000000000000000000000..53c245cc43bd76dccb27d60054fa927216fed90a --- /dev/null +++ b/models/ietf/RFC/ietf-lmap-report.yang @@ -0,0 +1,234 @@ +module ietf-lmap-report { + + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-lmap-report"; + prefix "lmapr"; + + import ietf-yang-types { + prefix yang; + } + import ietf-lmap-common { + prefix lmap; + } + + organization + "IETF Large-Scale Measurement of Broadband Performance + Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/lmap> + WG List: <mailto:lmap@ietf.org> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Vaibhav Bajpai + <bajpaiv@in.tum.de>"; + + description + "This module defines a data model for reporting results from + Measurement Agents, which are part of a Large-Scale Measurement + Platform (LMAP), to result data Collectors. This data model is + expected to be implemented by a Collector."; + + revision "2017-08-08" { + description + "Initial version"; + reference + "RFC 8194: A YANG Data Model for LMAP Measurement Agents"; + } + + rpc report { + description + "The report operation is used by a Measurement Agent to + submit measurement results produced by Measurement Tasks to + a Collector."; + + input { + + leaf date { + type yang:date-and-time; + mandatory true; + description + "The date and time when this result report was sent to + a Collector."; + } + + leaf agent-id { + type yang:uuid; + description + "The agent-id of the agent from which this + report originates."; + } + + leaf group-id { + type string; + description + "The group-id of the agent from which this + report originates."; + } + + leaf measurement-point { + type string; + description + "The measurement-point of the agent from which this + report originates."; + } + + list result { + description + "The list of Tasks for which results are reported."; + + leaf schedule { + type lmap:identifier; + + description + "The name of the Schedule that produced the result."; + } + + leaf action { + type lmap:identifier; + description + "The name of the Action in the Schedule that produced + the result."; + } + + leaf task { + type lmap:identifier; + description + "The name of the Task that produced the result."; + } + + container parameters { + description + "This container is a placeholder for runtime + parameters defined in Task-specific data models + augmenting the base LMAP report data model."; + + choice extension { + description + "This choice is provided to augment in different + sets of parameters."; + } + } + + uses lmap:options-grouping { + description + "The list of options there were in use when the + measurement was performed. This list must include + both the Task-specific options as well as the + Action-specific options."; + } + + leaf-list tag { + type lmap:tag; + description + "A tag contains additional information that is passed + with the result record to the Collector. This is the + joined set of tags defined for the Task object, the + Schedule object, and the Action object. A tag can be + used to carry the Measurement Cycle ID."; + } + + leaf event { + type yang:date-and-time; + description + "The date and time of the event that triggered the + Schedule of the Action that produced the reported + result values. The date and time does not include + any added randomization."; + } + + leaf start { + type yang:date-and-time; + mandatory true; + description + "The date and time when the Task producing + this result started."; + } + + leaf end { + type yang:date-and-time; + description + "The date and time when the Task producing + this result finished."; + } + + leaf cycle-number { + type lmap:cycle-number; + description + "The optional cycle number is the time closest to + the time reported in the event leaf that is a multiple + of the cycle-interval of the event that triggered the + execution of the Schedule. The value is only present + if the event that triggered the execution of the + Schedule has a defined cycle-interval."; + } + + leaf status { + type lmap:status-code; + mandatory true; + description + "The status code returned by the execution of this + Action."; + } + + list conflict { + description + "The names of Tasks overlapping with the execution + of the Task that has produced this result."; + + leaf schedule-name { + type lmap:identifier; + description + "The name of a Schedule that might have impacted + the execution of the Task that has produced this + result."; + } + + leaf action-name { + type lmap:identifier; + description + "The name of an Action within the Schedule that + might have impacted the execution of the Task that + has produced this result."; + } + + leaf task-name { + type lmap:identifier; + description + "The name of the Task executed by an Action within + the Schedule that might have impacted the execution + of the Task that has produced this result."; + } + } + + list table { + description + "A list of result tables."; + + uses lmap:registry-grouping; + + leaf-list column { + type string; + description + "An ordered list of column labels. The order is + determined by the system and must match the order + of the columns in the result rows."; + } + + list row { + description + "The rows of a result table."; + + leaf-list value { + type string; + description + "The value of a cell in the result row."; + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-lmap-report@2017-08-08.yang b/models/ietf/RFC/ietf-lmap-report@2017-08-08.yang new file mode 100644 index 0000000000000000000000000000000000000000..53c245cc43bd76dccb27d60054fa927216fed90a --- /dev/null +++ b/models/ietf/RFC/ietf-lmap-report@2017-08-08.yang @@ -0,0 +1,234 @@ +module ietf-lmap-report { + + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-lmap-report"; + prefix "lmapr"; + + import ietf-yang-types { + prefix yang; + } + import ietf-lmap-common { + prefix lmap; + } + + organization + "IETF Large-Scale Measurement of Broadband Performance + Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/lmap> + WG List: <mailto:lmap@ietf.org> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Vaibhav Bajpai + <bajpaiv@in.tum.de>"; + + description + "This module defines a data model for reporting results from + Measurement Agents, which are part of a Large-Scale Measurement + Platform (LMAP), to result data Collectors. This data model is + expected to be implemented by a Collector."; + + revision "2017-08-08" { + description + "Initial version"; + reference + "RFC 8194: A YANG Data Model for LMAP Measurement Agents"; + } + + rpc report { + description + "The report operation is used by a Measurement Agent to + submit measurement results produced by Measurement Tasks to + a Collector."; + + input { + + leaf date { + type yang:date-and-time; + mandatory true; + description + "The date and time when this result report was sent to + a Collector."; + } + + leaf agent-id { + type yang:uuid; + description + "The agent-id of the agent from which this + report originates."; + } + + leaf group-id { + type string; + description + "The group-id of the agent from which this + report originates."; + } + + leaf measurement-point { + type string; + description + "The measurement-point of the agent from which this + report originates."; + } + + list result { + description + "The list of Tasks for which results are reported."; + + leaf schedule { + type lmap:identifier; + + description + "The name of the Schedule that produced the result."; + } + + leaf action { + type lmap:identifier; + description + "The name of the Action in the Schedule that produced + the result."; + } + + leaf task { + type lmap:identifier; + description + "The name of the Task that produced the result."; + } + + container parameters { + description + "This container is a placeholder for runtime + parameters defined in Task-specific data models + augmenting the base LMAP report data model."; + + choice extension { + description + "This choice is provided to augment in different + sets of parameters."; + } + } + + uses lmap:options-grouping { + description + "The list of options there were in use when the + measurement was performed. This list must include + both the Task-specific options as well as the + Action-specific options."; + } + + leaf-list tag { + type lmap:tag; + description + "A tag contains additional information that is passed + with the result record to the Collector. This is the + joined set of tags defined for the Task object, the + Schedule object, and the Action object. A tag can be + used to carry the Measurement Cycle ID."; + } + + leaf event { + type yang:date-and-time; + description + "The date and time of the event that triggered the + Schedule of the Action that produced the reported + result values. The date and time does not include + any added randomization."; + } + + leaf start { + type yang:date-and-time; + mandatory true; + description + "The date and time when the Task producing + this result started."; + } + + leaf end { + type yang:date-and-time; + description + "The date and time when the Task producing + this result finished."; + } + + leaf cycle-number { + type lmap:cycle-number; + description + "The optional cycle number is the time closest to + the time reported in the event leaf that is a multiple + of the cycle-interval of the event that triggered the + execution of the Schedule. The value is only present + if the event that triggered the execution of the + Schedule has a defined cycle-interval."; + } + + leaf status { + type lmap:status-code; + mandatory true; + description + "The status code returned by the execution of this + Action."; + } + + list conflict { + description + "The names of Tasks overlapping with the execution + of the Task that has produced this result."; + + leaf schedule-name { + type lmap:identifier; + description + "The name of a Schedule that might have impacted + the execution of the Task that has produced this + result."; + } + + leaf action-name { + type lmap:identifier; + description + "The name of an Action within the Schedule that + might have impacted the execution of the Task that + has produced this result."; + } + + leaf task-name { + type lmap:identifier; + description + "The name of the Task executed by an Action within + the Schedule that might have impacted the execution + of the Task that has produced this result."; + } + } + + list table { + description + "A list of result tables."; + + uses lmap:registry-grouping; + + leaf-list column { + type string; + description + "An ordered list of column labels. The order is + determined by the system and must match the order + of the columns in the result rows."; + } + + list row { + description + "The rows of a result table."; + + leaf-list value { + type string; + description + "The value of a cell in the result row."; + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-logical-network-element.yang b/models/ietf/RFC/ietf-logical-network-element.yang new file mode 100644 index 0000000000000000000000000000000000000000..438044951dcdd8b5b46207a56d96f71c1c9ea2e3 --- /dev/null +++ b/models/ietf/RFC/ietf-logical-network-element.yang @@ -0,0 +1,171 @@ +module ietf-logical-network-element { + yang-version 1.1; + + // namespace + + namespace "urn:ietf:params:xml:ns:yang:ietf-logical-network-element"; + prefix lne; + + // import some basic types + + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-yang-schema-mount { + prefix yangmnt; + reference + "RFC 8528: YANG Schema Mount"; + } + + organization + "IETF Routing Area (rtgwg) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> + WG List: <mailto:rtgwg@ietf.org> + + Author: Lou Berger + <mailto:lberger@labn.net> + + Author: Christian Hopps + <mailto:chopps@chopps.org> + + Author: Acee Lindem + <mailto:acee@cisco.com> + + Author: Dean Bogdanovic + <mailto:ivandean@gmail.com>"; + description + "This module is used to support multiple logical network + elements on a single physical or virtual system. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8530; see + the RFC itself for full legal notices."; + + revision 2019-01-25 { + description + "Initial revision."; + reference + "RFC 8530: YANG Model for Logical Network Elements"; + } + + // top level device definition statements + + container logical-network-elements { + description + "Allows a network device to support multiple logical + network element (device) instances."; + list logical-network-element { + key "name"; + description + "List of logical network elements."; + leaf name { + type string; + description + "Device-wide unique identifier for the + logical network element."; + } + leaf managed { + type boolean; + default "true"; + description + "True if the host can access LNE information + using the root mount point. This value + may not be modifiable in all implementations."; + } + leaf description { + type string; + description + "Description of the logical network element."; + } + container root { + description + "Container for mount point."; + yangmnt:mount-point "root" { + description + "Root for models supported per logical + network element. This mount point may or may not + be inline based on the server implementation. It + SHALL always contain a YANG library and interfaces + instance. + + When the associated 'managed' leaf is 'false', any + operation that attempts to access information below + the root SHALL fail with an error-tag of + 'access-denied' and an error-app-tag of + 'lne-not-managed'."; + } + } + } + } + + // augment statements + + augment "/if:interfaces/if:interface" { + description + "Add a node for the identification of the logical network + element associated with an interface. Applies to + interfaces that can be assigned per logical network + element. + + Note that a standard error will be returned if the + identified leafref isn't present. If an interface + cannot be assigned for any other reason, the operation + SHALL fail with an error-tag of 'operation-failed' and an + error-app-tag of 'lne-assignment-failed'. A meaningful + error-info that indicates the source of the assignment + failure SHOULD also be provided."; + leaf bind-lne-name { + type leafref { + path "/logical-network-elements/logical-network-element/name"; + } + description + "Logical network element ID to which the interface is + bound."; + } + } + + // notification statements + + notification bind-lne-name-failed { + description + "Indicates an error in the association of an interface to an + LNE. Only generated after success is initially returned + when bind-lne-name is set."; + leaf name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + mandatory true; + description + "Contains the interface name associated with the + failure."; + } + leaf bind-lne-name { + type leafref { + path "/if:interfaces/if:interface/lne:bind-lne-name"; + } + mandatory true; + description + "Contains the bind-lne-name associated with the + failure."; + } + leaf error-info { + type string; + description + "Optionally, indicates the source of the assignment + failure."; + } + } +} diff --git a/models/ietf/RFC/ietf-logical-network-element@2019-01-25.yang b/models/ietf/RFC/ietf-logical-network-element@2019-01-25.yang new file mode 100644 index 0000000000000000000000000000000000000000..438044951dcdd8b5b46207a56d96f71c1c9ea2e3 --- /dev/null +++ b/models/ietf/RFC/ietf-logical-network-element@2019-01-25.yang @@ -0,0 +1,171 @@ +module ietf-logical-network-element { + yang-version 1.1; + + // namespace + + namespace "urn:ietf:params:xml:ns:yang:ietf-logical-network-element"; + prefix lne; + + // import some basic types + + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-yang-schema-mount { + prefix yangmnt; + reference + "RFC 8528: YANG Schema Mount"; + } + + organization + "IETF Routing Area (rtgwg) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> + WG List: <mailto:rtgwg@ietf.org> + + Author: Lou Berger + <mailto:lberger@labn.net> + + Author: Christian Hopps + <mailto:chopps@chopps.org> + + Author: Acee Lindem + <mailto:acee@cisco.com> + + Author: Dean Bogdanovic + <mailto:ivandean@gmail.com>"; + description + "This module is used to support multiple logical network + elements on a single physical or virtual system. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8530; see + the RFC itself for full legal notices."; + + revision 2019-01-25 { + description + "Initial revision."; + reference + "RFC 8530: YANG Model for Logical Network Elements"; + } + + // top level device definition statements + + container logical-network-elements { + description + "Allows a network device to support multiple logical + network element (device) instances."; + list logical-network-element { + key "name"; + description + "List of logical network elements."; + leaf name { + type string; + description + "Device-wide unique identifier for the + logical network element."; + } + leaf managed { + type boolean; + default "true"; + description + "True if the host can access LNE information + using the root mount point. This value + may not be modifiable in all implementations."; + } + leaf description { + type string; + description + "Description of the logical network element."; + } + container root { + description + "Container for mount point."; + yangmnt:mount-point "root" { + description + "Root for models supported per logical + network element. This mount point may or may not + be inline based on the server implementation. It + SHALL always contain a YANG library and interfaces + instance. + + When the associated 'managed' leaf is 'false', any + operation that attempts to access information below + the root SHALL fail with an error-tag of + 'access-denied' and an error-app-tag of + 'lne-not-managed'."; + } + } + } + } + + // augment statements + + augment "/if:interfaces/if:interface" { + description + "Add a node for the identification of the logical network + element associated with an interface. Applies to + interfaces that can be assigned per logical network + element. + + Note that a standard error will be returned if the + identified leafref isn't present. If an interface + cannot be assigned for any other reason, the operation + SHALL fail with an error-tag of 'operation-failed' and an + error-app-tag of 'lne-assignment-failed'. A meaningful + error-info that indicates the source of the assignment + failure SHOULD also be provided."; + leaf bind-lne-name { + type leafref { + path "/logical-network-elements/logical-network-element/name"; + } + description + "Logical network element ID to which the interface is + bound."; + } + } + + // notification statements + + notification bind-lne-name-failed { + description + "Indicates an error in the association of an interface to an + LNE. Only generated after success is initially returned + when bind-lne-name is set."; + leaf name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + mandatory true; + description + "Contains the interface name associated with the + failure."; + } + leaf bind-lne-name { + type leafref { + path "/if:interfaces/if:interface/lne:bind-lne-name"; + } + mandatory true; + description + "Contains the bind-lne-name associated with the + failure."; + } + leaf error-info { + type string; + description + "Optionally, indicates the source of the assignment + failure."; + } + } +} diff --git a/models/ietf/RFC/ietf-microwave-radio-link.yang b/models/ietf/RFC/ietf-microwave-radio-link.yang new file mode 100644 index 0000000000000000000000000000000000000000..6f70df6f99452b895b1cb509b501c0a8f80bb224 --- /dev/null +++ b/models/ietf/RFC/ietf-microwave-radio-link.yang @@ -0,0 +1,906 @@ +module ietf-microwave-radio-link { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-microwave-radio-link"; + prefix mrl; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991"; + } + import iana-if-type { + prefix ianaift; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343"; + } + import ietf-interface-protection { + prefix ifprot; + reference + "RFC 8561"; + } + import ietf-microwave-types { + prefix mw-types; + reference + "RFC 8561"; + } + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + "WG List: <mailto:ccamp@ietf.org> + + Editors: + Jonas Ahlberg (jonas.ahlberg@ericsson.com) + Min Ye (amy.yemin@huawei.com) + Xi Li (Xi.Li@neclab.eu) + Daniela Spreafico (daniela.spreafico@nokia.com) + Marko Vaupotic (Marko.Vaupotic@aviatnet.com)"; + description + "This is a module for the entities in + a generic microwave system. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC 8561; see + the RFC itself for full legal notices."; + + revision 2019-06-19 { + description + "Initial revision."; + reference + "RFC 8561: A YANG Data Model for Microwave Radio Link"; + } + + /* + * Features + */ + + feature xpic { + description + "Indicates that the device supports XPIC."; + reference + "ETSI TR 102 311"; + } + + feature mimo { + description + "Indicates that the device supports MIMO."; + reference + "ETSI TR 102 311"; + } + + feature tdm { + description + "Indicates that the device supports TDM."; + } + + /* + * Typedefs + */ + + typedef power { + type decimal64 { + fraction-digits 1; + } + description + "Type used for the power values in the data nodes + for configuration or status."; + } + + /* + * Radio Link Terminal (RLT) + */ + + augment "/if:interfaces/if:interface" { + when "derived-from-or-self(if:type," + + "'ianaift:microwaveRadioLinkTerminal')"; + description + "Addition of data nodes for the radio link terminal to + the standard Interface data model, for interfaces of + the type 'microwaveRadioLinkTerminal'."; + leaf id { + type string; + description + "Descriptive identity of the radio link terminal used by + far-end RLT to check that it's connected to the correct + near-end RLT. Does not need to be configured if this + check is not used."; + } + leaf mode { + type identityref { + base mw-types:rlt-mode; + } + mandatory true; + description + "A description of the mode in which the radio link + terminal is configured. The format is X plus Y. + X represents the number of bonded carrier terminations. + Y represents the number of protecting carrier + terminations."; + } + leaf-list carrier-terminations { + type if:interface-ref; + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of interface must be + 'microwaveCarrierTermination'."; + } + min-elements 1; + description + "A list of references to carrier terminations + included in the radio link terminal."; + } + + leaf-list rlp-groups { + type leafref { + path "/mrl:radio-link-protection-groups/" + + "mrl:protection-group/mrl:name"; + } + description + "A list of references to the carrier termination + groups configured for radio link protection in this + radio link terminal."; + } + leaf-list xpic-pairs { + if-feature "xpic"; + type leafref { + path "/mrl:xpic-pairs/mrl:xpic-pair/mrl:name"; + } + description + "A list of references to the XPIC pairs used in this + radio link terminal. One pair can be used by two + terminals."; + reference + "ETSI TR 102 311"; + } + leaf-list mimo-groups { + if-feature "mimo"; + type leafref { + path "/mrl:mimo-groups/mrl:mimo-group/mrl:name"; + } + description + "A reference to the MIMO group used in this + radio link terminal. One group can be used by more + than one terminal."; + reference + "ETSI TR 102 311"; + } + list tdm-connections { + if-feature "tdm"; + key "tdm-type"; + description + "A list stating the number of active TDM connections + of a specified tdm-type that is configured to be + supported by the RLT."; + leaf tdm-type { + type identityref { + base mw-types:tdm-type; + } + description + "The type of TDM connection, which also indicates + the supported capacity."; + } + leaf tdm-connections { + type uint16; + mandatory true; + description + "Number of connections of the specified type."; + } + } + } + + /* + * Carrier Termination + */ + + augment "/if:interfaces/if:interface" { + when "derived-from-or-self(if:type," + + "'ianaift:microwaveCarrierTermination')"; + description + "Addition of data nodes for carrier termination to + the standard Interface data model, for interfaces + of the type 'microwaveCarrierTermination'."; + leaf carrier-id { + type string; + default "A"; + description + "ID of the carrier (e.g., A, B, C, or D). + Used in XPIC and MIMO configurations to check that + the carrier termination is connected to the correct + far-end carrier termination. Should be the same + carrier ID on both sides of the hop. Left as + default value when MIMO and XPIC are not in use."; + } + leaf tx-enabled { + type boolean; + default "false"; + description + "Disables (false) or enables (true) the transmitter. + Only applicable when the interface is enabled + (interface:enabled = true); otherwise, it's always + disabled."; + } + leaf tx-oper-status { + type enumeration { + enum off { + description + "Transmitter is off."; + } + enum on { + description + "Transmitter is on."; + } + enum standby { + description + "Transmitter is in standby."; + } + } + config false; + description + "Shows the operative status of the transmitter."; + } + leaf tx-frequency { + type uint32; + units "kHz"; + mandatory true; + description + "Selected transmitter frequency."; + } + choice freq-or-distance { + leaf rx-frequency { + type uint32; + units "kHz"; + description + "Selected receiver frequency."; + } + leaf duplex-distance { + type int32; + units "kHz"; + description + "Distance between transmitter and receiver frequencies."; + } + mandatory true; + description + "A choice to configure rx-frequency directly or compute + it as duplex-distance subtracted from tx-frequency."; + } + leaf actual-rx-frequency { + type uint32; + units "kHz"; + config false; + description + "Computed receiver frequency."; + } + leaf actual-duplex-distance { + type uint32; + units "kHz"; + config false; + description + "Computed distance between Tx and Rx frequencies."; + } + leaf channel-separation { + type uint32; + units "kHz"; + mandatory true; + description + "The amount of bandwidth allocated to a carrier. The + distance between adjacent channels in a radio + frequency channels arrangement"; + reference + "ETSI EN 302 217-1"; + } + leaf polarization { + type enumeration { + enum horizontal { + description + "Horizontal polarization."; + } + enum vertical { + description + "Vertical polarization."; + } + enum not-specified { + description + "Polarization not specified."; + } + } + default "not-specified"; + description + "Polarization - a textual description for info only."; + } + choice power-mode { + container rtpc { + description + "Remote Transmit Power Control (RTPC)."; + reference + "ETSI EN 302 217-1"; + leaf maximum-nominal-power { + type power { + range "-99..99"; + } + units "dBm"; + mandatory true; + description + "Selected output power."; + + reference + "ETSI EN 302 217-1"; + } + } + container atpc { + description + "Automatic Transmitter Power Control (ATPC)."; + reference + "ETSI EN 302 217-1"; + leaf maximum-nominal-power { + type power { + range "-99..99"; + } + units "dBm"; + mandatory true; + description + "Selected maximum output power. Minimum output + power is the same as the system capability, + minimum-power."; + reference + "ETSI EN 302 217-1"; + } + leaf atpc-lower-threshold { + type power { + range "-99..-20"; + } + units "dBm"; + must 'current() <= ../atpc-upper-threshold'; + mandatory true; + description + "The lower threshold for the input power at the + far end, which is used in the ATPC mode."; + reference + "ETSI EN 302 217-1"; + } + leaf atpc-upper-threshold { + type power { + range "-99..-20"; + } + units "dBm"; + mandatory true; + description + "The upper threshold for the input power at the + far end, which is used in the ATPC mode."; + reference + "ETSI EN 302 217-1"; + } + } + mandatory true; + description + "A choice of RTPC or ATPC."; + } + leaf actual-transmitted-level { + type power { + range "-99..99"; + } + units "dBm"; + config false; + description + "Actual transmitted power level (0.1 dBm resolution)."; + reference + "ETSI EN 301 129"; + } + leaf actual-received-level { + type power { + range "-99..-20"; + } + units "dBm"; + config false; + description + "Actual received power level (0.1 dBm resolution)."; + reference + "ETSI EN 301 129"; + } + choice coding-modulation-mode { + container single { + description + "A single modulation order only."; + reference + "ETSI EN 302 217-1"; + leaf selected-cm { + type identityref { + base mw-types:coding-modulation; + } + mandatory true; + description + "Selected the single coding/modulation."; + } + } + container adaptive { + description + "Adaptive coding/modulation."; + reference + "ETSI EN 302 217-1"; + + leaf selected-min-acm { + type identityref { + base mw-types:coding-modulation; + } + mandatory true; + description + "Selected minimum coding/modulation. + Adaptive coding/modulation shall not go + below this value."; + } + leaf selected-max-acm { + type identityref { + base mw-types:coding-modulation; + } + mandatory true; + description + "Selected maximum coding/modulation. + Adaptive coding/modulation shall not go + above this value."; + } + } + mandatory true; + description + "A selection of single or + adaptive coding/modulation mode."; + } + leaf actual-tx-cm { + type identityref { + base mw-types:coding-modulation; + } + config false; + description + "Actual coding/modulation in transmitting direction."; + } + leaf actual-snir { + type decimal64 { + fraction-digits 1; + range "0..99"; + } + units "dB"; + config false; + description + "Actual signal to noise plus the interference ratio + (0.1 dB resolution)."; + } + leaf actual-xpi { + if-feature "xpic"; + type decimal64 { + fraction-digits 1; + range "0..99"; + } + units "dB"; + config false; + description + "The actual carrier to cross-polar interference. + Only valid if XPIC is enabled (0.1 dB resolution)."; + reference + "ETSI TR 102 311"; + } + container ct-performance-thresholds { + description + "Specification of thresholds for when alarms should + be sent and cleared for various performance counters."; + leaf received-level-alarm-threshold { + type power { + range "-99..-20"; + } + units "dBm"; + default "-99"; + description + "An alarm is sent when the received power level is + below the specified threshold."; + reference + "ETSI EN 301 129"; + } + leaf transmitted-level-alarm-threshold { + type power { + range "-99..99"; + } + units "dBm"; + default "-99"; + description + "An alarm is sent when the transmitted power level + is below the specified threshold."; + reference + "ETSI EN 301 129"; + } + leaf ber-alarm-threshold { + type enumeration { + enum 1e-9 { + description + "Threshold at 1e-9 (10^-9)."; + } + enum 1e-8 { + description + "Threshold at 1e-8 (10^-8)."; + } + enum 1e-7 { + description + "Threshold at 1e-7 (10^-7)."; + } + enum 1e-6 { + description + "Threshold at 1e-6 (10^-6)."; + } + enum 1e-5 { + description + "Threshold at 1e-5 (10^-5)."; + } + enum 1e-4 { + description + "Threshold at 1e-4 (10^-4)."; + } + enum 1e-3 { + description + "Threshold at 1e-3 (10^-3)."; + } + enum 1e-2 { + description + "Threshold at 1e-2 (10^-2)."; + } + enum 1e-1 { + description + "Threshold at 1e-1 (10^-1)."; + } + } + default "1e-6"; + description + "Specification of at which BER an alarm should + be raised."; + reference + "ETSI EN 302 217-1"; + } + } + leaf if-loop { + type enumeration { + enum disabled { + description + "Disables the IF Loop."; + } + enum client { + description + "Loops the signal back to the client side."; + } + enum radio { + description + "Loops the signal back to the radio side."; + } + } + default "disabled"; + description + "Enable (client/radio) or disable (disabled) + the IF Loop, which loops the signal back to + the client side or the radio side."; + } + leaf rf-loop { + type enumeration { + enum disabled { + description + "Disables the RF Loop."; + } + enum client { + description + "Loops the signal back to the client side."; + } + enum radio { + description + "Loops the signal back to the radio side."; + } + } + default "disabled"; + description + "Enable (client/radio) or disable (disabled) + the RF loop, which loops the signal back to + the client side or the radio side."; + } + container capabilities { + config false; + description + "Capabilities of the installed equipment and + some selected configurations."; + leaf min-tx-frequency { + type uint32; + units "kHz"; + description + "Minimum Tx frequency possible to use."; + } + leaf max-tx-frequency { + type uint32; + units "kHz"; + description + "Maximum Tx frequency possible to use."; + } + leaf min-rx-frequency { + type uint32; + units "kHz"; + description + "Minimum Rx frequency possible to use."; + } + leaf max-rx-frequency { + type uint32; + units "kHz"; + description + "Maximum Tx frequency possible to use."; + } + leaf minimum-power { + type power; + units "dBm"; + description + "The minimum output power supported."; + reference + "ETSI EN 302 217-1"; + } + leaf maximum-available-power { + type power; + units "dBm"; + description + "The maximum output power supported."; + reference + "ETSI EN 302 217-1"; + } + leaf available-min-acm { + type identityref { + base mw-types:coding-modulation; + } + description + "Minimum coding-modulation possible to use."; + } + leaf available-max-acm { + type identityref { + base mw-types:coding-modulation; + } + description + "Maximum coding-modulation possible to use."; + } + } + container error-performance-statistics { + config false; + + description + "ITU-T G.826 error performance statistics relevant for + a microwave/millimeter wave carrier."; + leaf bbe { + type yang:counter32; + units "number of block errors"; + description + "Number of Background Block Errors (BBEs). A BBE is an + errored block not occurring as part of Severely Errored + Seconds (SES). Discontinuities in the value of this + counter can occur at re-initialization of the management + system and at other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ITU-T G.826"; + } + leaf es { + type yang:counter32; + units "seconds"; + description + "Number of Errored Seconds (ES). An ES is a one-second + period with one or more errored blocks or at least one + defect. Discontinuities in the value of this counter + can occur at re-initialization of the management system + and at other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ITU-T G.826"; + } + leaf ses { + type yang:counter32; + units "seconds"; + description + "Number of SES. SES is a one-second period that contains + equal or more than 30% errored blocks or at least + one defect. SES is a subset of ES. Discontinuities in + the value of this counter can occur at re-initialization + of the management system and at other times as indicated + by the value of 'discontinuity-time' in ietf-interfaces."; + reference + "ITU-T G.826"; + } + leaf uas { + type yang:counter32; + units "seconds"; + description + "Number of Unavailable Seconds (UAS); that is, the + total time that the node has been unavailable. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ITU-T G.826"; + } + } + container radio-performance-statistics { + config false; + description + "ETSI EN 301 129 radio physical interface statistics relevant + for a carrier termination."; + leaf min-rltm { + type power { + range "-99..-20"; + } + units "dBm"; + description + "Minimum received power level. Discontinuities in the + value of this counter can occur at re-initialization + of the management system and at other times as + indicated by the value of 'discontinuity-time' in + ietf-interfaces."; + reference + "ETSI EN 301 129"; + } + leaf max-rltm { + type power { + range "-99..-20"; + } + units "dBm"; + description + "Maximum received power level. Discontinuities in the + value of this counter can occur at re-initialization + of the management system and at other times as + indicated by the value of 'discontinuity-time' in + ietf-interfaces."; + reference + "ETSI EN 301 129"; + } + leaf min-tltm { + type power { + range "-99..99"; + } + units "dBm"; + + description + "Minimum transmitted power level. Discontinuities + in the value of this counter can occur at + re-initialization of the management system and + at other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ETSI EN 301 129"; + } + leaf max-tltm { + type power { + range "-99..99"; + } + units "dBm"; + description + "Maximum transmitted power level. Discontinuities + in the value of this counter can occur at + re-initialization of the management system and + at other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ETSI EN 301 129"; + } + } + } + + /* + * Radio Link Protection Groups + */ + + container radio-link-protection-groups { + description + "Configuration of radio link protected groups of + carrier terminations in a radio link. More than one + protected group per radio link terminal is allowed."; + uses ifprot:protection-groups { + refine "protection-group/members" { + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of a protection member must be + 'microwaveCarrierTermination'."; + } + } + refine "protection-group/working-entity" { + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of a working-entity must be + 'microwaveCarrierTermination'."; + } + } + } + } + + /* + * XPIC & MIMO groups - Configuration data nodes + */ + + container xpic-pairs { + if-feature "xpic"; + description + "Configuration of carrier termination pairs + for operation in XPIC mode."; + reference + "ETSI TR 102 311"; + list xpic-pair { + key "name"; + description + "List of carrier termination pairs in XPIC mode."; + leaf name { + type string; + description + "Name used for identification of the XPIC pair."; + } + leaf enabled { + type boolean; + default "false"; + description + "Enable(true)/disable(false) XPIC"; + } + leaf-list members { + type if:interface-ref; + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of a member must be + 'microwaveCarrierTermination'."; + } + min-elements 2; + max-elements 2; + + description + "Association to XPIC pairs used in the radio link + terminal."; + } + } + } + container mimo-groups { + if-feature "mimo"; + description + "Configuration of carrier terminations + for operation in MIMO mode."; + reference + "ETSI TR 102 311"; + list mimo-group { + key "name"; + description + "List of carrier terminations in MIMO mode."; + leaf name { + type string; + description + "Name used for identification of the MIMO group."; + } + leaf enabled { + type boolean; + default "false"; + description + "Enable(true)/disable(false) MIMO."; + } + leaf-list members { + type if:interface-ref; + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of a member must be + 'microwaveCarrierTermination'."; + } + min-elements 2; + description + "Association to a MIMO group if used in the radio + link terminal."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-microwave-radio-link@2019-06-19.yang b/models/ietf/RFC/ietf-microwave-radio-link@2019-06-19.yang new file mode 100644 index 0000000000000000000000000000000000000000..6f70df6f99452b895b1cb509b501c0a8f80bb224 --- /dev/null +++ b/models/ietf/RFC/ietf-microwave-radio-link@2019-06-19.yang @@ -0,0 +1,906 @@ +module ietf-microwave-radio-link { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-microwave-radio-link"; + prefix mrl; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991"; + } + import iana-if-type { + prefix ianaift; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343"; + } + import ietf-interface-protection { + prefix ifprot; + reference + "RFC 8561"; + } + import ietf-microwave-types { + prefix mw-types; + reference + "RFC 8561"; + } + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + "WG List: <mailto:ccamp@ietf.org> + + Editors: + Jonas Ahlberg (jonas.ahlberg@ericsson.com) + Min Ye (amy.yemin@huawei.com) + Xi Li (Xi.Li@neclab.eu) + Daniela Spreafico (daniela.spreafico@nokia.com) + Marko Vaupotic (Marko.Vaupotic@aviatnet.com)"; + description + "This is a module for the entities in + a generic microwave system. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC 8561; see + the RFC itself for full legal notices."; + + revision 2019-06-19 { + description + "Initial revision."; + reference + "RFC 8561: A YANG Data Model for Microwave Radio Link"; + } + + /* + * Features + */ + + feature xpic { + description + "Indicates that the device supports XPIC."; + reference + "ETSI TR 102 311"; + } + + feature mimo { + description + "Indicates that the device supports MIMO."; + reference + "ETSI TR 102 311"; + } + + feature tdm { + description + "Indicates that the device supports TDM."; + } + + /* + * Typedefs + */ + + typedef power { + type decimal64 { + fraction-digits 1; + } + description + "Type used for the power values in the data nodes + for configuration or status."; + } + + /* + * Radio Link Terminal (RLT) + */ + + augment "/if:interfaces/if:interface" { + when "derived-from-or-self(if:type," + + "'ianaift:microwaveRadioLinkTerminal')"; + description + "Addition of data nodes for the radio link terminal to + the standard Interface data model, for interfaces of + the type 'microwaveRadioLinkTerminal'."; + leaf id { + type string; + description + "Descriptive identity of the radio link terminal used by + far-end RLT to check that it's connected to the correct + near-end RLT. Does not need to be configured if this + check is not used."; + } + leaf mode { + type identityref { + base mw-types:rlt-mode; + } + mandatory true; + description + "A description of the mode in which the radio link + terminal is configured. The format is X plus Y. + X represents the number of bonded carrier terminations. + Y represents the number of protecting carrier + terminations."; + } + leaf-list carrier-terminations { + type if:interface-ref; + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of interface must be + 'microwaveCarrierTermination'."; + } + min-elements 1; + description + "A list of references to carrier terminations + included in the radio link terminal."; + } + + leaf-list rlp-groups { + type leafref { + path "/mrl:radio-link-protection-groups/" + + "mrl:protection-group/mrl:name"; + } + description + "A list of references to the carrier termination + groups configured for radio link protection in this + radio link terminal."; + } + leaf-list xpic-pairs { + if-feature "xpic"; + type leafref { + path "/mrl:xpic-pairs/mrl:xpic-pair/mrl:name"; + } + description + "A list of references to the XPIC pairs used in this + radio link terminal. One pair can be used by two + terminals."; + reference + "ETSI TR 102 311"; + } + leaf-list mimo-groups { + if-feature "mimo"; + type leafref { + path "/mrl:mimo-groups/mrl:mimo-group/mrl:name"; + } + description + "A reference to the MIMO group used in this + radio link terminal. One group can be used by more + than one terminal."; + reference + "ETSI TR 102 311"; + } + list tdm-connections { + if-feature "tdm"; + key "tdm-type"; + description + "A list stating the number of active TDM connections + of a specified tdm-type that is configured to be + supported by the RLT."; + leaf tdm-type { + type identityref { + base mw-types:tdm-type; + } + description + "The type of TDM connection, which also indicates + the supported capacity."; + } + leaf tdm-connections { + type uint16; + mandatory true; + description + "Number of connections of the specified type."; + } + } + } + + /* + * Carrier Termination + */ + + augment "/if:interfaces/if:interface" { + when "derived-from-or-self(if:type," + + "'ianaift:microwaveCarrierTermination')"; + description + "Addition of data nodes for carrier termination to + the standard Interface data model, for interfaces + of the type 'microwaveCarrierTermination'."; + leaf carrier-id { + type string; + default "A"; + description + "ID of the carrier (e.g., A, B, C, or D). + Used in XPIC and MIMO configurations to check that + the carrier termination is connected to the correct + far-end carrier termination. Should be the same + carrier ID on both sides of the hop. Left as + default value when MIMO and XPIC are not in use."; + } + leaf tx-enabled { + type boolean; + default "false"; + description + "Disables (false) or enables (true) the transmitter. + Only applicable when the interface is enabled + (interface:enabled = true); otherwise, it's always + disabled."; + } + leaf tx-oper-status { + type enumeration { + enum off { + description + "Transmitter is off."; + } + enum on { + description + "Transmitter is on."; + } + enum standby { + description + "Transmitter is in standby."; + } + } + config false; + description + "Shows the operative status of the transmitter."; + } + leaf tx-frequency { + type uint32; + units "kHz"; + mandatory true; + description + "Selected transmitter frequency."; + } + choice freq-or-distance { + leaf rx-frequency { + type uint32; + units "kHz"; + description + "Selected receiver frequency."; + } + leaf duplex-distance { + type int32; + units "kHz"; + description + "Distance between transmitter and receiver frequencies."; + } + mandatory true; + description + "A choice to configure rx-frequency directly or compute + it as duplex-distance subtracted from tx-frequency."; + } + leaf actual-rx-frequency { + type uint32; + units "kHz"; + config false; + description + "Computed receiver frequency."; + } + leaf actual-duplex-distance { + type uint32; + units "kHz"; + config false; + description + "Computed distance between Tx and Rx frequencies."; + } + leaf channel-separation { + type uint32; + units "kHz"; + mandatory true; + description + "The amount of bandwidth allocated to a carrier. The + distance between adjacent channels in a radio + frequency channels arrangement"; + reference + "ETSI EN 302 217-1"; + } + leaf polarization { + type enumeration { + enum horizontal { + description + "Horizontal polarization."; + } + enum vertical { + description + "Vertical polarization."; + } + enum not-specified { + description + "Polarization not specified."; + } + } + default "not-specified"; + description + "Polarization - a textual description for info only."; + } + choice power-mode { + container rtpc { + description + "Remote Transmit Power Control (RTPC)."; + reference + "ETSI EN 302 217-1"; + leaf maximum-nominal-power { + type power { + range "-99..99"; + } + units "dBm"; + mandatory true; + description + "Selected output power."; + + reference + "ETSI EN 302 217-1"; + } + } + container atpc { + description + "Automatic Transmitter Power Control (ATPC)."; + reference + "ETSI EN 302 217-1"; + leaf maximum-nominal-power { + type power { + range "-99..99"; + } + units "dBm"; + mandatory true; + description + "Selected maximum output power. Minimum output + power is the same as the system capability, + minimum-power."; + reference + "ETSI EN 302 217-1"; + } + leaf atpc-lower-threshold { + type power { + range "-99..-20"; + } + units "dBm"; + must 'current() <= ../atpc-upper-threshold'; + mandatory true; + description + "The lower threshold for the input power at the + far end, which is used in the ATPC mode."; + reference + "ETSI EN 302 217-1"; + } + leaf atpc-upper-threshold { + type power { + range "-99..-20"; + } + units "dBm"; + mandatory true; + description + "The upper threshold for the input power at the + far end, which is used in the ATPC mode."; + reference + "ETSI EN 302 217-1"; + } + } + mandatory true; + description + "A choice of RTPC or ATPC."; + } + leaf actual-transmitted-level { + type power { + range "-99..99"; + } + units "dBm"; + config false; + description + "Actual transmitted power level (0.1 dBm resolution)."; + reference + "ETSI EN 301 129"; + } + leaf actual-received-level { + type power { + range "-99..-20"; + } + units "dBm"; + config false; + description + "Actual received power level (0.1 dBm resolution)."; + reference + "ETSI EN 301 129"; + } + choice coding-modulation-mode { + container single { + description + "A single modulation order only."; + reference + "ETSI EN 302 217-1"; + leaf selected-cm { + type identityref { + base mw-types:coding-modulation; + } + mandatory true; + description + "Selected the single coding/modulation."; + } + } + container adaptive { + description + "Adaptive coding/modulation."; + reference + "ETSI EN 302 217-1"; + + leaf selected-min-acm { + type identityref { + base mw-types:coding-modulation; + } + mandatory true; + description + "Selected minimum coding/modulation. + Adaptive coding/modulation shall not go + below this value."; + } + leaf selected-max-acm { + type identityref { + base mw-types:coding-modulation; + } + mandatory true; + description + "Selected maximum coding/modulation. + Adaptive coding/modulation shall not go + above this value."; + } + } + mandatory true; + description + "A selection of single or + adaptive coding/modulation mode."; + } + leaf actual-tx-cm { + type identityref { + base mw-types:coding-modulation; + } + config false; + description + "Actual coding/modulation in transmitting direction."; + } + leaf actual-snir { + type decimal64 { + fraction-digits 1; + range "0..99"; + } + units "dB"; + config false; + description + "Actual signal to noise plus the interference ratio + (0.1 dB resolution)."; + } + leaf actual-xpi { + if-feature "xpic"; + type decimal64 { + fraction-digits 1; + range "0..99"; + } + units "dB"; + config false; + description + "The actual carrier to cross-polar interference. + Only valid if XPIC is enabled (0.1 dB resolution)."; + reference + "ETSI TR 102 311"; + } + container ct-performance-thresholds { + description + "Specification of thresholds for when alarms should + be sent and cleared for various performance counters."; + leaf received-level-alarm-threshold { + type power { + range "-99..-20"; + } + units "dBm"; + default "-99"; + description + "An alarm is sent when the received power level is + below the specified threshold."; + reference + "ETSI EN 301 129"; + } + leaf transmitted-level-alarm-threshold { + type power { + range "-99..99"; + } + units "dBm"; + default "-99"; + description + "An alarm is sent when the transmitted power level + is below the specified threshold."; + reference + "ETSI EN 301 129"; + } + leaf ber-alarm-threshold { + type enumeration { + enum 1e-9 { + description + "Threshold at 1e-9 (10^-9)."; + } + enum 1e-8 { + description + "Threshold at 1e-8 (10^-8)."; + } + enum 1e-7 { + description + "Threshold at 1e-7 (10^-7)."; + } + enum 1e-6 { + description + "Threshold at 1e-6 (10^-6)."; + } + enum 1e-5 { + description + "Threshold at 1e-5 (10^-5)."; + } + enum 1e-4 { + description + "Threshold at 1e-4 (10^-4)."; + } + enum 1e-3 { + description + "Threshold at 1e-3 (10^-3)."; + } + enum 1e-2 { + description + "Threshold at 1e-2 (10^-2)."; + } + enum 1e-1 { + description + "Threshold at 1e-1 (10^-1)."; + } + } + default "1e-6"; + description + "Specification of at which BER an alarm should + be raised."; + reference + "ETSI EN 302 217-1"; + } + } + leaf if-loop { + type enumeration { + enum disabled { + description + "Disables the IF Loop."; + } + enum client { + description + "Loops the signal back to the client side."; + } + enum radio { + description + "Loops the signal back to the radio side."; + } + } + default "disabled"; + description + "Enable (client/radio) or disable (disabled) + the IF Loop, which loops the signal back to + the client side or the radio side."; + } + leaf rf-loop { + type enumeration { + enum disabled { + description + "Disables the RF Loop."; + } + enum client { + description + "Loops the signal back to the client side."; + } + enum radio { + description + "Loops the signal back to the radio side."; + } + } + default "disabled"; + description + "Enable (client/radio) or disable (disabled) + the RF loop, which loops the signal back to + the client side or the radio side."; + } + container capabilities { + config false; + description + "Capabilities of the installed equipment and + some selected configurations."; + leaf min-tx-frequency { + type uint32; + units "kHz"; + description + "Minimum Tx frequency possible to use."; + } + leaf max-tx-frequency { + type uint32; + units "kHz"; + description + "Maximum Tx frequency possible to use."; + } + leaf min-rx-frequency { + type uint32; + units "kHz"; + description + "Minimum Rx frequency possible to use."; + } + leaf max-rx-frequency { + type uint32; + units "kHz"; + description + "Maximum Tx frequency possible to use."; + } + leaf minimum-power { + type power; + units "dBm"; + description + "The minimum output power supported."; + reference + "ETSI EN 302 217-1"; + } + leaf maximum-available-power { + type power; + units "dBm"; + description + "The maximum output power supported."; + reference + "ETSI EN 302 217-1"; + } + leaf available-min-acm { + type identityref { + base mw-types:coding-modulation; + } + description + "Minimum coding-modulation possible to use."; + } + leaf available-max-acm { + type identityref { + base mw-types:coding-modulation; + } + description + "Maximum coding-modulation possible to use."; + } + } + container error-performance-statistics { + config false; + + description + "ITU-T G.826 error performance statistics relevant for + a microwave/millimeter wave carrier."; + leaf bbe { + type yang:counter32; + units "number of block errors"; + description + "Number of Background Block Errors (BBEs). A BBE is an + errored block not occurring as part of Severely Errored + Seconds (SES). Discontinuities in the value of this + counter can occur at re-initialization of the management + system and at other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ITU-T G.826"; + } + leaf es { + type yang:counter32; + units "seconds"; + description + "Number of Errored Seconds (ES). An ES is a one-second + period with one or more errored blocks or at least one + defect. Discontinuities in the value of this counter + can occur at re-initialization of the management system + and at other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ITU-T G.826"; + } + leaf ses { + type yang:counter32; + units "seconds"; + description + "Number of SES. SES is a one-second period that contains + equal or more than 30% errored blocks or at least + one defect. SES is a subset of ES. Discontinuities in + the value of this counter can occur at re-initialization + of the management system and at other times as indicated + by the value of 'discontinuity-time' in ietf-interfaces."; + reference + "ITU-T G.826"; + } + leaf uas { + type yang:counter32; + units "seconds"; + description + "Number of Unavailable Seconds (UAS); that is, the + total time that the node has been unavailable. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ITU-T G.826"; + } + } + container radio-performance-statistics { + config false; + description + "ETSI EN 301 129 radio physical interface statistics relevant + for a carrier termination."; + leaf min-rltm { + type power { + range "-99..-20"; + } + units "dBm"; + description + "Minimum received power level. Discontinuities in the + value of this counter can occur at re-initialization + of the management system and at other times as + indicated by the value of 'discontinuity-time' in + ietf-interfaces."; + reference + "ETSI EN 301 129"; + } + leaf max-rltm { + type power { + range "-99..-20"; + } + units "dBm"; + description + "Maximum received power level. Discontinuities in the + value of this counter can occur at re-initialization + of the management system and at other times as + indicated by the value of 'discontinuity-time' in + ietf-interfaces."; + reference + "ETSI EN 301 129"; + } + leaf min-tltm { + type power { + range "-99..99"; + } + units "dBm"; + + description + "Minimum transmitted power level. Discontinuities + in the value of this counter can occur at + re-initialization of the management system and + at other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ETSI EN 301 129"; + } + leaf max-tltm { + type power { + range "-99..99"; + } + units "dBm"; + description + "Maximum transmitted power level. Discontinuities + in the value of this counter can occur at + re-initialization of the management system and + at other times as indicated by the value of + 'discontinuity-time' in ietf-interfaces."; + reference + "ETSI EN 301 129"; + } + } + } + + /* + * Radio Link Protection Groups + */ + + container radio-link-protection-groups { + description + "Configuration of radio link protected groups of + carrier terminations in a radio link. More than one + protected group per radio link terminal is allowed."; + uses ifprot:protection-groups { + refine "protection-group/members" { + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of a protection member must be + 'microwaveCarrierTermination'."; + } + } + refine "protection-group/working-entity" { + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of a working-entity must be + 'microwaveCarrierTermination'."; + } + } + } + } + + /* + * XPIC & MIMO groups - Configuration data nodes + */ + + container xpic-pairs { + if-feature "xpic"; + description + "Configuration of carrier termination pairs + for operation in XPIC mode."; + reference + "ETSI TR 102 311"; + list xpic-pair { + key "name"; + description + "List of carrier termination pairs in XPIC mode."; + leaf name { + type string; + description + "Name used for identification of the XPIC pair."; + } + leaf enabled { + type boolean; + default "false"; + description + "Enable(true)/disable(false) XPIC"; + } + leaf-list members { + type if:interface-ref; + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of a member must be + 'microwaveCarrierTermination'."; + } + min-elements 2; + max-elements 2; + + description + "Association to XPIC pairs used in the radio link + terminal."; + } + } + } + container mimo-groups { + if-feature "mimo"; + description + "Configuration of carrier terminations + for operation in MIMO mode."; + reference + "ETSI TR 102 311"; + list mimo-group { + key "name"; + description + "List of carrier terminations in MIMO mode."; + leaf name { + type string; + description + "Name used for identification of the MIMO group."; + } + leaf enabled { + type boolean; + default "false"; + description + "Enable(true)/disable(false) MIMO."; + } + leaf-list members { + type if:interface-ref; + must "derived-from-or-self(/if:interfaces/if:interface" + + "[if:name = current()]" + + "/if:type, 'ianaift:microwaveCarrierTermination')" { + description + "The type of a member must be + 'microwaveCarrierTermination'."; + } + min-elements 2; + description + "Association to a MIMO group if used in the radio + link terminal."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-microwave-types.yang b/models/ietf/RFC/ietf-microwave-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..d0fcd0704b438f6b64273521cf6618a676036a4f --- /dev/null +++ b/models/ietf/RFC/ietf-microwave-types.yang @@ -0,0 +1,326 @@ +module ietf-microwave-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-microwave-types"; + prefix mw-types; + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + "WG List: <mailto:ccamp@ietf.org> + + Editors: + Jonas Ahlberg (jonas.ahlberg@ericsson.com) + Min Ye (amy.yemin@huawei.com) + Xi Li (Xi.Li@neclab.eu) + Daniela Spreafico (daniela.spreafico@nokia.com) + Marko Vaupotic (Marko.Vaupotic@aviatnet.com)"; + description + "This module contains a collection of YANG data types + considered generally useful for microwave interfaces. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8561; see + the RFC itself for full legal notices."; + + revision 2019-06-19 { + description + "Initial revision."; + reference + "RFC 8561: A YANG Data Model for Microwave Radio Link"; + } + + /* + * Radio-link-terminal mode identities + */ + + identity rlt-mode { + description + "A description of the mode in which the radio link + terminal is configured. The format is X plus Y. + X represents the number of bonded carrier terminations. + Y represents the number of protecting carrier + terminations."; + } + + identity one-plus-zero { + base rlt-mode; + description + "1 carrier termination only."; + } + + identity one-plus-one { + base rlt-mode; + description + "1 carrier termination + and 1 protecting carrier termination."; + } + + identity two-plus-zero { + base rlt-mode; + description + "2 bonded carrier terminations."; + } + + /* + * Coding and modulation identities + */ + + identity coding-modulation { + description + "The coding and modulation schemes."; + } + + identity half-bpsk { + base coding-modulation; + description + "Half BPSK coding and modulation scheme."; + } + + identity half-bpsk-strong { + base half-bpsk; + description + "Half BPSK strong coding and modulation scheme."; + } + + identity half-bpsk-light { + base half-bpsk; + description + "Half BPSK light coding and modulation scheme."; + } + + identity bpsk { + base coding-modulation; + description + "BPSK coding and modulation scheme."; + } + + identity bpsk-strong { + base bpsk; + description + "BPSK strong coding and modulation scheme."; + } + + identity bpsk-light { + base bpsk; + description + "BPSK light coding and modulation scheme."; + } + + identity qpsk { + base coding-modulation; + description + "QPSK coding and modulation scheme."; + } + + identity qam-4 { + base coding-modulation; + description + "4 QAM coding and modulation scheme."; + } + + identity qam-4-strong { + base qam-4; + description + "4 QAM strong coding and modulation scheme."; + } + + identity qam-4-light { + base qam-4; + description + "4 QAM light coding and modulation scheme."; + } + + identity qam-16 { + base coding-modulation; + description + "16 QAM coding and modulation scheme."; + } + + identity qam-16-strong { + base qam-16; + description + "16 QAM strong coding and modulation scheme."; + } + + identity qam-16-light { + base qam-16; + description + "16 QAM light coding and modulation scheme."; + } + + identity qam-32 { + base coding-modulation; + description + "32 QAM coding and modulation scheme."; + } + + identity qam-32-strong { + base qam-32; + description + "32 QAM strong coding and modulation scheme."; + } + + identity qam-32-light { + base qam-32; + description + "32 QAM light coding and modulation scheme."; + } + + identity qam-64 { + base coding-modulation; + description + "64 QAM coding and modulation scheme."; + } + + identity qam-64-strong { + base qam-64; + description + "64 QAM strong coding and modulation scheme."; + } + + identity qam-64-light { + base qam-64; + description + "64 QAM light coding and modulation scheme."; + } + + identity qam-128 { + base coding-modulation; + description + "128 QAM coding and modulation scheme."; + } + + identity qam-128-strong { + base qam-128; + description + "128 QAM strong coding and modulation scheme."; + } + + identity qam-128-light { + base qam-128; + description + "128 QAM light coding and modulation scheme."; + } + + identity qam-256 { + base coding-modulation; + description + "256 QAM coding and modulation scheme."; + } + + identity qam-256-strong { + base qam-256; + description + "256 QAM strong coding and modulation scheme."; + } + + identity qam-256-light { + base qam-256; + description + "256 QAM light coding and modulation scheme."; + } + + identity qam-512 { + base coding-modulation; + description + "512 QAM coding and modulation scheme."; + } + + identity qam-512-strong { + base qam-512; + description + "512 QAM strong coding and modulation scheme."; + } + + identity qam-512-light { + base qam-512; + description + "512 QAM light coding and modulation scheme."; + } + + identity qam-1024 { + base coding-modulation; + description + "1024 QAM coding and modulation scheme."; + } + + identity qam-1024-strong { + base qam-1024; + description + "1024 QAM strong coding and modulation scheme."; + } + + identity qam-1024-light { + base qam-1024; + description + "1024 QAM light coding and modulation scheme."; + } + + identity qam-2048 { + base coding-modulation; + description + "2048 QAM coding and modulation scheme."; + } + + identity qam-2048-strong { + base qam-2048; + description + "2048 QAM strong coding and modulation scheme."; + } + + identity qam-2048-light { + base qam-2048; + description + "2048 QAM light coding and modulation scheme."; + } + + identity qam-4096 { + base coding-modulation; + description + "4096 QAM coding and modulation scheme."; + } + + identity qam-4096-strong { + base qam-4096; + description + "4096 QAM strong coding and modulation scheme."; + } + + identity qam-4096-light { + base qam-4096; + description + "4096 QAM light coding and modulation scheme."; + } + + /* + * TDM-type identities + */ + + identity tdm-type { + description + "A description of the type of TDM connection, + also indicating the supported capacity of the + connection."; + } + + identity E1 { + base tdm-type; + description + "E1 connection, 2.048 Mbit/s."; + } + + identity STM-1 { + base tdm-type; + description + "STM-1 connection, 155.52 Mbit/s."; + } +} diff --git a/models/ietf/RFC/ietf-microwave-types@2019-06-19.yang b/models/ietf/RFC/ietf-microwave-types@2019-06-19.yang new file mode 100644 index 0000000000000000000000000000000000000000..d0fcd0704b438f6b64273521cf6618a676036a4f --- /dev/null +++ b/models/ietf/RFC/ietf-microwave-types@2019-06-19.yang @@ -0,0 +1,326 @@ +module ietf-microwave-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-microwave-types"; + prefix mw-types; + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + "WG List: <mailto:ccamp@ietf.org> + + Editors: + Jonas Ahlberg (jonas.ahlberg@ericsson.com) + Min Ye (amy.yemin@huawei.com) + Xi Li (Xi.Li@neclab.eu) + Daniela Spreafico (daniela.spreafico@nokia.com) + Marko Vaupotic (Marko.Vaupotic@aviatnet.com)"; + description + "This module contains a collection of YANG data types + considered generally useful for microwave interfaces. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8561; see + the RFC itself for full legal notices."; + + revision 2019-06-19 { + description + "Initial revision."; + reference + "RFC 8561: A YANG Data Model for Microwave Radio Link"; + } + + /* + * Radio-link-terminal mode identities + */ + + identity rlt-mode { + description + "A description of the mode in which the radio link + terminal is configured. The format is X plus Y. + X represents the number of bonded carrier terminations. + Y represents the number of protecting carrier + terminations."; + } + + identity one-plus-zero { + base rlt-mode; + description + "1 carrier termination only."; + } + + identity one-plus-one { + base rlt-mode; + description + "1 carrier termination + and 1 protecting carrier termination."; + } + + identity two-plus-zero { + base rlt-mode; + description + "2 bonded carrier terminations."; + } + + /* + * Coding and modulation identities + */ + + identity coding-modulation { + description + "The coding and modulation schemes."; + } + + identity half-bpsk { + base coding-modulation; + description + "Half BPSK coding and modulation scheme."; + } + + identity half-bpsk-strong { + base half-bpsk; + description + "Half BPSK strong coding and modulation scheme."; + } + + identity half-bpsk-light { + base half-bpsk; + description + "Half BPSK light coding and modulation scheme."; + } + + identity bpsk { + base coding-modulation; + description + "BPSK coding and modulation scheme."; + } + + identity bpsk-strong { + base bpsk; + description + "BPSK strong coding and modulation scheme."; + } + + identity bpsk-light { + base bpsk; + description + "BPSK light coding and modulation scheme."; + } + + identity qpsk { + base coding-modulation; + description + "QPSK coding and modulation scheme."; + } + + identity qam-4 { + base coding-modulation; + description + "4 QAM coding and modulation scheme."; + } + + identity qam-4-strong { + base qam-4; + description + "4 QAM strong coding and modulation scheme."; + } + + identity qam-4-light { + base qam-4; + description + "4 QAM light coding and modulation scheme."; + } + + identity qam-16 { + base coding-modulation; + description + "16 QAM coding and modulation scheme."; + } + + identity qam-16-strong { + base qam-16; + description + "16 QAM strong coding and modulation scheme."; + } + + identity qam-16-light { + base qam-16; + description + "16 QAM light coding and modulation scheme."; + } + + identity qam-32 { + base coding-modulation; + description + "32 QAM coding and modulation scheme."; + } + + identity qam-32-strong { + base qam-32; + description + "32 QAM strong coding and modulation scheme."; + } + + identity qam-32-light { + base qam-32; + description + "32 QAM light coding and modulation scheme."; + } + + identity qam-64 { + base coding-modulation; + description + "64 QAM coding and modulation scheme."; + } + + identity qam-64-strong { + base qam-64; + description + "64 QAM strong coding and modulation scheme."; + } + + identity qam-64-light { + base qam-64; + description + "64 QAM light coding and modulation scheme."; + } + + identity qam-128 { + base coding-modulation; + description + "128 QAM coding and modulation scheme."; + } + + identity qam-128-strong { + base qam-128; + description + "128 QAM strong coding and modulation scheme."; + } + + identity qam-128-light { + base qam-128; + description + "128 QAM light coding and modulation scheme."; + } + + identity qam-256 { + base coding-modulation; + description + "256 QAM coding and modulation scheme."; + } + + identity qam-256-strong { + base qam-256; + description + "256 QAM strong coding and modulation scheme."; + } + + identity qam-256-light { + base qam-256; + description + "256 QAM light coding and modulation scheme."; + } + + identity qam-512 { + base coding-modulation; + description + "512 QAM coding and modulation scheme."; + } + + identity qam-512-strong { + base qam-512; + description + "512 QAM strong coding and modulation scheme."; + } + + identity qam-512-light { + base qam-512; + description + "512 QAM light coding and modulation scheme."; + } + + identity qam-1024 { + base coding-modulation; + description + "1024 QAM coding and modulation scheme."; + } + + identity qam-1024-strong { + base qam-1024; + description + "1024 QAM strong coding and modulation scheme."; + } + + identity qam-1024-light { + base qam-1024; + description + "1024 QAM light coding and modulation scheme."; + } + + identity qam-2048 { + base coding-modulation; + description + "2048 QAM coding and modulation scheme."; + } + + identity qam-2048-strong { + base qam-2048; + description + "2048 QAM strong coding and modulation scheme."; + } + + identity qam-2048-light { + base qam-2048; + description + "2048 QAM light coding and modulation scheme."; + } + + identity qam-4096 { + base coding-modulation; + description + "4096 QAM coding and modulation scheme."; + } + + identity qam-4096-strong { + base qam-4096; + description + "4096 QAM strong coding and modulation scheme."; + } + + identity qam-4096-light { + base qam-4096; + description + "4096 QAM light coding and modulation scheme."; + } + + /* + * TDM-type identities + */ + + identity tdm-type { + description + "A description of the type of TDM connection, + also indicating the supported capacity of the + connection."; + } + + identity E1 { + base tdm-type; + description + "E1 connection, 2.048 Mbit/s."; + } + + identity STM-1 { + base tdm-type; + description + "STM-1 connection, 155.52 Mbit/s."; + } +} diff --git a/models/ietf/RFC/ietf-module-tags-state.yang b/models/ietf/RFC/ietf-module-tags-state.yang new file mode 100644 index 0000000000000000000000000000000000000000..f05de10bd528f2cb1d9ee5d371c0b207a687f3ec --- /dev/null +++ b/models/ietf/RFC/ietf-module-tags-state.yang @@ -0,0 +1,94 @@ +module ietf-module-tags-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags-state"; + prefix tags-s; + + import ietf-yang-types { + prefix yang; + } + import ietf-module-tags { + prefix tags; + } + + organization + "IETF NetMod Working Group (NetMod)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Author: Christian Hopps + <mailto:chopps@chopps.org> + + Author: Lou Berger + <mailto:lberger@labn.net> + + Author: Dean Bogdanovic + <mailto:ivandean@gmail.com>"; + + description + "This module describes a mechanism associating tags with YANG + modules. Tags may be IANA assigned or privately defined. + + This is a temporary non-NMDA module that is for use by + implementations that don't yet support NMDA. + + Copyright (c) 2021 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 Simplified 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 8819 + (https://www.rfc-editor.org/info/rfc8819); see the RFC itself + for full legal notices."; + + revision 2021-01-04 { + description + "Initial revision."; + reference + "RFC 8819: YANG Module Tags"; + } + + container module-tags-state { + config false; + status deprecated; + description + "Contains the list of modules and their associated tags."; + list module { + key "name"; + status deprecated; + description + "A list of modules and their associated tags."; + leaf name { + type yang:yang-identifier; + mandatory true; + status deprecated; + description + "The YANG module name."; + } + leaf-list tag { + type tags:tag; + status deprecated; + description + "Tags associated with the module. See the IANA 'YANG + Module Tag Prefixes' registry for reserved prefixes and + the IANA 'IETF YANG Module Tags' registry for IETF tags. + + The contents of this list is constructed using the + following steps: + + 1) System tags (i.e., tags of added by the system) are + added. + 2) User-configured tags (i.e., tags added by + configuration) are added. + 3) Any tag that is equal to a masked-tag present in the + corresponding ietf-module-tags:module-tags:module-tag leaf + list for this module is removed."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-module-tags-state@2021-01-04.yang b/models/ietf/RFC/ietf-module-tags-state@2021-01-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..f05de10bd528f2cb1d9ee5d371c0b207a687f3ec --- /dev/null +++ b/models/ietf/RFC/ietf-module-tags-state@2021-01-04.yang @@ -0,0 +1,94 @@ +module ietf-module-tags-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags-state"; + prefix tags-s; + + import ietf-yang-types { + prefix yang; + } + import ietf-module-tags { + prefix tags; + } + + organization + "IETF NetMod Working Group (NetMod)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Author: Christian Hopps + <mailto:chopps@chopps.org> + + Author: Lou Berger + <mailto:lberger@labn.net> + + Author: Dean Bogdanovic + <mailto:ivandean@gmail.com>"; + + description + "This module describes a mechanism associating tags with YANG + modules. Tags may be IANA assigned or privately defined. + + This is a temporary non-NMDA module that is for use by + implementations that don't yet support NMDA. + + Copyright (c) 2021 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 Simplified 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 8819 + (https://www.rfc-editor.org/info/rfc8819); see the RFC itself + for full legal notices."; + + revision 2021-01-04 { + description + "Initial revision."; + reference + "RFC 8819: YANG Module Tags"; + } + + container module-tags-state { + config false; + status deprecated; + description + "Contains the list of modules and their associated tags."; + list module { + key "name"; + status deprecated; + description + "A list of modules and their associated tags."; + leaf name { + type yang:yang-identifier; + mandatory true; + status deprecated; + description + "The YANG module name."; + } + leaf-list tag { + type tags:tag; + status deprecated; + description + "Tags associated with the module. See the IANA 'YANG + Module Tag Prefixes' registry for reserved prefixes and + the IANA 'IETF YANG Module Tags' registry for IETF tags. + + The contents of this list is constructed using the + following steps: + + 1) System tags (i.e., tags of added by the system) are + added. + 2) User-configured tags (i.e., tags added by + configuration) are added. + 3) Any tag that is equal to a masked-tag present in the + corresponding ietf-module-tags:module-tags:module-tag leaf + list for this module is removed."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-module-tags.yang b/models/ietf/RFC/ietf-module-tags.yang new file mode 100644 index 0000000000000000000000000000000000000000..b4e96567401737d9bd5e60e1d8d8e4334b52ff46 --- /dev/null +++ b/models/ietf/RFC/ietf-module-tags.yang @@ -0,0 +1,118 @@ +module ietf-module-tags { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags"; + prefix tags; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NetMod Working Group (NetMod)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Author: Christian Hopps + <mailto:chopps@chopps.org> + + Author: Lou Berger + <mailto:lberger@labn.net> + + Author: Dean Bogdanovic + <mailto:ivandean@gmail.com>"; + + description + "This module describes a mechanism associating tags with YANG + modules. Tags may be IANA assigned or privately defined. + + Copyright (c) 2021 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 Simplified 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 8819 + (https://www.rfc-editor.org/info/rfc8819); 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 2021-01-04 { + description + "Initial revision."; + reference + "RFC 8819: YANG Module Tags"; + } + + typedef tag { + type string { + length "1..max"; + pattern '[\S ]+'; + } + description + "A tag is a type of 'string' value that does not include + carriage return, newline, or tab characters. It SHOULD begin + with a registered prefix; however, tags without a registered + prefix SHOULD NOT be treated as invalid."; + } + + extension module-tag { + argument tag; + description + "The argument 'tag' is of type 'tag'. This extension statement + is used by module authors to indicate the tags that SHOULD be + added automatically by the system. As such, the origin of the + value for the predefined tags should be set to 'system' + [RFC8342]."; + } + + container module-tags { + description + "Contains the list of modules and their associated tags."; + list module { + key "name"; + description + "A list of modules and their associated tags."; + leaf name { + type yang:yang-identifier; + mandatory true; + description + "The YANG module name."; + } + leaf-list tag { + type tag; + description + "Tags associated with the module. See the IANA 'YANG + Module Tag Prefixes' registry for reserved prefixes and + the IANA 'IETF YANG Module Tags' registry for IETF tags. + + The 'operational' state [RFC8342] view of this list is + constructed using the following steps: + + 1) System tags (i.e., tags of 'system' origin) are added. + 2) User-configured tags (i.e., tags of 'intended' origin) + are added. + 3) Any tag that is equal to a masked-tag is removed."; + } + leaf-list masked-tag { + type tag; + description + "The list of tags that should not be associated with this + module. The user can remove (mask) tags from the + operational state datastore [RFC8342] by adding them to + this list. It is not an error to add tags to this list + that are not associated with the module, but they have no + operational effect."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-module-tags@2021-01-04.yang b/models/ietf/RFC/ietf-module-tags@2021-01-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..b4e96567401737d9bd5e60e1d8d8e4334b52ff46 --- /dev/null +++ b/models/ietf/RFC/ietf-module-tags@2021-01-04.yang @@ -0,0 +1,118 @@ +module ietf-module-tags { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags"; + prefix tags; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NetMod Working Group (NetMod)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Author: Christian Hopps + <mailto:chopps@chopps.org> + + Author: Lou Berger + <mailto:lberger@labn.net> + + Author: Dean Bogdanovic + <mailto:ivandean@gmail.com>"; + + description + "This module describes a mechanism associating tags with YANG + modules. Tags may be IANA assigned or privately defined. + + Copyright (c) 2021 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 Simplified 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 8819 + (https://www.rfc-editor.org/info/rfc8819); 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 2021-01-04 { + description + "Initial revision."; + reference + "RFC 8819: YANG Module Tags"; + } + + typedef tag { + type string { + length "1..max"; + pattern '[\S ]+'; + } + description + "A tag is a type of 'string' value that does not include + carriage return, newline, or tab characters. It SHOULD begin + with a registered prefix; however, tags without a registered + prefix SHOULD NOT be treated as invalid."; + } + + extension module-tag { + argument tag; + description + "The argument 'tag' is of type 'tag'. This extension statement + is used by module authors to indicate the tags that SHOULD be + added automatically by the system. As such, the origin of the + value for the predefined tags should be set to 'system' + [RFC8342]."; + } + + container module-tags { + description + "Contains the list of modules and their associated tags."; + list module { + key "name"; + description + "A list of modules and their associated tags."; + leaf name { + type yang:yang-identifier; + mandatory true; + description + "The YANG module name."; + } + leaf-list tag { + type tag; + description + "Tags associated with the module. See the IANA 'YANG + Module Tag Prefixes' registry for reserved prefixes and + the IANA 'IETF YANG Module Tags' registry for IETF tags. + + The 'operational' state [RFC8342] view of this list is + constructed using the following steps: + + 1) System tags (i.e., tags of 'system' origin) are added. + 2) User-configured tags (i.e., tags of 'intended' origin) + are added. + 3) Any tag that is equal to a masked-tag is removed."; + } + leaf-list masked-tag { + type tag; + description + "The list of tags that should not be associated with this + module. The user can remove (mask) tags from the + operational state datastore [RFC8342] by adding them to + this list. It is not an error to add tags to this list + that are not associated with the module, but they have no + operational effect."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-mpls.yang b/models/ietf/RFC/ietf-mpls.yang new file mode 100644 index 0000000000000000000000000000000000000000..2d3d5046bcf952dda8763cdcc388bbe3ee77f787 --- /dev/null +++ b/models/ietf/RFC/ietf-mpls.yang @@ -0,0 +1,463 @@ +module ietf-mpls { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-mpls"; + + prefix mpls; + + import ietf-routing { + prefix rt; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + organization + "IETF MPLS Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/mpls/> + WG List: <mailto:mpls@ietf.org> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Kamran Raza + <mailto:skraza@cisco.com> + + Editor: Rakesh Gandhi + <mailto:rgandhi@cisco.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net>"; + description + "This YANG module defines the essential components for the + management of the MPLS subsystem. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2020 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 Simplified 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 8960; see the + RFC itself for full legal notices."; + + revision 2020-12-18 { + description + "Initial revision."; + reference + "RFC 8960: A YANG Data Model for MPLS Base"; + } + + /* Identities */ + + identity mpls { + base rt:address-family; + description + "This identity represents the MPLS address family."; + } + + identity mpls-unicast { + base mpls:mpls; + description + "This identity represents the MPLS unicast address family."; + } + + identity label-block-alloc-mode { + description + "Base identity for label-block allocation mode."; + } + + identity label-block-alloc-mode-manager { + base label-block-alloc-mode; + description + "Label-block allocation on the reserved block + is managed by the label manager."; + } + + identity label-block-alloc-mode-application { + base label-block-alloc-mode; + description + "Label-block allocation on the reserved block + is managed by the application."; + } + + /** + * Typedefs + */ + + typedef mpls-operations-type { + type enumeration { + enum impose-and-forward { + description + "Operation to impose one or more outgoing labels and + forward to the next hop."; + } + enum pop-and-forward { + description + "Operation to pop the incoming label and forward to the + next hop."; + } + enum pop-impose-and-forward { + description + "Operation to pop the incoming label, impose one or more + outgoing labels, and forward to the next hop."; + } + enum swap-and-forward { + description + "Operation to swap the incoming label with the outgoing + label and forward to the next hop."; + } + enum pop-and-lookup { + description + "Operation to pop the incoming label and perform + a lookup."; + } + } + description + "Types of MPLS operations."; + } + + typedef nhlfe-role { + type enumeration { + enum primary { + description + "The next hop acts as the primary for carrying traffic."; + } + enum backup { + description + "The next hop acts as the backup."; + } + enum primary-and-backup { + description + "The next hop simultaneously acts as both the primary and + the backup for carrying traffic."; + } + } + description + "Role of the next hop."; + } + + grouping nhlfe-single-contents { + description + "A grouping that describes a single Next Hop Label Forwarding + Entry (NHLFE) and its associated parameters as described in + the MPLS architecture. This grouping is specific to the case + when a single next hop is associated with the route."; + uses rt-types:mpls-label-stack; + } + + grouping nhlfe-multiple-contents { + description + "A grouping that describes a set of NHLFEs and their + associated parameters as described in the MPLS + architecture. This grouping is used when multiple next hops + are associated with the route."; + leaf index { + type string; + description + "A user-specified identifier utilized to uniquely + reference the next-hop entry in the next-hop list. + The value of this index has no semantic meaning + other than for referencing the entry."; + } + leaf backup-index { + type string; + description + "A user-specified identifier utilized to uniquely + reference the backup next-hop entry in the NHLFE list. + The value of this index has no semantic meaning + other than for referencing the entry."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels + RFC 5714: IP Fast Reroute Framework"; + } + leaf loadshare { + type uint16; + default "1"; + description + "This value is used to compute a load share to perform + unequal load balancing when multiple outgoing next hops are + specified. A share is computed as a ratio of this number to + the total under all next hops."; + reference + "RFC 3031: Multiprotocol Label Switching Architecture, + Sections 3.11 and 3.12 + RFC 7424: Mechanisms for Optimizing Link Aggregation Group + (LAG) and Equal-Cost Multipath (ECMP) Component Link + Utilization in Networks, Section 5.4"; + } + leaf role { + type nhlfe-role; + description + "Role of the NHLFE."; + } + uses nhlfe-single-contents; + } + + grouping interfaces-mpls { + description + "List of MPLS interfaces."; + container interfaces { + description + "List of MPLS-enabled interfaces."; + list interface { + key "name"; + description + "MPLS-enabled interface entry."; + leaf name { + type if:interface-ref; + description + "A reference to the name of an interface in the system + that is to be enabled for MPLS."; + } + leaf mpls-enabled { + type boolean; + default "false"; + description + "'true' if MPLS encapsulation is enabled on the + interface. + 'false' if MPLS encapsulation is disabled on the + interface."; + } + leaf maximum-labeled-packet { + type uint32; + units "octets"; + description + "Maximum labeled packet size."; + reference + "RFC 3032: MPLS Label Stack Encoding, Section 3.2"; + } + } + } + } + + grouping globals { + description + "MPLS global configuration grouping."; + leaf ttl-propagate { + type boolean; + default "true"; + description + "Propagate TTL between IP and MPLS."; + } + } + + grouping label-blocks { + description + "Label-block allocation grouping."; + container mpls-label-blocks { + description + "Label-block allocation container."; + list mpls-label-block { + key "index"; + description + "List of MPLS label blocks."; + leaf index { + type string; + description + "A user-specified identifier utilized to uniquely + reference an MPLS label block."; + } + leaf start-label { + type rt-types:mpls-label; + must '. <= ../end-label' { + error-message "'start-label' must be less than or equal " + + "to 'end-label'"; + } + description + "Label-block start."; + } + leaf end-label { + type rt-types:mpls-label; + must '. >= ../start-label' { + error-message "'end-label' must be greater than or " + + "equal to 'start-label'"; + } + description + "Label-block end."; + } + leaf block-allocation-mode { + type identityref { + base label-block-alloc-mode; + } + description + "Label-block allocation mode."; + } + leaf inuse-labels-count { + when "derived-from-or-self(../block-allocation-mode, " + + "'mpls:label-block-alloc-mode-manager')"; + type yang:gauge32; + config false; + description + "Number of labels in use in the label block."; + } + } + } + } + + grouping rib-mpls-properties { + description + "A grouping of native MPLS RIB properties."; + leaf destination-prefix { + type leafref { + path "../mpls-local-label"; + } + description + "MPLS destination prefix."; + } + leaf route-context { + type string; + description + "A context associated with the native MPLS route."; + } + } + + grouping rib-active-route-mpls-input { + description + "A grouping applicable to native MPLS RIB 'active-route' + RPC input augmentation."; + leaf destination-address { + type leafref { + path "../mpls-local-label"; + } + description + "MPLS native 'active-route' destination."; + } + leaf mpls-local-label { + type rt-types:mpls-label; + description + "MPLS local label."; + } + } + + augment "/rt:routing" { + description + "MPLS augmentation."; + container mpls { + description + "MPLS container to be used as an augmentation target node + for the configuration of other MPLS sub-features, e.g., + MPLS static Label Switched Paths (LSPs), MPLS LDP LSPs, + and Traffic Engineering MPLS LSP Tunnels."; + uses globals; + uses label-blocks; + uses interfaces-mpls; + } + } + + /* Augmentation of MPLS routes */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { + description + "This augmentation is applicable to all MPLS routes."; + leaf mpls-enabled { + type boolean; + default "false"; + description + "Indicates whether MPLS is enabled for this route."; + } + leaf mpls-local-label { + when "../mpls-enabled = 'true'"; + type rt-types:mpls-label; + description + "MPLS local label associated with the route."; + } + uses rib-mpls-properties { + /* MPLS Address Family (AF) augmentation to the + native MPLS RIB */ + when "derived-from-or-self(../../rt:address-family, " + + "'mpls:mpls')" { + description + "This augment is valid only for routes of the native MPLS + RIB."; + } + } + } + + /* MPLS simple-next-hop augmentation */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + description + "Augments the 'simple-next-hop' case in IP unicast routes."; + uses nhlfe-single-contents { + when "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" + + "/mpls:mpls-enabled = 'true'"; + } + } + + /* MPLS next-hop-list augmentation */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + description + "This leaf augments the 'next-hop-list' case of IP unicast + routes."; + uses nhlfe-multiple-contents { + when "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" + + "/mpls:mpls-enabled = 'true'"; + } + } + + /* MPLS RPC input augmentation */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { + description + "Input MPLS augmentation for the 'active-route' action + statement."; + uses rib-active-route-mpls-input { + /* MPLS AF augmentation to the native MPLS RIB */ + when "derived-from-or-self(../rt:address-family, " + + "'mpls:mpls')" { + description + "This augment is valid only for routes of the native MPLS + RIB."; + } + } + } + + /* MPLS RPC output augmentation */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + description + "Output MPLS augmentation for the 'active-route' action + statement."; + uses nhlfe-single-contents; + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + description + "Output MPLS augmentation for the 'active-route' action + statement."; + uses nhlfe-multiple-contents; + } +} diff --git a/models/ietf/RFC/ietf-mpls@2020-12-18.yang b/models/ietf/RFC/ietf-mpls@2020-12-18.yang new file mode 100644 index 0000000000000000000000000000000000000000..2d3d5046bcf952dda8763cdcc388bbe3ee77f787 --- /dev/null +++ b/models/ietf/RFC/ietf-mpls@2020-12-18.yang @@ -0,0 +1,463 @@ +module ietf-mpls { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-mpls"; + + prefix mpls; + + import ietf-routing { + prefix rt; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + organization + "IETF MPLS Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/mpls/> + WG List: <mailto:mpls@ietf.org> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Kamran Raza + <mailto:skraza@cisco.com> + + Editor: Rakesh Gandhi + <mailto:rgandhi@cisco.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net>"; + description + "This YANG module defines the essential components for the + management of the MPLS subsystem. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2020 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 Simplified 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 8960; see the + RFC itself for full legal notices."; + + revision 2020-12-18 { + description + "Initial revision."; + reference + "RFC 8960: A YANG Data Model for MPLS Base"; + } + + /* Identities */ + + identity mpls { + base rt:address-family; + description + "This identity represents the MPLS address family."; + } + + identity mpls-unicast { + base mpls:mpls; + description + "This identity represents the MPLS unicast address family."; + } + + identity label-block-alloc-mode { + description + "Base identity for label-block allocation mode."; + } + + identity label-block-alloc-mode-manager { + base label-block-alloc-mode; + description + "Label-block allocation on the reserved block + is managed by the label manager."; + } + + identity label-block-alloc-mode-application { + base label-block-alloc-mode; + description + "Label-block allocation on the reserved block + is managed by the application."; + } + + /** + * Typedefs + */ + + typedef mpls-operations-type { + type enumeration { + enum impose-and-forward { + description + "Operation to impose one or more outgoing labels and + forward to the next hop."; + } + enum pop-and-forward { + description + "Operation to pop the incoming label and forward to the + next hop."; + } + enum pop-impose-and-forward { + description + "Operation to pop the incoming label, impose one or more + outgoing labels, and forward to the next hop."; + } + enum swap-and-forward { + description + "Operation to swap the incoming label with the outgoing + label and forward to the next hop."; + } + enum pop-and-lookup { + description + "Operation to pop the incoming label and perform + a lookup."; + } + } + description + "Types of MPLS operations."; + } + + typedef nhlfe-role { + type enumeration { + enum primary { + description + "The next hop acts as the primary for carrying traffic."; + } + enum backup { + description + "The next hop acts as the backup."; + } + enum primary-and-backup { + description + "The next hop simultaneously acts as both the primary and + the backup for carrying traffic."; + } + } + description + "Role of the next hop."; + } + + grouping nhlfe-single-contents { + description + "A grouping that describes a single Next Hop Label Forwarding + Entry (NHLFE) and its associated parameters as described in + the MPLS architecture. This grouping is specific to the case + when a single next hop is associated with the route."; + uses rt-types:mpls-label-stack; + } + + grouping nhlfe-multiple-contents { + description + "A grouping that describes a set of NHLFEs and their + associated parameters as described in the MPLS + architecture. This grouping is used when multiple next hops + are associated with the route."; + leaf index { + type string; + description + "A user-specified identifier utilized to uniquely + reference the next-hop entry in the next-hop list. + The value of this index has no semantic meaning + other than for referencing the entry."; + } + leaf backup-index { + type string; + description + "A user-specified identifier utilized to uniquely + reference the backup next-hop entry in the NHLFE list. + The value of this index has no semantic meaning + other than for referencing the entry."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels + RFC 5714: IP Fast Reroute Framework"; + } + leaf loadshare { + type uint16; + default "1"; + description + "This value is used to compute a load share to perform + unequal load balancing when multiple outgoing next hops are + specified. A share is computed as a ratio of this number to + the total under all next hops."; + reference + "RFC 3031: Multiprotocol Label Switching Architecture, + Sections 3.11 and 3.12 + RFC 7424: Mechanisms for Optimizing Link Aggregation Group + (LAG) and Equal-Cost Multipath (ECMP) Component Link + Utilization in Networks, Section 5.4"; + } + leaf role { + type nhlfe-role; + description + "Role of the NHLFE."; + } + uses nhlfe-single-contents; + } + + grouping interfaces-mpls { + description + "List of MPLS interfaces."; + container interfaces { + description + "List of MPLS-enabled interfaces."; + list interface { + key "name"; + description + "MPLS-enabled interface entry."; + leaf name { + type if:interface-ref; + description + "A reference to the name of an interface in the system + that is to be enabled for MPLS."; + } + leaf mpls-enabled { + type boolean; + default "false"; + description + "'true' if MPLS encapsulation is enabled on the + interface. + 'false' if MPLS encapsulation is disabled on the + interface."; + } + leaf maximum-labeled-packet { + type uint32; + units "octets"; + description + "Maximum labeled packet size."; + reference + "RFC 3032: MPLS Label Stack Encoding, Section 3.2"; + } + } + } + } + + grouping globals { + description + "MPLS global configuration grouping."; + leaf ttl-propagate { + type boolean; + default "true"; + description + "Propagate TTL between IP and MPLS."; + } + } + + grouping label-blocks { + description + "Label-block allocation grouping."; + container mpls-label-blocks { + description + "Label-block allocation container."; + list mpls-label-block { + key "index"; + description + "List of MPLS label blocks."; + leaf index { + type string; + description + "A user-specified identifier utilized to uniquely + reference an MPLS label block."; + } + leaf start-label { + type rt-types:mpls-label; + must '. <= ../end-label' { + error-message "'start-label' must be less than or equal " + + "to 'end-label'"; + } + description + "Label-block start."; + } + leaf end-label { + type rt-types:mpls-label; + must '. >= ../start-label' { + error-message "'end-label' must be greater than or " + + "equal to 'start-label'"; + } + description + "Label-block end."; + } + leaf block-allocation-mode { + type identityref { + base label-block-alloc-mode; + } + description + "Label-block allocation mode."; + } + leaf inuse-labels-count { + when "derived-from-or-self(../block-allocation-mode, " + + "'mpls:label-block-alloc-mode-manager')"; + type yang:gauge32; + config false; + description + "Number of labels in use in the label block."; + } + } + } + } + + grouping rib-mpls-properties { + description + "A grouping of native MPLS RIB properties."; + leaf destination-prefix { + type leafref { + path "../mpls-local-label"; + } + description + "MPLS destination prefix."; + } + leaf route-context { + type string; + description + "A context associated with the native MPLS route."; + } + } + + grouping rib-active-route-mpls-input { + description + "A grouping applicable to native MPLS RIB 'active-route' + RPC input augmentation."; + leaf destination-address { + type leafref { + path "../mpls-local-label"; + } + description + "MPLS native 'active-route' destination."; + } + leaf mpls-local-label { + type rt-types:mpls-label; + description + "MPLS local label."; + } + } + + augment "/rt:routing" { + description + "MPLS augmentation."; + container mpls { + description + "MPLS container to be used as an augmentation target node + for the configuration of other MPLS sub-features, e.g., + MPLS static Label Switched Paths (LSPs), MPLS LDP LSPs, + and Traffic Engineering MPLS LSP Tunnels."; + uses globals; + uses label-blocks; + uses interfaces-mpls; + } + } + + /* Augmentation of MPLS routes */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { + description + "This augmentation is applicable to all MPLS routes."; + leaf mpls-enabled { + type boolean; + default "false"; + description + "Indicates whether MPLS is enabled for this route."; + } + leaf mpls-local-label { + when "../mpls-enabled = 'true'"; + type rt-types:mpls-label; + description + "MPLS local label associated with the route."; + } + uses rib-mpls-properties { + /* MPLS Address Family (AF) augmentation to the + native MPLS RIB */ + when "derived-from-or-self(../../rt:address-family, " + + "'mpls:mpls')" { + description + "This augment is valid only for routes of the native MPLS + RIB."; + } + } + } + + /* MPLS simple-next-hop augmentation */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + description + "Augments the 'simple-next-hop' case in IP unicast routes."; + uses nhlfe-single-contents { + when "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" + + "/mpls:mpls-enabled = 'true'"; + } + } + + /* MPLS next-hop-list augmentation */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + description + "This leaf augments the 'next-hop-list' case of IP unicast + routes."; + uses nhlfe-multiple-contents { + when "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" + + "/mpls:mpls-enabled = 'true'"; + } + } + + /* MPLS RPC input augmentation */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { + description + "Input MPLS augmentation for the 'active-route' action + statement."; + uses rib-active-route-mpls-input { + /* MPLS AF augmentation to the native MPLS RIB */ + when "derived-from-or-self(../rt:address-family, " + + "'mpls:mpls')" { + description + "This augment is valid only for routes of the native MPLS + RIB."; + } + } + } + + /* MPLS RPC output augmentation */ + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + description + "Output MPLS augmentation for the 'active-route' action + statement."; + uses nhlfe-single-contents; + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + description + "Output MPLS augmentation for the 'active-route' action + statement."; + uses nhlfe-multiple-contents; + } +} diff --git a/models/ietf/RFC/ietf-msdp.yang b/models/ietf/RFC/ietf-msdp.yang new file mode 100644 index 0000000000000000000000000000000000000000..ba42b978a80f90b1ad72e83b6e898582ba17cad8 --- /dev/null +++ b/models/ietf/RFC/ietf-msdp.yang @@ -0,0 +1,800 @@ +module ietf-msdp { + + yang-version 1.1; + + namespace "urn:ietf:params:xml:ns:yang:ietf-msdp"; + prefix msdp; + + import ietf-yang-types { + prefix "yang"; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-inet-types { + prefix "inet"; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-routing { + prefix "rt"; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + import ietf-interfaces { + prefix "if"; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + import ietf-ip { + prefix "ip"; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + + import ietf-key-chain { + prefix "key-chain"; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + + import ietf-routing-types { + prefix "rt-types"; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + + import ietf-access-control-list { + prefix acl; + reference + "RFC 8519: YANG Data Model for Network Access Control Lists + (ACLs)"; + } + + organization + "IETF Protocols for IP Multicast (pim) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/pim/> + WG List: <mailto:pim@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Zheng Zhang + <mailto:zhang.zheng@zte.com.cn> + + Editor: Anish Peter + <mailto:anish.ietf@gmail.com> + + Editor: Mahesh Sivakumar + <mailto:sivakumar.mahesh@gmail.com> + + Editor: Feng Guo + <mailto:guofeng@huawei.com> + + Editor: Pete McAllister + <mailto:pete.mcallister@metaswitch.com>"; + + description + "This module defines the YANG data model definitions for the + Multicast Source Discovery Protocol (MSDP). + + 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. + + Copyright (c) 2020 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 Simplified 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 8916; see the + RFC itself for full legal notices."; + + revision 2020-10-31 { + description + "Initial revision."; + reference + "RFC 8916: A YANG Data Model for the Multicast Source + Discovery Protocol (MSDP)"; + } + + /* + * Features + */ + + feature filter-policy { + description + "Support policy configuration of peer/message filtering."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + + feature peer-as-verification { + description + "Support configuration of a peer's Autonomous System Number + (ASN)."; + reference + "RFC 4271: A Border Gateway Protocol 4 (BGP-4)"; + } + + feature peer-authentication { + description + "Support configuration of peer authentication."; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + + /* + * Identities + */ + + identity msdp { + base rt:control-plane-protocol; + description + "Identity for the Multicast Source Discovery Protocol (MSDP)."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP)"; + } + + /* + * Groupings + */ + grouping authentication-container { + description + "Authentication attributes."; + container authentication { + if-feature peer-authentication; + description + "A container defining authentication attributes."; + choice authentication-type { + case key-chain { + leaf key-chain { + type key-chain:key-chain-ref; + description + "Reference to a key-chain."; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + } + case password { + leaf key { + type string; + description + "This leaf specifies the authentication key."; + } + leaf crypto-algorithm { + type identityref { + base key-chain:crypto-algorithm; + } + must "derived-from-or-self(., 'key-chain:md5')" { + error-message + "Only the md5 algorithm can be used for MSDP."; + description + "Check for crypto-algorithm."; + } + description + "Cryptographic algorithm associated with a key. + Only the md5 algorithm can be used for MSDP. + When 'md5' is specified, MSDP control messages + are secured by TCP MD5 signatures as described + in RFCs 3618 and 5925. Both peers of a + connection SHOULD be configured to the same + algorithm for the connection to be established. + When this leaf is not configured, unauthenticated + TCP is used."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP) + RFC 5925: The TCP Authentication Option + RFC 8177: YANG Data Model for Key Chains"; + } + } + description + "Choice of authentication."; + } + } + } // authentication-container + + grouping tcp-connect-source { + description + "Attribute to configure a peer TCP connection source."; + leaf tcp-connection-source { + type if:interface-ref; + must "/if:interfaces/if:interface[if:name = current()]/" + + "ip:ipv4/ip:enabled != 'false'" { + error-message + "The interface must have IPv4 enabled."; + description + "The interface must have IPv4 enabled."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + description + "The interface is to be the source for the TCP + connection. It is a reference to an entry in the global + interface list."; + } + } // tcp-connect-source + + grouping global-config-attributes { + description + "Global MSDP configuration."; + + uses tcp-connect-source; + + list default-peer { + if-feature filter-policy; + key "peer-addr prefix-policy"; + + description + "The default peer accepts all MSDP Source-Active (SA) + messages. A default peer is needed in topologies where + MSDP peers do not coexist with BGP peers. The Reverse Path + Forwarding (RPF) check on SA messages will fail, and no + SA messages will be accepted. In these cases, you can + configure the peer as a default peer and bypass + RPF checks."; + + leaf peer-addr { + type leafref { + path "../../../peers/peer/address"; + } + mandatory true; + description + "Reference to a peer that is in the peer list."; + } + leaf prefix-policy { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "If specified, only those SA entries whose Rendezvous + Point (RP) is permitted in the prefix list are allowed; + if not specified, all SA messages from the default + peer are accepted."; + reference + "RFC 7761: Protocol Independent Multicast - Sparse Mode + (PIM-SM): Protocol Specification (Revised) + RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + } // default-peer + + container originating-rp { + description + "The container of the originating RP."; + leaf interface { + type if:interface-ref; + must "/if:interfaces/if:interface[if:name = current()]/" + + "ip:ipv4/ip:enabled != 'false'" { + error-message + "The interface must have IPv4 enabled."; + description + "The interface must have IPv4 enabled."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + description + "Reference to an entry in the global interface list. + The IP address of the interface used in the RP field of + an SA message entry. When anycast RPs are used, all RPs + use the same IP address. This parameter can be used to + define a unique IP address for the RP of each MSDP peer. + By default, the software uses the RP address of the + local system."; + } + } // originating-rp + + uses sa-filter-container; + + leaf sa-limit { + type uint32; + description + "A limit on the number of SA entries accepted. + If not configured or the value is 0, there is no limit."; + } + uses ttl-threshold; + } // global-config-attributes + + grouping peer-config-attributes { + description + "Per-peer configuration for MSDP."; + + uses authentication-container; + leaf enabled { + type boolean; + description + "'true' if the peer is enabled; + 'false' if the peer is disabled."; + } + uses tcp-connect-source; + + leaf description { + type string; + description + "The peer description."; + } + leaf mesh-group { + type string; + description + "The name of the mesh-group to which this peer belongs."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP), + Section 10.2"; + } + leaf peer-as { + if-feature peer-as-verification; + type inet:as-number; + description + "The peer's ASN. Using peer-as to perform the verification + can provide more controlled ability. The value can be + compared with the BGP peer's ASN. If they are different, + the SA information that comes from this peer may be + rejected. If the ASN is the same as the local ASN, then + the peer is within the same domain; otherwise, this peer + is external to the domain. This is comparable to the + definition and usage in BGP; see RFC 4271."; + reference + "RFC 4271: A Border Gateway Protocol 4 (BGP-4)"; + } + uses sa-filter-container; + leaf sa-limit { + type uint32; + description + "A limit on the number of SA entries accepted from this + peer. + If not configured or the value is 0, there is no limit."; + } + container timer { + description + "Timer attributes."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP), + Section 5"; + leaf connect-retry-interval { + type uint16; + units seconds; + default 30; + description + "The peer timer for connect-retry. By default, MSDP peers + wait 30 seconds after the session is reset."; + } + leaf holdtime-interval { + type uint16 { + range "3..65535"; + } + units seconds; + default 75; + description + "The SA hold-down period of this MSDP peer."; + } + leaf keepalive-interval { + type uint16 { + range "1..65535"; + } + units seconds; + must '. < ../holdtime-interval' { + error-message + "The keepalive interval must be smaller than the " + + "hold-time interval."; + } + default 60; + description + "The keepalive timer of this MSDP peer."; + } + } // timer + uses ttl-threshold; + } // peer-config-attributes + + grouping peer-state-attributes { + description + "Per-peer state attributes for MSDP."; + + leaf session-state { + type enumeration { + enum disabled { + description + "Disabled."; + } + enum inactive { + description + "Inactive."; + } + enum listen { + description + "Listen."; + } + enum connecting { + description + "Connecting."; + } + enum established { + description + "Established."; + } + } + config false; + description + "The peer's session state."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP), + Section 11"; + } + leaf elapsed-time { + type yang:gauge32; + units seconds; + config false; + description + "Elapsed time for being in a state."; + } + leaf connect-retry-expire { + type uint32; + units seconds; + config false; + description + "Connect retry expire time of a peer connection."; + } + leaf hold-expire { + type uint16; + units seconds; + config false; + description + "Hold expire time of a peer connection."; + } + leaf is-default-peer { + type boolean; + config false; + description + "'true' if this peer is one of the default peers."; + } + leaf keepalive-expire { + type uint16; + units seconds; + config false; + description + "Keepalive expire time of this peer."; + } + leaf reset-count { + type yang:zero-based-counter32; + config false; + description + "The reset count of this peer."; + } + + container statistics { + config false; + description + "A container defining statistics attributes."; + + leaf discontinuity-time { + type yang:date-and-time; + description + "The time on the most recent occasion at which any one + or more of the statistics counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local + management subsystem, then this node contains the time + the local management subsystem re-initialized itself."; + } + + container error { + description + "A grouping defining error statistics attributes."; + leaf rpf-failure { + type uint32; + description + "The number of RPF failures."; + } + } + + container queue { + description + "A container that includes queue statistics attributes."; + leaf size-in { + type uint32; + description + "The number of messages received from the peer + currently queued."; + } + leaf size-out { + type uint32; + description + "The number of messages queued to be sent to the peer."; + } + } + + container received { + description + "Received message counters."; + uses statistics-sent-received; + } + container sent { + description + "Sent message counters."; + uses statistics-sent-received; + } + } // statistics + } // peer-state-attributes + + grouping sa-filter-container { + description + "A container defining SA filters."; + container sa-filter { + description + "Specifies an Access Control List (ACL) to filter SA messages + coming into or going out of the peer."; + leaf in { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "Filters incoming SA messages only. + The value is the name to uniquely identify a + policy that contains one or more rules used to + accept or reject MSDP SA messages. + If the policy is not specified, all MSDP SA messages are + accepted."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + leaf out { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "Filters outgoing SA messages only. + The value is the name to uniquely identify a + policy that contains one or more rules used to + accept or reject MSDP SA messages. + If the policy is not specified, all MSDP SA messages are + sent."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + } // sa-filter + } // sa-filter-container + + grouping ttl-threshold { + description + "Attribute to configure the TTL threshold."; + leaf ttl-threshold { + type uint8 { + range 1..255; + } + description + "The maximum number of hops data packets can traverse + before being dropped."; + } + } // ttl-threshold + + grouping statistics-sent-received { + description + "A grouping defining sent and received statistics attributes."; + leaf keepalive { + type yang:counter64; + description + "The number of keepalive messages."; + } + leaf notification { + type yang:counter64; + description + "The number of notification messages."; + } + leaf sa-message { + type yang:counter64; + description + "The number of SA messages."; + } + leaf sa-response { + type yang:counter64; + description + "The number of SA response messages."; + } + leaf sa-request { + type yang:counter64; + description + "The number of SA request messages."; + } + leaf total { + type yang:counter64; + description + "The number of total messages."; + } + } // statistics-sent-received + + /* + * Data nodes + */ + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol" { + when "derived-from-or-self(rt:type, 'msdp:msdp')" { + description + "This augmentation is only valid for a routing protocol + instance of MSDP."; + } + description + "MSDP augmentation to routing control-plane protocol + configuration and state."; + container msdp { + description + "MSDP configuration and operational state data."; + + container global { + description + "Global attributes."; + uses global-config-attributes; + } + + container peers { + description + "Contains a list of peers."; + list peer { + key "address"; + description + "A list of MSDP peers."; + leaf address { + type inet:ipv4-address; + description + "The address of the peer."; + } + action clear-peer { + description + "Clears the TCP connection to the peer."; + } + uses peer-config-attributes; + uses peer-state-attributes; + } + } + + action clear-all-peers { + description + "All peers' TCP connections are cleared."; + } + + container sa-cache { + config false; + description + "The SA cache information."; + list entry { + key "group source-addr"; + description + "A list of SA cache entries."; + leaf group { + type rt-types:ipv4-multicast-group-address; + description + "The group address of this SA cache."; + } + leaf source-addr { + type rt-types:ipv4-multicast-source-address; + description + "Source IPv4 address."; + } + list origin-rp { + key "rp-address"; + description + "Information regarding the originating RP."; + leaf rp-address { + type inet:ipv4-address; + description + "The RP address. This is the IP address used in the + RP field of an SA message entry."; + } + leaf is-local-rp { + type boolean; + description + "'true' if the RP is local; + 'false' if the RP is not local."; + } + leaf sa-adv-expire { + type uint32; + units seconds; + description + "The remaining time duration before expiration + of the periodic SA advertisement timer on a + local RP."; + } + } + + container state-attributes { + description + "SA cache state attributes for MSDP."; + + leaf up-time { + type yang:gauge32; + units seconds; + description + "Indicates the duration time when this SA entry is + created in the cache. MSDP is a periodic protocol; + the value can be used to check the state of the + SA cache."; + } + leaf expire { + type yang:gauge32; + units seconds; + description + "Indicates the duration time when this SA entry in + the cache times out. MSDP is a periodic protocol; + the value can be used to check the state of the + SA cache."; + } + leaf holddown-interval { + type uint32; + units seconds; + description + "Hold-down timer value for SA forwarding."; + reference + "RFC 3618: Multicast Source Discovery Protocol + (MSDP), Section 5.3"; + } + leaf peer-learned-from { + type inet:ipv4-address; + description + "The address of the peer from which we learned this + SA information."; + } + leaf rpf-peer { + type inet:ipv4-address; + description + "The address is the SA's originating RP."; + } + } // state-attributes + } // entry + + action clear { + description + "Clears MSDP SA cache entries."; + input { + container entry { + presence "If a particular entry is cleared."; + description + "The SA cache (S,G) or (*,G) entry to be cleared. + If this is not provided, all entries are cleared."; + leaf group { + type rt-types:ipv4-multicast-group-address; + mandatory true; + description + "The group address."; + } + leaf source-addr { + type rt-types:ipv4-multicast-source-address; + description + "The address of the multicast source to be cleared. + If this is not provided, then all entries related + to the given group are cleared."; + } + } + leaf peer-address { + type inet:ipv4-address; + description + "The peer IP address from which MSDP SA cache entries + have been learned. If this is not provided, entries + learned from all peers are cleared."; + } + leaf peer-as { + type inet:as-number; + description + "The ASN from which MSDP SA cache entries have been + learned. If this is not provided, entries learned + from all ASes are cleared."; + } + } + } // clear + } // sa-cache + } // msdp + } // augment +} diff --git a/models/ietf/RFC/ietf-msdp@2020-10-31.yang b/models/ietf/RFC/ietf-msdp@2020-10-31.yang new file mode 100644 index 0000000000000000000000000000000000000000..ba42b978a80f90b1ad72e83b6e898582ba17cad8 --- /dev/null +++ b/models/ietf/RFC/ietf-msdp@2020-10-31.yang @@ -0,0 +1,800 @@ +module ietf-msdp { + + yang-version 1.1; + + namespace "urn:ietf:params:xml:ns:yang:ietf-msdp"; + prefix msdp; + + import ietf-yang-types { + prefix "yang"; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-inet-types { + prefix "inet"; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-routing { + prefix "rt"; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + import ietf-interfaces { + prefix "if"; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + import ietf-ip { + prefix "ip"; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + + import ietf-key-chain { + prefix "key-chain"; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + + import ietf-routing-types { + prefix "rt-types"; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + + import ietf-access-control-list { + prefix acl; + reference + "RFC 8519: YANG Data Model for Network Access Control Lists + (ACLs)"; + } + + organization + "IETF Protocols for IP Multicast (pim) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/pim/> + WG List: <mailto:pim@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Zheng Zhang + <mailto:zhang.zheng@zte.com.cn> + + Editor: Anish Peter + <mailto:anish.ietf@gmail.com> + + Editor: Mahesh Sivakumar + <mailto:sivakumar.mahesh@gmail.com> + + Editor: Feng Guo + <mailto:guofeng@huawei.com> + + Editor: Pete McAllister + <mailto:pete.mcallister@metaswitch.com>"; + + description + "This module defines the YANG data model definitions for the + Multicast Source Discovery Protocol (MSDP). + + 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. + + Copyright (c) 2020 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 Simplified 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 8916; see the + RFC itself for full legal notices."; + + revision 2020-10-31 { + description + "Initial revision."; + reference + "RFC 8916: A YANG Data Model for the Multicast Source + Discovery Protocol (MSDP)"; + } + + /* + * Features + */ + + feature filter-policy { + description + "Support policy configuration of peer/message filtering."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + + feature peer-as-verification { + description + "Support configuration of a peer's Autonomous System Number + (ASN)."; + reference + "RFC 4271: A Border Gateway Protocol 4 (BGP-4)"; + } + + feature peer-authentication { + description + "Support configuration of peer authentication."; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + + /* + * Identities + */ + + identity msdp { + base rt:control-plane-protocol; + description + "Identity for the Multicast Source Discovery Protocol (MSDP)."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP)"; + } + + /* + * Groupings + */ + grouping authentication-container { + description + "Authentication attributes."; + container authentication { + if-feature peer-authentication; + description + "A container defining authentication attributes."; + choice authentication-type { + case key-chain { + leaf key-chain { + type key-chain:key-chain-ref; + description + "Reference to a key-chain."; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + } + case password { + leaf key { + type string; + description + "This leaf specifies the authentication key."; + } + leaf crypto-algorithm { + type identityref { + base key-chain:crypto-algorithm; + } + must "derived-from-or-self(., 'key-chain:md5')" { + error-message + "Only the md5 algorithm can be used for MSDP."; + description + "Check for crypto-algorithm."; + } + description + "Cryptographic algorithm associated with a key. + Only the md5 algorithm can be used for MSDP. + When 'md5' is specified, MSDP control messages + are secured by TCP MD5 signatures as described + in RFCs 3618 and 5925. Both peers of a + connection SHOULD be configured to the same + algorithm for the connection to be established. + When this leaf is not configured, unauthenticated + TCP is used."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP) + RFC 5925: The TCP Authentication Option + RFC 8177: YANG Data Model for Key Chains"; + } + } + description + "Choice of authentication."; + } + } + } // authentication-container + + grouping tcp-connect-source { + description + "Attribute to configure a peer TCP connection source."; + leaf tcp-connection-source { + type if:interface-ref; + must "/if:interfaces/if:interface[if:name = current()]/" + + "ip:ipv4/ip:enabled != 'false'" { + error-message + "The interface must have IPv4 enabled."; + description + "The interface must have IPv4 enabled."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + description + "The interface is to be the source for the TCP + connection. It is a reference to an entry in the global + interface list."; + } + } // tcp-connect-source + + grouping global-config-attributes { + description + "Global MSDP configuration."; + + uses tcp-connect-source; + + list default-peer { + if-feature filter-policy; + key "peer-addr prefix-policy"; + + description + "The default peer accepts all MSDP Source-Active (SA) + messages. A default peer is needed in topologies where + MSDP peers do not coexist with BGP peers. The Reverse Path + Forwarding (RPF) check on SA messages will fail, and no + SA messages will be accepted. In these cases, you can + configure the peer as a default peer and bypass + RPF checks."; + + leaf peer-addr { + type leafref { + path "../../../peers/peer/address"; + } + mandatory true; + description + "Reference to a peer that is in the peer list."; + } + leaf prefix-policy { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "If specified, only those SA entries whose Rendezvous + Point (RP) is permitted in the prefix list are allowed; + if not specified, all SA messages from the default + peer are accepted."; + reference + "RFC 7761: Protocol Independent Multicast - Sparse Mode + (PIM-SM): Protocol Specification (Revised) + RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + } // default-peer + + container originating-rp { + description + "The container of the originating RP."; + leaf interface { + type if:interface-ref; + must "/if:interfaces/if:interface[if:name = current()]/" + + "ip:ipv4/ip:enabled != 'false'" { + error-message + "The interface must have IPv4 enabled."; + description + "The interface must have IPv4 enabled."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + description + "Reference to an entry in the global interface list. + The IP address of the interface used in the RP field of + an SA message entry. When anycast RPs are used, all RPs + use the same IP address. This parameter can be used to + define a unique IP address for the RP of each MSDP peer. + By default, the software uses the RP address of the + local system."; + } + } // originating-rp + + uses sa-filter-container; + + leaf sa-limit { + type uint32; + description + "A limit on the number of SA entries accepted. + If not configured or the value is 0, there is no limit."; + } + uses ttl-threshold; + } // global-config-attributes + + grouping peer-config-attributes { + description + "Per-peer configuration for MSDP."; + + uses authentication-container; + leaf enabled { + type boolean; + description + "'true' if the peer is enabled; + 'false' if the peer is disabled."; + } + uses tcp-connect-source; + + leaf description { + type string; + description + "The peer description."; + } + leaf mesh-group { + type string; + description + "The name of the mesh-group to which this peer belongs."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP), + Section 10.2"; + } + leaf peer-as { + if-feature peer-as-verification; + type inet:as-number; + description + "The peer's ASN. Using peer-as to perform the verification + can provide more controlled ability. The value can be + compared with the BGP peer's ASN. If they are different, + the SA information that comes from this peer may be + rejected. If the ASN is the same as the local ASN, then + the peer is within the same domain; otherwise, this peer + is external to the domain. This is comparable to the + definition and usage in BGP; see RFC 4271."; + reference + "RFC 4271: A Border Gateway Protocol 4 (BGP-4)"; + } + uses sa-filter-container; + leaf sa-limit { + type uint32; + description + "A limit on the number of SA entries accepted from this + peer. + If not configured or the value is 0, there is no limit."; + } + container timer { + description + "Timer attributes."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP), + Section 5"; + leaf connect-retry-interval { + type uint16; + units seconds; + default 30; + description + "The peer timer for connect-retry. By default, MSDP peers + wait 30 seconds after the session is reset."; + } + leaf holdtime-interval { + type uint16 { + range "3..65535"; + } + units seconds; + default 75; + description + "The SA hold-down period of this MSDP peer."; + } + leaf keepalive-interval { + type uint16 { + range "1..65535"; + } + units seconds; + must '. < ../holdtime-interval' { + error-message + "The keepalive interval must be smaller than the " + + "hold-time interval."; + } + default 60; + description + "The keepalive timer of this MSDP peer."; + } + } // timer + uses ttl-threshold; + } // peer-config-attributes + + grouping peer-state-attributes { + description + "Per-peer state attributes for MSDP."; + + leaf session-state { + type enumeration { + enum disabled { + description + "Disabled."; + } + enum inactive { + description + "Inactive."; + } + enum listen { + description + "Listen."; + } + enum connecting { + description + "Connecting."; + } + enum established { + description + "Established."; + } + } + config false; + description + "The peer's session state."; + reference + "RFC 3618: Multicast Source Discovery Protocol (MSDP), + Section 11"; + } + leaf elapsed-time { + type yang:gauge32; + units seconds; + config false; + description + "Elapsed time for being in a state."; + } + leaf connect-retry-expire { + type uint32; + units seconds; + config false; + description + "Connect retry expire time of a peer connection."; + } + leaf hold-expire { + type uint16; + units seconds; + config false; + description + "Hold expire time of a peer connection."; + } + leaf is-default-peer { + type boolean; + config false; + description + "'true' if this peer is one of the default peers."; + } + leaf keepalive-expire { + type uint16; + units seconds; + config false; + description + "Keepalive expire time of this peer."; + } + leaf reset-count { + type yang:zero-based-counter32; + config false; + description + "The reset count of this peer."; + } + + container statistics { + config false; + description + "A container defining statistics attributes."; + + leaf discontinuity-time { + type yang:date-and-time; + description + "The time on the most recent occasion at which any one + or more of the statistics counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local + management subsystem, then this node contains the time + the local management subsystem re-initialized itself."; + } + + container error { + description + "A grouping defining error statistics attributes."; + leaf rpf-failure { + type uint32; + description + "The number of RPF failures."; + } + } + + container queue { + description + "A container that includes queue statistics attributes."; + leaf size-in { + type uint32; + description + "The number of messages received from the peer + currently queued."; + } + leaf size-out { + type uint32; + description + "The number of messages queued to be sent to the peer."; + } + } + + container received { + description + "Received message counters."; + uses statistics-sent-received; + } + container sent { + description + "Sent message counters."; + uses statistics-sent-received; + } + } // statistics + } // peer-state-attributes + + grouping sa-filter-container { + description + "A container defining SA filters."; + container sa-filter { + description + "Specifies an Access Control List (ACL) to filter SA messages + coming into or going out of the peer."; + leaf in { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "Filters incoming SA messages only. + The value is the name to uniquely identify a + policy that contains one or more rules used to + accept or reject MSDP SA messages. + If the policy is not specified, all MSDP SA messages are + accepted."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + leaf out { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "Filters outgoing SA messages only. + The value is the name to uniquely identify a + policy that contains one or more rules used to + accept or reject MSDP SA messages. + If the policy is not specified, all MSDP SA messages are + sent."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + } // sa-filter + } // sa-filter-container + + grouping ttl-threshold { + description + "Attribute to configure the TTL threshold."; + leaf ttl-threshold { + type uint8 { + range 1..255; + } + description + "The maximum number of hops data packets can traverse + before being dropped."; + } + } // ttl-threshold + + grouping statistics-sent-received { + description + "A grouping defining sent and received statistics attributes."; + leaf keepalive { + type yang:counter64; + description + "The number of keepalive messages."; + } + leaf notification { + type yang:counter64; + description + "The number of notification messages."; + } + leaf sa-message { + type yang:counter64; + description + "The number of SA messages."; + } + leaf sa-response { + type yang:counter64; + description + "The number of SA response messages."; + } + leaf sa-request { + type yang:counter64; + description + "The number of SA request messages."; + } + leaf total { + type yang:counter64; + description + "The number of total messages."; + } + } // statistics-sent-received + + /* + * Data nodes + */ + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol" { + when "derived-from-or-self(rt:type, 'msdp:msdp')" { + description + "This augmentation is only valid for a routing protocol + instance of MSDP."; + } + description + "MSDP augmentation to routing control-plane protocol + configuration and state."; + container msdp { + description + "MSDP configuration and operational state data."; + + container global { + description + "Global attributes."; + uses global-config-attributes; + } + + container peers { + description + "Contains a list of peers."; + list peer { + key "address"; + description + "A list of MSDP peers."; + leaf address { + type inet:ipv4-address; + description + "The address of the peer."; + } + action clear-peer { + description + "Clears the TCP connection to the peer."; + } + uses peer-config-attributes; + uses peer-state-attributes; + } + } + + action clear-all-peers { + description + "All peers' TCP connections are cleared."; + } + + container sa-cache { + config false; + description + "The SA cache information."; + list entry { + key "group source-addr"; + description + "A list of SA cache entries."; + leaf group { + type rt-types:ipv4-multicast-group-address; + description + "The group address of this SA cache."; + } + leaf source-addr { + type rt-types:ipv4-multicast-source-address; + description + "Source IPv4 address."; + } + list origin-rp { + key "rp-address"; + description + "Information regarding the originating RP."; + leaf rp-address { + type inet:ipv4-address; + description + "The RP address. This is the IP address used in the + RP field of an SA message entry."; + } + leaf is-local-rp { + type boolean; + description + "'true' if the RP is local; + 'false' if the RP is not local."; + } + leaf sa-adv-expire { + type uint32; + units seconds; + description + "The remaining time duration before expiration + of the periodic SA advertisement timer on a + local RP."; + } + } + + container state-attributes { + description + "SA cache state attributes for MSDP."; + + leaf up-time { + type yang:gauge32; + units seconds; + description + "Indicates the duration time when this SA entry is + created in the cache. MSDP is a periodic protocol; + the value can be used to check the state of the + SA cache."; + } + leaf expire { + type yang:gauge32; + units seconds; + description + "Indicates the duration time when this SA entry in + the cache times out. MSDP is a periodic protocol; + the value can be used to check the state of the + SA cache."; + } + leaf holddown-interval { + type uint32; + units seconds; + description + "Hold-down timer value for SA forwarding."; + reference + "RFC 3618: Multicast Source Discovery Protocol + (MSDP), Section 5.3"; + } + leaf peer-learned-from { + type inet:ipv4-address; + description + "The address of the peer from which we learned this + SA information."; + } + leaf rpf-peer { + type inet:ipv4-address; + description + "The address is the SA's originating RP."; + } + } // state-attributes + } // entry + + action clear { + description + "Clears MSDP SA cache entries."; + input { + container entry { + presence "If a particular entry is cleared."; + description + "The SA cache (S,G) or (*,G) entry to be cleared. + If this is not provided, all entries are cleared."; + leaf group { + type rt-types:ipv4-multicast-group-address; + mandatory true; + description + "The group address."; + } + leaf source-addr { + type rt-types:ipv4-multicast-source-address; + description + "The address of the multicast source to be cleared. + If this is not provided, then all entries related + to the given group are cleared."; + } + } + leaf peer-address { + type inet:ipv4-address; + description + "The peer IP address from which MSDP SA cache entries + have been learned. If this is not provided, entries + learned from all peers are cleared."; + } + leaf peer-as { + type inet:as-number; + description + "The ASN from which MSDP SA cache entries have been + learned. If this is not provided, entries learned + from all ASes are cleared."; + } + } + } // clear + } // sa-cache + } // msdp + } // augment +} diff --git a/models/ietf/RFC/ietf-mud-detext-example.yang b/models/ietf/RFC/ietf-mud-detext-example.yang new file mode 100644 index 0000000000000000000000000000000000000000..13a0a77844e6cc2d16a9ab13afbce97a52ed5d73 --- /dev/null +++ b/models/ietf/RFC/ietf-mud-detext-example.yang @@ -0,0 +1,49 @@ +module ietf-mud-detext-example { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-mud-detext-example"; + prefix ietf-mud-detext-example; + + import ietf-mud { + prefix ietf-mud; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/opsawg/> + WG List: opsawg@ietf.org + + Author: Eliot Lear + lear@cisco.com + + Author: Ralph Droms + rdroms@gmail.com + + Author: Dan Romascanu + dromasca@gmail.com + "; + description + "Sample extension to a MUD module to indicate a need + for DETNET support."; + + revision 2019-01-28 { + description + "Initial revision."; + reference + "RFC 8520: Manufacturer Usage Description + Specification"; + } + + augment "/ietf-mud:mud" { + description + "This adds a simple extension for a manufacturer + to indicate whether DETNET is required by a + device."; + leaf is-detnet-required { + type boolean; + description + "This value will equal 'true' if a device requires + DETNET to properly function."; + } + } +} diff --git a/models/ietf/RFC/ietf-mud-detext-example@2019-01-28.yang b/models/ietf/RFC/ietf-mud-detext-example@2019-01-28.yang new file mode 100644 index 0000000000000000000000000000000000000000..13a0a77844e6cc2d16a9ab13afbce97a52ed5d73 --- /dev/null +++ b/models/ietf/RFC/ietf-mud-detext-example@2019-01-28.yang @@ -0,0 +1,49 @@ +module ietf-mud-detext-example { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-mud-detext-example"; + prefix ietf-mud-detext-example; + + import ietf-mud { + prefix ietf-mud; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/opsawg/> + WG List: opsawg@ietf.org + + Author: Eliot Lear + lear@cisco.com + + Author: Ralph Droms + rdroms@gmail.com + + Author: Dan Romascanu + dromasca@gmail.com + "; + description + "Sample extension to a MUD module to indicate a need + for DETNET support."; + + revision 2019-01-28 { + description + "Initial revision."; + reference + "RFC 8520: Manufacturer Usage Description + Specification"; + } + + augment "/ietf-mud:mud" { + description + "This adds a simple extension for a manufacturer + to indicate whether DETNET is required by a + device."; + leaf is-detnet-required { + type boolean; + description + "This value will equal 'true' if a device requires + DETNET to properly function."; + } + } +} diff --git a/models/ietf/RFC/ietf-mud.yang b/models/ietf/RFC/ietf-mud.yang new file mode 100644 index 0000000000000000000000000000000000000000..1842284ead9cdd2d9125139ec5904f9124bcc389 --- /dev/null +++ b/models/ietf/RFC/ietf-mud.yang @@ -0,0 +1,311 @@ +module ietf-mud { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-mud"; + prefix ietf-mud; + + import ietf-access-control-list { + prefix acl; + } + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/opsawg/> + WG List: opsawg@ietf.org + + Author: Eliot Lear + lear@cisco.com + + Author: Ralph Droms + rdroms@gmail.com + + Author: Dan Romascanu + dromasca@gmail.com + "; + description + "This YANG module defines a component that augments the + IETF description of an access list. This specific module + focuses on additional filters that include local, model, + and same-manufacturer. + + This module is intended to be serialized via JSON and stored + as a file, as described in RFC 8520. + + 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. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8520; see + the RFC itself for full legal notices."; + + revision 2019-01-28 { + description + "Initial proposed standard."; + reference + "RFC 8520: Manufacturer Usage Description + Specification"; + } + + typedef direction { + type enumeration { + enum to-device { + description + "packets or flows destined to the target + Thing."; + } + enum from-device { + description + "packets or flows destined from + the target Thing."; + } + } + description + "Which way are we talking about?"; + } + + container mud { + presence "Enabled for this particular MUD URL"; + description + "MUD-related information, as specified + by RFC 8520."; + uses mud-grouping; + } + + grouping mud-grouping { + description + "Information about when support ends (or ended) + and when to refresh."; + leaf mud-version { + type uint8; + mandatory true; + description + "This is the version of the MUD + specification. This memo specifies version 1."; + } + leaf mud-url { + type inet:uri; + mandatory true; + description + "This is the MUD URL associated with the entry found + in a MUD file."; + } + leaf last-update { + type yang:date-and-time; + mandatory true; + description + "This is intended to be when the current MUD file + was generated. MUD managers SHOULD NOT check + for updates between this time plus cache validity."; + } + leaf mud-signature { + type inet:uri; + description + "A URI that resolves to a signature as + described in this specification."; + } + leaf cache-validity { + type uint8 { + range "1..168"; + } + units "hours"; + default "48"; + description + "The information retrieved from the MUD server is + valid for these many hours, after which it should + be refreshed. N.B., MUD manager implementations + need not discard MUD files beyond this period."; + } + leaf is-supported { + type boolean; + mandatory true; + description + "This boolean indicates whether or not the Thing is + currently supported by the manufacturer."; + } + leaf systeminfo { + type string; + description + "A UTF-8 description of this Thing. This + should be a brief description that may be + displayed to the user to determine whether + to allow the Thing on the + network."; + } + leaf mfg-name { + type string; + description + "Manufacturer name, as described in + the ietf-hardware YANG module."; + } + leaf model-name { + type string; + description + "Model name, as described in the + ietf-hardware YANG module."; + } + leaf firmware-rev { + type string; + description + "firmware-rev, as described in the + ietf-hardware YANG module. Note that this field + MUST NOT be included when the device can be + updated but the MUD URL cannot."; + } + leaf software-rev { + type string; + description + "software-rev, as described in the + ietf-hardware YANG module. Note that this field + MUST NOT be included when the device can be + updated but the MUD URL cannot."; + } + leaf documentation { + type inet:uri; + description + "This URL points to documentation that + relates to this device and any classes that it uses + in its MUD file. A caution: MUD managers need + not resolve this URL on their own but rather simply + provide it to the administrator. Parsing HTML is + not an intended function of a MUD manager."; + } + leaf-list extensions { + type string { + length "1..40"; + } + description + "A list of extension names that are used in this MUD + file. Each name is registered with the IANA and + described in an RFC."; + } + container from-device-policy { + description + "The policies that should be enforced on traffic + coming from the device. These policies are not + necessarily intended to be enforced at a single + point but may be rendered by the controller to any + relevant enforcement points in the network or + elsewhere."; + uses access-lists; + } + container to-device-policy { + description + "The policies that should be enforced on traffic + going to the device. These policies are not + necessarily intended to be enforced at a single + point but may be rendered by the controller to any + relevant enforcement points in the network or + elsewhere."; + uses access-lists; + } + } + + grouping access-lists { + description + "A grouping for access lists in the context of device + policy."; + container access-lists { + description + "The access lists that should be applied to traffic + to or from the device."; + list access-list { + key "name"; + description + "Each entry on this list refers to an ACL that + should be present in the overall access list + data model. Each ACL is identified by name and + type."; + leaf name { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "The name of the ACL for this entry."; + } + } + } + } + + augment "/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches" { + description + "adding abstractions to avoid the need of IP addresses."; + container mud { + description + "MUD-specific matches."; + leaf manufacturer { + type inet:host; + description + "A domain that is intended to match the authority + section of the MUD URL. This node is used to specify + one or more manufacturers a device should + be authorized to access."; + } + leaf same-manufacturer { + type empty; + description + "This node matches the authority section of the MUD URL + of a Thing. It is intended to grant access to all + devices with the same authority section."; + } + leaf model { + type inet:uri; + description + "Devices of the specified model type will match if + they have an identical MUD URL."; + } + leaf local-networks { + type empty; + description + "IP addresses will match this node if they are + considered local addresses. A local address may be + a list of locally defined prefixes and masks + that indicate a particular administrative scope."; + } + leaf controller { + type inet:uri; + description + "This node names a class that has associated with it + zero or more IP addresses to match against. These + may be scoped to a manufacturer or via a standard + URN."; + } + leaf my-controller { + type empty; + description + "This node matches one or more network elements that + have been configured to be the controller for this + Thing, based on its MUD URL."; + } + } + } + augment "/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches" + + "/acl:l4/acl:tcp/acl:tcp" { + description + "add direction-initiated"; + leaf direction-initiated { + type direction; + description + "This node matches based on which direction a + connection was initiated. The means by which that + is determined is discussed in this document."; + } + } +} diff --git a/models/ietf/RFC/ietf-mud@2019-01-28.yang b/models/ietf/RFC/ietf-mud@2019-01-28.yang new file mode 100644 index 0000000000000000000000000000000000000000..1842284ead9cdd2d9125139ec5904f9124bcc389 --- /dev/null +++ b/models/ietf/RFC/ietf-mud@2019-01-28.yang @@ -0,0 +1,311 @@ +module ietf-mud { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-mud"; + prefix ietf-mud; + + import ietf-access-control-list { + prefix acl; + } + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/opsawg/> + WG List: opsawg@ietf.org + + Author: Eliot Lear + lear@cisco.com + + Author: Ralph Droms + rdroms@gmail.com + + Author: Dan Romascanu + dromasca@gmail.com + "; + description + "This YANG module defines a component that augments the + IETF description of an access list. This specific module + focuses on additional filters that include local, model, + and same-manufacturer. + + This module is intended to be serialized via JSON and stored + as a file, as described in RFC 8520. + + 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. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8520; see + the RFC itself for full legal notices."; + + revision 2019-01-28 { + description + "Initial proposed standard."; + reference + "RFC 8520: Manufacturer Usage Description + Specification"; + } + + typedef direction { + type enumeration { + enum to-device { + description + "packets or flows destined to the target + Thing."; + } + enum from-device { + description + "packets or flows destined from + the target Thing."; + } + } + description + "Which way are we talking about?"; + } + + container mud { + presence "Enabled for this particular MUD URL"; + description + "MUD-related information, as specified + by RFC 8520."; + uses mud-grouping; + } + + grouping mud-grouping { + description + "Information about when support ends (or ended) + and when to refresh."; + leaf mud-version { + type uint8; + mandatory true; + description + "This is the version of the MUD + specification. This memo specifies version 1."; + } + leaf mud-url { + type inet:uri; + mandatory true; + description + "This is the MUD URL associated with the entry found + in a MUD file."; + } + leaf last-update { + type yang:date-and-time; + mandatory true; + description + "This is intended to be when the current MUD file + was generated. MUD managers SHOULD NOT check + for updates between this time plus cache validity."; + } + leaf mud-signature { + type inet:uri; + description + "A URI that resolves to a signature as + described in this specification."; + } + leaf cache-validity { + type uint8 { + range "1..168"; + } + units "hours"; + default "48"; + description + "The information retrieved from the MUD server is + valid for these many hours, after which it should + be refreshed. N.B., MUD manager implementations + need not discard MUD files beyond this period."; + } + leaf is-supported { + type boolean; + mandatory true; + description + "This boolean indicates whether or not the Thing is + currently supported by the manufacturer."; + } + leaf systeminfo { + type string; + description + "A UTF-8 description of this Thing. This + should be a brief description that may be + displayed to the user to determine whether + to allow the Thing on the + network."; + } + leaf mfg-name { + type string; + description + "Manufacturer name, as described in + the ietf-hardware YANG module."; + } + leaf model-name { + type string; + description + "Model name, as described in the + ietf-hardware YANG module."; + } + leaf firmware-rev { + type string; + description + "firmware-rev, as described in the + ietf-hardware YANG module. Note that this field + MUST NOT be included when the device can be + updated but the MUD URL cannot."; + } + leaf software-rev { + type string; + description + "software-rev, as described in the + ietf-hardware YANG module. Note that this field + MUST NOT be included when the device can be + updated but the MUD URL cannot."; + } + leaf documentation { + type inet:uri; + description + "This URL points to documentation that + relates to this device and any classes that it uses + in its MUD file. A caution: MUD managers need + not resolve this URL on their own but rather simply + provide it to the administrator. Parsing HTML is + not an intended function of a MUD manager."; + } + leaf-list extensions { + type string { + length "1..40"; + } + description + "A list of extension names that are used in this MUD + file. Each name is registered with the IANA and + described in an RFC."; + } + container from-device-policy { + description + "The policies that should be enforced on traffic + coming from the device. These policies are not + necessarily intended to be enforced at a single + point but may be rendered by the controller to any + relevant enforcement points in the network or + elsewhere."; + uses access-lists; + } + container to-device-policy { + description + "The policies that should be enforced on traffic + going to the device. These policies are not + necessarily intended to be enforced at a single + point but may be rendered by the controller to any + relevant enforcement points in the network or + elsewhere."; + uses access-lists; + } + } + + grouping access-lists { + description + "A grouping for access lists in the context of device + policy."; + container access-lists { + description + "The access lists that should be applied to traffic + to or from the device."; + list access-list { + key "name"; + description + "Each entry on this list refers to an ACL that + should be present in the overall access list + data model. Each ACL is identified by name and + type."; + leaf name { + type leafref { + path "/acl:acls/acl:acl/acl:name"; + } + description + "The name of the ACL for this entry."; + } + } + } + } + + augment "/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches" { + description + "adding abstractions to avoid the need of IP addresses."; + container mud { + description + "MUD-specific matches."; + leaf manufacturer { + type inet:host; + description + "A domain that is intended to match the authority + section of the MUD URL. This node is used to specify + one or more manufacturers a device should + be authorized to access."; + } + leaf same-manufacturer { + type empty; + description + "This node matches the authority section of the MUD URL + of a Thing. It is intended to grant access to all + devices with the same authority section."; + } + leaf model { + type inet:uri; + description + "Devices of the specified model type will match if + they have an identical MUD URL."; + } + leaf local-networks { + type empty; + description + "IP addresses will match this node if they are + considered local addresses. A local address may be + a list of locally defined prefixes and masks + that indicate a particular administrative scope."; + } + leaf controller { + type inet:uri; + description + "This node names a class that has associated with it + zero or more IP addresses to match against. These + may be scoped to a manufacturer or via a standard + URN."; + } + leaf my-controller { + type empty; + description + "This node matches one or more network elements that + have been configured to be the controller for this + Thing, based on its MUD URL."; + } + } + } + augment "/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches" + + "/acl:l4/acl:tcp/acl:tcp" { + description + "add direction-initiated"; + leaf direction-initiated { + type direction; + description + "This node matches based on which direction a + connection was initiated. The means by which that + is determined is discussed in this document."; + } + } +} diff --git a/models/ietf/RFC/ietf-nat@2019-01-10.yang b/models/ietf/RFC/ietf-nat@2019-01-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..a24d7a35f0ae42442f07196331903f2120c6e5d0 --- /dev/null +++ b/models/ietf/RFC/ietf-nat@2019-01-10.yang @@ -0,0 +1,2128 @@ +module ietf-nat { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-nat"; + prefix nat; + + import ietf-inet-types { + prefix inet; + reference + "Section 4 of RFC 6991"; + } + import ietf-yang-types { + prefix yang; + reference + "Section 3 of RFC 6991"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/opsawg/> + WG List: <mailto:opsawg@ietf.org> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Senthil Sivakumar + <mailto:ssenthil@cisco.com> + + Author: Christian Jacquenet + <mailto:christian.jacquenet@orange.com> + + Author: Suresh Vinapamula + <mailto:sureshk@juniper.net> + + Author: Qin Wu + <mailto:bill.wu@huawei.com>"; + + description + "This module is a YANG module for NAT implementations. + NAT44, Network Address and Protocol Translation from IPv6 + Clients to IPv4 Servers (NAT64), customer-side translator + (CLAT), Stateless IP/ICMP Translation (SIIT), Explicit + Address Mappings (EAM) for SIIT, IPv6 Network Prefix + Translation (NPTv6), and Destination NAT are covered. + + Copyright (c) 2018 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8512; see + the RFC itself for full legal notices."; + + revision 2019-01-10 { + description + "Initial revision."; + reference + "RFC 8512: A YANG Module for Network Address Translation + (NAT) and Network Prefix Translation (NPT)"; + } + + /* + * Definitions + */ + + typedef percent { + type uint8 { + range "0 .. 100"; + } + description + "Percentage"; + } + + /* + * Features + */ + + feature basic-nat44 { + description + "Basic NAT44 translation is limited to IP addresses alone."; + reference + "RFC 3022: Traditional IP Network Address Translator + (Traditional NAT)"; + } + + feature napt44 { + description + "Network Address Port Translator (NAPT): translation is + extended to include IP addresses and transport identifiers + (such as a TCP/UDP port or ICMP query ID). + + If the internal IP address is not sufficient to uniquely + disambiguate NAPT44 mappings, an additional attribute is + required. For example, that additional attribute may + be an IPv6 address (a.k.a., DS-Lite) or + a Layer 2 identifier (a.k.a., Per-Interface NAT)"; + reference + "RFC 3022: Traditional IP Network Address Translator + (Traditional NAT)"; + } + + feature dst-nat { + description + "Destination NAT is a translation that acts on the destination + IP address and/or destination port number. This flavor is + usually deployed in load balancers or at devices + in front of public servers."; + } + + feature nat64 { + description + "NAT64 translation allows IPv6-only clients to contact IPv4 + servers using, e.g., UDP, TCP, or ICMP. One or more + public IPv4 addresses assigned to a NAT64 translator are + shared among several IPv6-only clients."; + reference + "RFC 6146: Stateful NAT64: Network Address and Protocol + Translation from IPv6 Clients to IPv4 Servers"; + } + + feature siit { + description + "The Stateless IP/ICMP Translation Algorithm (SIIT), which + translates between IPv4 and IPv6 packet headers (including + ICMP headers). + + In the stateless mode, an IP/ICMP translator converts IPv4 + addresses to IPv6, and vice versa, solely based on the + configuration of the stateless IP/ICMP translator and + information contained within the packet being translated. + The translator must support the stateless address mapping + algorithm defined in RFC 6052, which is the default behavior."; + reference + "RFC 7915: IP/ICMP Translation Algorithm"; + } + + feature clat { + description + "CLAT is customer-side translator that algorithmically + translates 1:1 private IPv4 addresses to global IPv6 + addresses, and vice versa. + + When a dedicated /64 prefix is not available for translation + from DHCPv6-PD, the CLAT may perform NAT44 for all IPv4 LAN + packets so that all the LAN-originated IPv4 packets appear + from a single IPv4 address and are then statelessly translated + to one interface IPv6 address that is claimed by the CLAT via + the Neighbor Discovery Protocol (NDP) and defended with + Duplicate Address Detection."; + reference + "RFC 6877: 464XLAT: Combination of Stateful and + Stateless Translation"; + } + + feature eam { + description + "Explicit Address Mapping (EAM) is a bidirectional coupling + between an IPv4 prefix and an IPv6 prefix."; + reference + "RFC 7757: Explicit Address Mappings for Stateless IP/ICMP + Translation"; + } + + feature nptv6 { + description + "NPTv6 is a stateless transport-agnostic IPv6-to-IPv6 + prefix translation."; + reference + "RFC 6296: IPv6-to-IPv6 Network Prefix Translation"; + } + + /* + * Identities + */ + + identity nat-type { + description + "Base identity for nat type."; + } + + identity basic-nat44 { + base nat:nat-type; + description + "Identity for Basic NAT support."; + reference + "RFC 3022: Traditional IP Network Address Translator + (Traditional NAT)"; + } + + identity napt44 { + base nat:nat-type; + description + "Identity for NAPT support."; + reference + "RFC 3022: Traditional IP Network Address Translator + (Traditional NAT)"; + } + + identity dst-nat { + base nat:nat-type; + description + "Identity for Destination NAT support."; + } + + identity nat64 { + base nat:nat-type; + description + "Identity for NAT64 support."; + reference + "RFC 6146: Stateful NAT64: Network Address and Protocol + Translation from IPv6 Clients to IPv4 Servers"; + } + + identity siit { + base nat:nat-type; + description + "Identity for SIIT support."; + reference + "RFC 7915: IP/ICMP Translation Algorithm"; + } + + identity clat { + base nat:nat-type; + description + "Identity for CLAT support."; + reference + "RFC 6877: 464XLAT: Combination of Stateful and Stateless + Translation"; + } + + identity eam { + base nat:nat-type; + description + "Identity for EAM support."; + reference + "RFC 7757: Explicit Address Mappings for Stateless IP/ICMP + Translation"; + } + + identity nptv6 { + base nat:nat-type; + description + "Identity for NPTv6 support."; + reference + "RFC 6296: IPv6-to-IPv6 Network Prefix Translation"; + } + + /* + * Grouping + */ + + grouping port-number { + description + "An individual port number or a range of ports. + When only start-port-number is present, + it represents a single port number."; + leaf start-port-number { + type inet:port-number; + description + "Beginning of the port range."; + reference + "Section 3.2.9 of RFC 8045"; + } + leaf end-port-number { + type inet:port-number; + must '. >= ../start-port-number' { + error-message + "The end-port-number must be greater than or + equal to start-port-number."; + } + description + "End of the port range."; + reference + "Section 3.2.10 of RFC 8045"; + } + } + + grouping port-set { + description + "Indicates a set of port numbers. + + It may be a simple port range, or use the Port Set + Identifier (PSID) algorithm to represent a range of + transport-layer port numbers that will be used by a + NAPT."; + choice port-type { + default "port-range"; + description + "Port type: port-range or port-set-algo."; + case port-range { + uses port-number; + } + case port-set-algo { + leaf psid-offset { + type uint8 { + range "0..15"; + } + description + "The number of offset bits (a.k.a., 'a' bits). + Specifies the numeric value for the excluded port + range/offset bits. + + Allowed values are between 0 and 15."; + reference + "Section 5.1 of RFC 7597"; + } + leaf psid-len { + type uint8 { + range "0..15"; + } + mandatory true; + description + "The length of PSID, representing the sharing + ratio for an IPv4 address. + + (also known as 'k'). + + The address-sharing ratio would be 2^k."; + reference + "Section 5.1 of RFC 7597"; + } + leaf psid { + type uint16; + mandatory true; + description + "PSID value, which identifies a set + of ports algorithmically."; + reference + "Section 5.1 of RFC 7597"; + } + } + reference + "RFC 7597: Mapping of Address and Port with + Encapsulation (MAP-E)"; + } + } + + grouping mapping-entry { + description + "NAT mapping entry. + + If an attribute is not stored in the mapping/session table, + it means the corresponding field of a packet that + matches this entry is not rewritten by the NAT or this + information is not required for NAT filtering purposes."; + leaf index { + type uint32; + description + "A unique identifier of a mapping entry. This identifier + can be automatically assigned by the NAT instance or be + explicitly configured."; + } + leaf type { + type enumeration { + enum static { + description + "The mapping entry is explicitly configured + (e.g., via a command-line interface)."; + } + enum dynamic-implicit { + description + "This mapping is created implicitly as a side effect + of processing a packet that requires a new mapping."; + } + enum dynamic-explicit { + description + "This mapping is created as a result of an explicit + request, e.g., a PCP message."; + } + } + description + "Indicates the type of a mapping entry. For example, + a mapping can be: static, implicit dynamic, + or explicit dynamic."; + } + leaf transport-protocol { + type uint8; + description + "The upper-layer protocol associated with this mapping. + Values are taken from the IANA Protocol Numbers registry: + <https://www.iana.org/assignments/protocol-numbers/>. + + For example, this field contains 6 for TCP, + 17 for UDP, 33 for DCCP, or 132 for SCTP. + + If this leaf is not instantiated, then the mapping + applies to any protocol."; + } + leaf internal-src-address { + type inet:ip-prefix; + description + "Corresponds to the source IPv4/IPv6 address/prefix + of the packet received on an internal interface."; + } + container internal-src-port { + description + "Corresponds to the source port of the packet received + on an internal interface. + + It is also used to indicate the internal source ICMP + identifier. + + As a reminder, all the ICMP Query messages contain + an 'Identifier' field, which is referred to in this + document as the 'ICMP Identifier'."; + uses port-number; + } + leaf external-src-address { + type inet:ip-prefix; + description + "Source IP address/prefix of the packet sent on an + external interface of the NAT."; + } + container external-src-port { + description + "Source port of the packet sent on an external + interface of the NAT. + + It is also used to indicate the external source ICMP + identifier."; + uses port-number; + } + leaf internal-dst-address { + type inet:ip-prefix; + description + "Corresponds to the destination IP address/prefix + of the packet received on an internal interface + of the NAT. + + For example, some NAT implementations support + the translation of both source and destination + addresses and port numbers, sometimes referred to + as 'Twice NAT'."; + } + container internal-dst-port { + description + "Corresponds to the destination port of the + IP packet received on the internal interface. + + It is also used to include the internal + destination ICMP identifier."; + uses port-number; + } + leaf external-dst-address { + type inet:ip-prefix; + description + "Corresponds to the destination IP address/prefix + of the packet sent on an external interface + of the NAT."; + } + container external-dst-port { + description + "Corresponds to the destination port number of + the packet sent on the external interface + of the NAT. + + It is also used to include the external + destination ICMP identifier."; + uses port-number; + } + leaf lifetime { + type uint32; + units "seconds"; + description + "When specified, it is used to track the connection that is + fully formed (e.g., once the three-way handshake + TCP is completed) or the duration for maintaining + an explicit mapping alive. The mapping entry will be + removed by the NAT instance once this lifetime is expired. + + When reported in a get operation, the lifetime indicates + the remaining validity lifetime. + + Static mappings may not be associated with a + lifetime. If no lifetime is associated with a + static mapping, an explicit action is required to + remove that mapping."; + } + } + + /* + * NAT Module + */ + + container nat { + description + "NAT module"; + container instances { + description + "NAT instances"; + list instance { + key "id"; + description + "A NAT instance. This identifier can be automatically + assigned or explicitly configured."; + leaf id { + type uint32; + must '. >= 1'; + description + "NAT instance identifier. + + The identifier must be greater than zero."; + reference + "RFC 7659: Definitions of Managed Objects for Network + Address Translators (NATs)"; + } + leaf name { + type string; + description + "A name associated with the NAT instance."; + reference + "RFC 7659: Definitions of Managed Objects for Network + Address Translators (NATs)"; + } + leaf enable { + type boolean; + description + "Status of the NAT instance."; + } + container capabilities { + config false; + description + "NAT capabilities."; + leaf-list nat-flavor { + type identityref { + base nat-type; + } + description + "Supported translation type(s)."; + } + leaf-list per-interface-binding { + type enumeration { + enum unsupported { + description + "No capability to associate a NAT binding with + an extra identifier."; + } + enum layer-2 { + description + "The NAT instance is able to associate a mapping with + a Layer 2 identifier."; + } + enum dslite { + description + "The NAT instance is able to associate a mapping with + an IPv6 address (a.k.a., DS-Lite)."; + } + } + description + "Indicates the capability of a NAT to associate a + particular NAT session not only with the five + tuples used for the transport connection on both + sides of the NAT but also with the internal + interface on which the user device is + connected to the NAT."; + reference + "Section 4 of RFC 6619"; + } + list transport-protocols { + key "protocol-id"; + description + "List of supported protocols."; + leaf protocol-id { + type uint8; + mandatory true; + description + "The upper-layer protocol associated with a mapping. + + Values are taken from the IANA Protocol Numbers + registry. + + For example, this field contains 6 for TCP, + 17 for UDP, 33 for DCCP, or 132 for SCTP."; + } + leaf protocol-name { + type string; + description + "The name of the upper-layer protocol associated + with this mapping. + + For example, TCP, UDP, DCCP, and SCTP."; + } + } + leaf restricted-port-support { + type boolean; + description + "Indicates source port NAT restriction support."; + reference + "RFC 7596: Lightweight 4over6: An Extension to + the Dual-Stack Lite Architecture"; + } + leaf static-mapping-support { + type boolean; + description + "Indicates whether static mappings are supported."; + } + leaf port-randomization-support { + type boolean; + description + "Indicates whether port randomization is supported."; + reference + "Section 4.2.1 of RFC 4787"; + } + leaf port-range-allocation-support { + type boolean; + description + "Indicates whether port range allocation is supported."; + reference + "Section 1.1 of RFC 7753"; + } + leaf port-preservation-suport { + type boolean; + description + "Indicates whether port preservation is supported."; + reference + "Section 4.2.1 of RFC 4787"; + } + leaf port-parity-preservation-support { + type boolean; + description + "Indicates whether port parity preservation is + supported."; + reference + "Section 8 of RFC 7857"; + } + leaf address-roundrobin-support { + type boolean; + description + "Indicates whether address allocation round robin is + supported."; + } + leaf paired-address-pooling-support { + type boolean; + description + "Indicates whether paired-address-pooling is + supported"; + reference + "REQ-2 of RFC 4787"; + } + leaf endpoint-independent-mapping-support { + type boolean; + description + "Indicates whether endpoint-independent- + mapping is supported."; + reference + "Section 4 of RFC 4787"; + } + leaf address-dependent-mapping-support { + type boolean; + description + "Indicates whether address-dependent-mapping is + supported."; + reference + "Section 4 of RFC 4787"; + } + leaf address-and-port-dependent-mapping-support { + type boolean; + description + "Indicates whether address-and-port-dependent-mapping is + supported."; + reference + "Section 4 of RFC 4787"; + } + leaf endpoint-independent-filtering-support { + type boolean; + description + "Indicates whether endpoint-independent-filtering is + supported."; + reference + "Section 5 of RFC 4787"; + } + leaf address-dependent-filtering { + type boolean; + description + "Indicates whether address-dependent-filtering is + supported."; + reference + "Section 5 of RFC 4787"; + } + leaf address-and-port-dependent-filtering { + type boolean; + description + "Indicates whether address-and-port-dependent is + supported."; + reference + "Section 5 of RFC 4787"; + } + leaf fragment-behavior { + type enumeration { + enum unsupported { + description + "No capability to translate incoming fragments. + All received fragments are dropped."; + } + enum in-order { + description + "The NAT instance is able to translate fragments + only if they are received in order. That is, in + particular the header is in the first packet. + Fragments received out of order are dropped. "; + } + enum out-of-order { + description + "The NAT instance is able to translate a fragment even + if it is received out of order. + + This behavior is recommended."; + reference + "REQ-14 of RFC 4787"; + } + } + description + "The fragment behavior is the NAT instance's capability to + translate fragments received on the external interface of + the NAT."; + } + } + leaf type { + type identityref { + base nat-type; + } + description + "Specify the translation type. Particularly useful when + multiple translation flavors are supported. + + If one type is supported by a NAT, this parameter is by + default set to that type."; + } + leaf per-interface-binding { + type enumeration { + enum disabled { + description + "Disable the capability to associate an extra identifier + with NAT mappings."; + } + enum layer-2 { + description + "The NAT instance is able to associate a mapping with + a Layer 2 identifier."; + } + enum dslite { + description + "The NAT instance is able to associate a mapping with + an IPv6 address (a.k.a., DS-Lite)."; + } + } + description + "A NAT that associates a particular NAT session not + only with the five tuples used for the transport + connection on both sides of the NAT but also with + the internal interface on which the user device is + connected to the NAT. + + If supported, this mode of operation should be + configurable, and it should be disabled by default in + general-purpose NAT devices. + If one single per-interface binding behavior is + supported by a NAT, this parameter is by default set to + that behavior."; + reference + "Section 4 of RFC 6619"; + } + list nat-pass-through { + if-feature "basic-nat44 or napt44 or dst-nat"; + key "id"; + description + "IP prefix NAT pass-through."; + leaf id { + type uint32; + description + "An identifier of the IP prefix pass-through."; + } + leaf prefix { + type inet:ip-prefix; + mandatory true; + description + "The IP addresses that match should not be translated. + + It must be possible to administratively turn + off translation for specific destination addresses + and/or ports."; + reference + "REQ-6 of RFC 6888"; + } + leaf port { + type inet:port-number; + description + "It must be possible to administratively turn off + translation for specific destination addresses + and/or ports. + + If no prefix is defined, the NAT pass-through bound + to a given port applies for any destination address."; + reference + "REQ-6 of RFC 6888"; + } + } + list policy { + key "id"; + description + "NAT parameters for a given instance"; + leaf id { + type uint32; + description + "An identifier of the NAT policy. It must be unique + within the NAT instance."; + } + container clat-parameters { + if-feature "clat"; + description + "CLAT parameters."; + list clat-ipv6-prefixes { + key "ipv6-prefix"; + description + "464XLAT double-translation treatment is stateless + when a dedicated /64 is available for translation + on the CLAT. Otherwise, the CLAT will have both + stateful and stateless translation since it requires + NAT44 from the LAN to a single IPv4 address and then + stateless translation to a single IPv6 address."; + reference + "RFC 6877: 464XLAT: Combination of Stateful and + Stateless Translation"; + leaf ipv6-prefix { + type inet:ipv6-prefix; + description + "An IPv6 prefix used for CLAT."; + } + } + list ipv4-prefixes { + key "ipv4-prefix"; + description + "Pool of IPv4 addresses used for CLAT. + 192.0.0.0/29 is the IPv4 service continuity prefix."; + reference + "RFC 7335: IPv4 Service Continuity Prefix"; + leaf ipv4-prefix { + type inet:ipv4-prefix; + description + "464XLAT double-translation treatment is + stateless when a dedicated /64 is available + for translation on the CLAT. Otherwise, the + CLAT will have both stateful and stateless + translation since it requires NAT44 from the + LAN to a single IPv4 address and then stateless + translation to a single IPv6 address. + The CLAT performs NAT44 for all IPv4 LAN + packets so that all the LAN-originated IPv4 + packets appear from a single IPv4 address + and are then statelessly translated to one + interface IPv6 address that is claimed by + the CLAT. + + An IPv4 address from this pool is also + provided to an application that makes + use of literals."; + reference + "RFC 6877: 464XLAT: Combination of Stateful and + Stateless Translation"; + } + } + } + list nptv6-prefixes { + if-feature "nptv6"; + key "internal-ipv6-prefix"; + description + "Provides one or a list of (internal IPv6 prefix, + external IPv6 prefix) required for NPTv6. + + In its simplest form, NPTv6 interconnects two + network links: one is an 'internal' network + link attached to a leaf network within a single + administrative domain, and the other is an + 'external' network with connectivity to the + global Internet."; + reference + "RFC 6296: IPv6-to-IPv6 Network Prefix Translation"; + leaf internal-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "An IPv6 prefix used by an internal interface of + NPTv6."; + reference + "RFC 6296: IPv6-to-IPv6 Network Prefix Translation"; + } + leaf external-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "An IPv6 prefix used by the external interface of + NPTv6."; + reference + "RFC 6296: IPv6-to-IPv6 Network Prefix Translation"; + } + } + list eam { + if-feature "eam"; + key "ipv4-prefix"; + description + "The Explicit Address Mapping Table is a conceptual + table in which each row represents an EAM. + + Each EAM describes a mapping between IPv4 and IPv6 + prefixes/addresses."; + reference + "Section 3.1 of RFC 7757"; + leaf ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "The IPv4 prefix of an EAM."; + reference + "Section 3.2 of RFC 7757"; + } + leaf ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "The IPv6 prefix of an EAM."; + reference + "Section 3.2 of RFC 7757"; + } + } + list nat64-prefixes { + if-feature "siit or nat64 or clat"; + key "nat64-prefix"; + description + "Provides one or a list of NAT64 prefixes + with or without a list of destination IPv4 prefixes. + It allows mapping IPv4 address ranges to IPv6 prefixes. + For example: + 192.0.2.0/24 is mapped to 2001:db8:122:300::/56. + 198.51.100.0/24 is mapped to 2001:db8:122::/48."; + reference + "Section 5.1 of RFC 7050"; + leaf nat64-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "A NAT64 prefix. Can be a Network-Specific Prefix (NSP) + or a Well-Known Prefix (WKP). + + Organizations deploying stateless IPv4/IPv6 translation + should assign an NSP to their IPv4/IPv6 translation + service. + For stateless NAT64, IPv4-translatable IPv6 addresses + must use the selected NSP. + + Both IPv4-translatable IPv6 addresses and + IPv4-converted IPv6 addresses should use + the same prefix."; + reference + "Sections 3.3 and 3.4 of RFC 6052"; + } + list destination-ipv4-prefix { + key "ipv4-prefix"; + description + "An IPv4 prefix/address."; + leaf ipv4-prefix { + type inet:ipv4-prefix; + description + "An IPv4 address/prefix."; + } + } + leaf stateless-enable { + type boolean; + default "false"; + description + "Enable explicitly stateless NAT64."; + } + } + list external-ip-address-pool { + if-feature "basic-nat44 or napt44 or nat64"; + key "pool-id"; + description + "Pool of external IP addresses used to service internal + hosts. + + A pool is a set of IP prefixes."; + leaf pool-id { + type uint32; + must '. >= 1'; + description + "An identifier that uniquely identifies the address pool + within a NAT instance. + + The identifier must be greater than zero."; + reference + "RFC 7659: Definitions of Managed Objects for + Network Address Translators (NATs)"; + } + leaf external-ip-pool { + type inet:ipv4-prefix; + mandatory true; + description + "An IPv4 prefix used for NAT purposes."; + } + } + container port-set-restrict { + if-feature "napt44 or nat64"; + description + "Configures contiguous and non-contiguous port ranges. + + The port set is used to restrict the external source + port numbers used by the translator."; + uses port-set; + } + leaf dst-nat-enable { + if-feature "basic-nat44 or napt44"; + type boolean; + default "false"; + description + "Enable/disable Destination NAT. + + A NAT44 may be configured to enable Destination + NAT, too."; + } + list dst-ip-address-pool { + if-feature "dst-nat"; + key "pool-id"; + description + "Pool of IP addresses used for Destination NAT."; + leaf pool-id { + type uint32; + description + "An identifier of the address pool."; + } + leaf dst-in-ip-pool { + type inet:ip-prefix; + description + "Is used to identify an internal destination + IP prefix/address to be translated."; + } + leaf dst-out-ip-pool { + type inet:ip-prefix; + mandatory true; + description + "IP address/prefix used for Destination NAT."; + } + } + list transport-protocols { + if-feature "napt44 or nat64 or dst-nat"; + key "protocol-id"; + description + "Configure the transport protocols to be handled by + the translator. + + TCP and UDP are supported by default."; + leaf protocol-id { + type uint8; + mandatory true; + description + "The upper-layer protocol associated with this + mapping. + + Values are taken from the IANA Protocol Numbers + registry. + + For example, this field contains 6 for TCP, + 17 for UDP, 33 for DCCP, or 132 for SCTP."; + } + leaf protocol-name { + type string; + description + "The name of the upper-layer protocol associated + with this mapping. + + For example, TCP, UDP, DCCP, and SCTP."; + } + } + leaf subscriber-mask-v6 { + type uint8 { + range "0 .. 128"; + } + description + "The subscriber mask is an integer that indicates + the length of significant bits to be applied on + the source IPv6 address (internal side) to + unambiguously identify a user device (e.g., CPE). + + Subscriber mask is a system-wide configuration + parameter that is used to enforce generic + per-subscriber policies (e.g., port-quota). + + The enforcement of these generic policies does not + require the configuration of every subscriber's + prefix. + + Example: suppose the 2001:db8:100:100::/56 prefix + is assigned to a NAT64-serviced CPE. Suppose also + that 2001:db8:100:100::1 is the IPv6 address used + by the client that resides in that CPE. When the + NAT64 receives a packet from this client, + it applies the subscriber-mask-v6 (e.g., 56) on + the source IPv6 address to compute the associated + prefix for this client (2001:db8:100:100::/56). + Then, the NAT64 enforces policies based on that + prefix (2001:db8:100:100::/56), not on the exact + source IPv6 address."; + } + list subscriber-match { + if-feature "basic-nat44 or napt44 or dst-nat"; + key "match-id"; + description + "IP prefix match. + A subscriber is identified by a subnet."; + leaf match-id { + type uint32; + description + "An identifier of the subscriber match."; + } + leaf subnet { + type inet:ip-prefix; + mandatory true; + description + "The IP address subnets that match + should be translated. For example, all addresses + that belong to the 192.0.2.0/24 prefix must + be processed by the NAT."; + } + } + leaf address-allocation-type { + type enumeration { + enum arbitrary { + if-feature "basic-nat44 or napt44 or nat64"; + description + "Arbitrary pooling behavior means that the NAT + instance may create the new port mapping using any + address in the pool that has a free port for the + protocol concerned."; + } + enum roundrobin { + if-feature "basic-nat44 or napt44 or nat64"; + description + "Round-robin allocation."; + } + enum paired { + if-feature "napt44 or nat64"; + description + "Paired address pooling informs the NAT + that all the flows from an internal IP + address must be assigned the same external + address. This is the recommended behavior + for NAPT/NAT64."; + reference + "RFC 4787: Network Address Translation (NAT) + Behavioral Requirements for Unicast UDP"; + } + } + description + "Specifies how external IP addresses are allocated."; + } + leaf port-allocation-type { + if-feature "napt44 or nat64"; + type enumeration { + enum random { + description + "Port randomization is enabled. A NAT port allocation + scheme should make it hard for attackers to guess + port numbers"; + reference + "REQ-15 of RFC 6888"; + } + enum port-preservation { + description + "Indicates whether the NAT should preserve the + internal port number."; + } + enum port-parity-preservation { + description + "Indicates whether the NAT should preserve the port + parity of the internal port number."; + } + enum port-range-allocation { + description + "Indicates whether the NAT assigns a range of ports + for an internal host. This scheme allows the + minimizing of the log volume."; + reference + "REQ-14 of RFC 6888"; + } + } + description + "Indicates the type of port allocation."; + } + leaf mapping-type { + if-feature "napt44 or nat64"; + type enumeration { + enum eim { + description + "endpoint-independent-mapping."; + reference + "Section 4 of RFC 4787"; + } + enum adm { + description + "address-dependent-mapping."; + reference + "Section 4 of RFC 4787"; + } + enum edm { + description + "address-and-port-dependent-mapping."; + reference + "Section 4 of RFC 4787"; + } + } + description + "Indicates the type of NAT mapping."; + } + leaf filtering-type { + if-feature "napt44 or nat64"; + type enumeration { + enum eif { + description + "endpoint-independent-filtering."; + reference + "Section 5 of RFC 4787"; + } + enum adf { + description + "address-dependent-filtering."; + reference + "Section 5 of RFC 4787"; + } + enum edf { + description + "address-and-port-dependent-filtering"; + reference + "Section 5 of RFC 4787"; + } + } + description + "Indicates the type of NAT filtering."; + } + leaf fragment-behavior { + if-feature "napt44 or nat64"; + type enumeration { + enum drop-all { + description + "All received fragments are dropped."; + } + enum in-order { + description + "Translate fragments only if they are received + in order."; + } + enum out-of-order { + description + "Translate a fragment even if it is received out + of order. + + This behavior is recommended."; + reference + "REQ-14 of RFC 4787"; + } + } + description + "The fragment behavior instructs the NAT about the + behavior to follow to translate fragments received + on the external interface of the NAT."; + } + list port-quota { + if-feature "napt44 or nat64"; + key "quota-type"; + description + "Configures a port quota to be assigned per subscriber. + It corresponds to the maximum number of ports to be + used by a subscriber."; + leaf port-limit { + type uint16; + description + "Configures a port quota to be assigned per subscriber. + It corresponds to the maximum number of ports to be + used by a subscriber."; + reference + "REQ-4 of RFC 6888"; + } + leaf quota-type { + type uint8; + description + "Indicates whether the port quota applies to + all protocols (0) or to a specific protocol."; + } + } + container port-set { + when "../port-allocation-type = 'port-range-allocation'"; + if-feature "napt44 or nat64"; + description + "Manages port-set assignments."; + leaf port-set-size { + type uint16; + mandatory true; + description + "Indicates the size of assigned port sets."; + } + leaf port-set-timeout { + type uint32; + units "seconds"; + description + "inactivity timeout for port sets."; + } + } + container timers { + if-feature "napt44 or nat64"; + description + "Configure values of various timeouts."; + leaf udp-timeout { + type uint32; + units "seconds"; + default "300"; + description + "UDP inactivity timeout. That is the time a mapping + will stay active without packets traversing the NAT."; + reference + "RFC 4787: Network Address Translation (NAT) + Behavioral Requirements for Unicast UDP"; + } + leaf tcp-idle-timeout { + type uint32; + units "seconds"; + default "7440"; + description + "TCP idle timeout should be 2 hours and 4 minutes."; + reference + "RFC 5382: NAT Behavioral Requirements for TCP"; + } + leaf tcp-trans-open-timeout { + type uint32; + units "seconds"; + default "240"; + description + "The value of the transitory open connection + idle-timeout. + + A NAT should provide different configurable + parameters for configuring the open and + closing idle timeouts. + + To accommodate deployments that consider + a partially open timeout of 4 minutes as being + excessive from a security standpoint, a NAT may + allow the configured timeout to be less than + 4 minutes. + + However, a minimum default transitory connection + idle-timeout of 4 minutes is recommended."; + reference + "Section 2.1 of RFC 7857"; + } + leaf tcp-trans-close-timeout { + type uint32; + units "seconds"; + default "240"; + description + "The value of the transitory close connection + idle-timeout. + + A NAT should provide different configurable + parameters for configuring the open and + closing idle timeouts."; + reference + "Section 2.1 of RFC 7857"; + } + leaf tcp-in-syn-timeout { + type uint32; + units "seconds"; + default "6"; + description + "A NAT must not respond to an unsolicited + inbound SYN packet for at least 6 seconds + after the packet is received. If during + this interval the NAT receives and translates + an outbound SYN for the connection the NAT + must silently drop the original unsolicited + inbound SYN packet."; + reference + "RFC 5382 NAT Behavioral Requirements for TCP"; + } + leaf fragment-min-timeout { + when "../../fragment-behavior='out-of-order'"; + type uint32; + units "seconds"; + default "2"; + description + "As long as the NAT has available resources, + the NAT allows the fragments to arrive + over the fragment-min-timeout interval. + The default value is inspired from RFC 6146."; + } + leaf icmp-timeout { + type uint32; + units "seconds"; + default "60"; + description + "An ICMP Query session timer must not expire + in less than 60 seconds. It is recommended + that the ICMP Query session timer be made + configurable"; + reference + "RFC 5508: NAT Behavioral Requirements for ICMP"; + } + list per-port-timeout { + key "port-number"; + description + "Some NATs are configurable with short timeouts + for some ports, e.g., as 10 seconds on + port 53 (DNS) and 123 (NTP), and longer timeouts + on other ports."; + leaf port-number { + type inet:port-number; + description + "A port number."; + } + leaf protocol { + type uint8; + description + "The upper-layer protocol associated with this port. + + Values are taken from the IANA Protocol Numbers + registry. + + If no protocol is indicated, it means 'any + protocol'."; + } + leaf timeout { + type uint32; + units "seconds"; + mandatory true; + description + "Timeout for this port number"; + } + } + leaf hold-down-timeout { + type uint32; + units "seconds"; + default "120"; + description + "Hold-down timer. + + Ports in the hold-down pool are not reassigned until + hold-down-timeout expires. + + The length of time and the maximum number of ports in + this state must be configurable by the administrator. + + This is necessary in order to prevent collisions + between old and new mappings and sessions. It ensures + that all established sessions are broken instead of + redirected to a different peer."; + reference + "REQ-8 of RFC 6888"; + } + leaf hold-down-max { + type uint32; + description + "Maximum ports in the hold-down port pool."; + reference + "REQ-8 of RFC 6888"; + } + } + leaf fragments-limit { + when "../fragment-behavior='out-of-order'"; + type uint32; + description + "Limits the number of out-of-order fragments that can + be handled."; + reference + "Section 11 of RFC 4787"; + } + list algs { + key "name"; + description + "Features related to the Application Layer + Gateway (ALG)."; + leaf name { + type string; + description + "The name of the ALG."; + } + leaf transport-protocol { + type uint32; + description + "The transport protocol used by the ALG + (e.g., TCP and UDP)."; + } + container dst-transport-port { + uses port-number; + description + "The destination port number(s) used by the ALG. + For example, + - 21 for the FTP ALG + - 53 for the DNS ALG."; + } + container src-transport-port { + uses port-number; + description + "The source port number(s) used by the ALG."; + } + leaf status { + type boolean; + description + "Enable/disable the ALG."; + } + } + leaf all-algs-enable { + type boolean; + description + "Disable/enable all ALGs. + + When specified, this parameter overrides the one + that may be indicated, eventually, by the 'status' + of an individual ALG."; + } + container notify-pool-usage { + if-feature "basic-nat44 or napt44 or nat64"; + description + "Notification of pool usage when certain criteria + are met."; + leaf pool-id { + type uint32; + description + "Pool-ID for which the notification criteria + is defined"; + } + leaf low-threshold { + type percent; + description + "Notification must be generated when the defined low + threshold is reached. + + For example, if a notification is required when the + pool utilization reaches below 10%, this + configuration parameter must be set to 10. + + 0% indicates that low-threshold notification is + disabled."; + } + leaf high-threshold { + type percent; + must '. >= ../low-threshold' { + error-message + "The high threshold must be greater than or equal + to the low threshold."; + } + description + "Notification must be generated when the defined high + threshold is reached. + + For example, if a notification is required when the + pool utilization reaches 90%, this configuration + parameter must be set to 90. + + Setting the same value as low-threshold is equivalent + to disabling high-threshold notification."; + } + leaf notify-interval { + type uint32 { + range "1 .. 3600"; + } + units "seconds"; + default "20"; + description + "Minimum number of seconds between successive + notifications for this pool."; + reference + "RFC 7659: Definitions of Managed Objects for + Network Address Translators (NATs)"; + } + } + container external-realm { + description + "Identifies the external realm of the NAT instance."; + choice realm-type { + description + "Can be an interface, VRF instance, etc."; + case interface { + description + "External interface."; + leaf external-interface { + type if:interface-ref; + description + "Name of the external interface."; + } + } + } + } + } + container mapping-limits { + if-feature "napt44 or nat64"; + description + "Information about the configuration parameters that + limits the mappings based upon various criteria."; + leaf limit-subscribers { + type uint32; + description + "Maximum number of subscribers that can be serviced + by a NAT instance. + + A subscriber is identified by a given prefix."; + reference + "RFC 7659: Definitions of Managed Objects for + Network Address Translators (NATs)"; + } + leaf limit-address-mappings { + type uint32; + description + "Maximum number of address mappings that can be + handled by a NAT instance. + + When this limit is reached, packets that would + normally trigger translation will be dropped."; + reference + "RFC 7659: Definitions of Managed Objects for + Network Address Translators (NATs)"; + } + leaf limit-port-mappings { + type uint32; + description + "Maximum number of port mappings that can be handled + by a NAT instance. + + When this limit is reached, packets that would + normally trigger translation will be dropped."; + reference + "RFC 7659: Definitions of Managed Objects for + Network Address Translators (NATs)"; + } + list limit-per-protocol { + if-feature "napt44 or nat64 or dst-nat"; + key "protocol-id"; + description + "Configure limits per transport protocol"; + leaf protocol-id { + type uint8; + mandatory true; + description + "The upper-layer protocol. + + Values are taken from the IANA Protocol Numbers + registry. + + For example, this field contains 6 for TCP, + 17 for UDP, 33 for DCCP, or 132 for SCTP."; + } + leaf limit { + type uint32; + description + "Maximum number of protocol-specific NAT mappings + per instance."; + } + } + } + container connection-limits { + if-feature "basic-nat44 or napt44 or nat64"; + description + "Information about the configuration parameters that + rate-limit the translation based upon various criteria."; + leaf limit-per-subscriber { + type uint32; + units "bits/second"; + description + "Rate-limit the number of new mappings and sessions + per subscriber."; + } + leaf limit-per-instance { + type uint32; + units "bits/second"; + description + "Rate-limit the number of new mappings and sessions + per instance."; + } + list limit-per-protocol { + if-feature "napt44 or nat64"; + key "protocol-id"; + description + "Configure limits per transport protocol"; + leaf protocol-id { + type uint8; + mandatory true; + description + "The upper-layer protocol. + + Values are taken from the IANA Protocol Numbers + registry. + + For example, this field contains 6 for TCP, + 17 for UDP, 33 for DCCP, or 132 for SCTP."; + } + leaf limit { + type uint32; + description + "Limit the number of protocol-specific mappings + and sessions per instance."; + } + } + } + container notification-limits { + description + "Sets notification limits."; + leaf notify-interval { + if-feature "basic-nat44 or napt44 or nat64"; + type uint32 { + range "1 .. 3600"; + } + units "seconds"; + default "10"; + description + "Minimum number of seconds between successive + notifications for this NAT instance."; + reference + "RFC 7659: Definitions of Managed Objects for + Network Address Translators (NATs)"; + } + leaf notify-addresses-usage { + if-feature "basic-nat44 or napt44 or nat64"; + type percent; + description + "Notification of address mappings usage over + the whole NAT instance. + + Notification must be generated when the defined + threshold is reached. + + For example, if a notification is required when + the address mappings utilization reaches 90%, + this configuration parameter must be set + to 90."; + } + leaf notify-ports-usage { + if-feature "napt44 or nat64"; + type percent; + description + "Notification of port mappings usage over the + whole NAT instance. + + Notification must be generated when the defined + threshold is reached. + + For example, if a notification is required when + the port mappings utilization reaches 90%, this + configuration parameter must be set to 90."; + } + leaf notify-subscribers-limit { + if-feature "basic-nat44 or napt44 or nat64"; + type uint32; + description + "Notification of active subscribers per NAT + instance. + + Notification must be generated when the defined + threshold is reached."; + } + } + container mapping-table { + if-feature "basic-nat44 or napt44 or nat64 " + + "or clat or dst-nat"; + description + "NAT mapping table. Applicable for functions that maintain + static and/or dynamic mappings, such as NAT44, Destination + NAT, NAT64, or CLAT."; + list mapping-entry { + key "index"; + description + "NAT mapping entry."; + uses mapping-entry; + } + } + container statistics { + config false; + description + "Statistics related to the NAT instance."; + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which the NAT + instance suffered a discontinuity. This must be + initialized when the NAT instance is configured + or rebooted."; + } + container traffic-statistics { + description + "Generic traffic statistics."; + leaf sent-packets { + type yang:zero-based-counter64; + description + "Number of packets sent."; + } + leaf sent-bytes { + type yang:zero-based-counter64; + units "bytes"; + description + "Counter for sent traffic in bytes."; + } + leaf rcvd-packets { + type yang:zero-based-counter64; + description + "Number of received packets."; + } + leaf rcvd-bytes { + type yang:zero-based-counter64; + units "bytes"; + description + "Counter for received traffic in bytes."; + } + leaf dropped-packets { + type yang:zero-based-counter64; + description + "Number of dropped packets."; + } + leaf dropped-bytes { + type yang:zero-based-counter64; + units "bytes"; + description + "Counter for dropped traffic in bytes."; + } + leaf dropped-fragments { + if-feature "napt44 or nat64"; + type yang:zero-based-counter64; + description + "Number of dropped fragments on the external realm."; + } + leaf dropped-address-limit-packets { + if-feature "basic-nat44 or napt44 or nat64"; + type yang:zero-based-counter64; + description + "Number of dropped packets because an address limit + is reached."; + } + leaf dropped-address-limit-bytes { + if-feature "basic-nat44 or napt44 or nat64"; + type yang:zero-based-counter64; + units "bytes"; + description + "Counter of dropped packets because an address limit + is reached, in bytes."; + } + leaf dropped-address-packets { + if-feature "basic-nat44 or napt44 or nat64"; + type yang:zero-based-counter64; + description + "Number of dropped packets because no address is + available for allocation."; + } + leaf dropped-address-bytes { + if-feature "basic-nat44 or napt44 or nat64"; + type yang:zero-based-counter64; + units "bytes"; + description + "Counter of dropped packets because no address is + available for allocation, in bytes."; + } + leaf dropped-port-limit-packets { + if-feature "napt44 or nat64"; + type yang:zero-based-counter64; + description + "Number of dropped packets because a port limit + is reached."; + } + leaf dropped-port-limit-bytes { + if-feature "napt44 or nat64"; + type yang:zero-based-counter64; + units "bytes"; + description + "Counter of dropped packets because a port limit + is reached, in bytes."; + } + leaf dropped-port-packets { + if-feature "napt44 or nat64"; + type yang:zero-based-counter64; + description + "Number of dropped packets because no port is + available for allocation."; + } + leaf dropped-port-bytes { + if-feature "napt44 or nat64"; + type yang:zero-based-counter64; + units "bytes"; + description + "Counter of dropped packets because no port is + available for allocation, in bytes."; + } + leaf dropped-subscriber-limit-packets { + if-feature "basic-nat44 or napt44 or nat64"; + type yang:zero-based-counter64; + description + "Number of dropped packets because the subscriber + limit per instance is reached."; + } + leaf dropped-subscriber-limit-bytes { + if-feature "basic-nat44 or napt44 or nat64"; + type yang:zero-based-counter64; + units "bytes"; + description + "Counter of dropped packets because the subscriber + limit per instance is reached, in bytes."; + } + } + container mappings-statistics { + description + "Mappings statistics."; + leaf total-active-subscribers { + if-feature "basic-nat44 or napt44 or nat64"; + type yang:gauge32; + description + "Total number of active subscribers (that is, + subscribers for which the NAT maintains active + mappings). + + A subscriber is identified by a subnet, + subscriber-mask, etc."; + } + leaf total-address-mappings { + if-feature "basic-nat44 or napt44 or nat64 " + + "or clat or dst-nat"; + type yang:gauge32; + description + "Total number of address mappings present at a given + time. It includes both static and dynamic mappings."; + reference + "Section 3.3.8 of RFC 7659"; + } + leaf total-port-mappings { + if-feature "napt44 or nat64"; + type yang:gauge32; + description + "Total number of NAT port mappings present at + a given time. It includes both static and dynamic + mappings."; + reference + "Section 3.3.9 of RFC 7659"; + } + list total-per-protocol { + if-feature "napt44 or nat64"; + key "protocol-id"; + description + "Total mappings for each enabled/supported protocol."; + leaf protocol-id { + type uint8; + mandatory true; + description + "The upper-layer protocol. + For example, this field contains 6 for TCP, + 17 for UDP, 33 for DCCP, or 132 for SCTP."; + } + leaf total { + type yang:gauge32; + description + "Total number of a protocol-specific mappings present + at a given time. The protocol is identified by + protocol-id."; + } + } + } + container pools-stats { + if-feature "basic-nat44 or napt44 or nat64"; + description + "Statistics related to address/prefix pools + usage"; + leaf addresses-allocated { + type yang:gauge32; + description + "Number of all allocated addresses."; + } + leaf addresses-free { + type yang:gauge32; + description + "Number of unallocated addresses of all pools at + a given time. The sum of unallocated and allocated + addresses is the total number of addresses of + the pools."; + } + container ports-stats { + if-feature "napt44 or nat64"; + description + "Statistics related to port numbers usage."; + leaf ports-allocated { + type yang:gauge32; + description + "Number of allocated ports from all pools."; + } + leaf ports-free { + type yang:gauge32; + description + "Number of unallocated addresses from all pools."; + } + } + list per-pool-stats { + if-feature "basic-nat44 or napt44 or nat64"; + key "pool-id"; + description + "Statistics related to address/prefix pool usage"; + leaf pool-id { + type uint32; + description + "Unique identifier that represents a pool of + addresses/prefixes."; + } + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which this + pool counter suffered a discontinuity. This must + be initialized when the address pool is + configured."; + } + container pool-stats { + description + "Statistics related to address/prefix pool usage"; + leaf addresses-allocated { + type yang:gauge32; + description + "Number of allocated addresses from this pool."; + } + leaf addresses-free { + type yang:gauge32; + description + "Number of unallocated addresses in this pool."; + } + } + container port-stats { + if-feature "napt44 or nat64"; + description + "Statistics related to port numbers usage."; + leaf ports-allocated { + type yang:gauge32; + description + "Number of allocated ports from this pool."; + } + leaf ports-free { + type yang:gauge32; + description + "Number of unallocated addresses from this pool."; + } + } + } + } + } + } + } + } + + /* + * Notifications + */ + + notification nat-pool-event { + if-feature "basic-nat44 or napt44 or nat64"; + description + "Notifications must be generated when the defined high/low + threshold is reached. Related configuration parameters + must be provided to trigger the notifications."; + leaf id { + type leafref { + path "/nat/instances/instance/id"; + } + mandatory true; + description + "NAT instance identifier."; + } + leaf policy-id { + type leafref { + path "/nat/instances/instance/policy/id"; + } + description + "Policy identifier."; + } + leaf pool-id { + type leafref { + path "/nat/instances/instance/policy" + + "/external-ip-address-pool/pool-id"; + } + mandatory true; + description + "Pool Identifier."; + } + leaf notify-pool-threshold { + type percent; + mandatory true; + description + "A threshold (high threshold or low threshold) has + been fired."; + } + } + + notification nat-instance-event { + if-feature "basic-nat44 or napt44 or nat64"; + description + "Notifications must be generated when notify-addresses-usage + and/or notify-ports-usage thresholds are reached."; + leaf id { + type leafref { + path "/nat/instances/instance/id"; + } + mandatory true; + description + "NAT instance identifier."; + } + leaf notify-subscribers-threshold { + type uint32; + description + "The notify-subscribers-limit threshold has been fired."; + } + leaf notify-addresses-threshold { + type percent; + description + "The notify-addresses-usage threshold has been fired."; + } + leaf notify-ports-threshold { + type percent; + description + "The notify-ports-usage threshold has been fired."; + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-acm.yang b/models/ietf/RFC/ietf-netconf-acm.yang new file mode 100644 index 0000000000000000000000000000000000000000..bf4855faf0508a152471f6c6c8f756581b8ebb96 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-acm.yang @@ -0,0 +1,464 @@ +module ietf-netconf-acm { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"; + + prefix nacm; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "Network Configuration Access Control Model. + + Copyright (c) 2012 - 2018 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 Simplified 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 8341; see + the RFC itself for full legal notices."; + + revision "2018-02-14" { + description + "Added support for YANG 1.1 actions and notifications tied to + data nodes. Clarified how NACM extensions can be used by + other data models."; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + revision "2012-02-22" { + description + "Initial version."; + reference + "RFC 6536: Network Configuration Protocol (NETCONF) + Access Control Model"; + } + + /* + * Extension statements + */ + + extension default-deny-write { + description + "Used to indicate that the data model node + represents a sensitive security system parameter. + + If present, the NETCONF server will only allow the designated + 'recovery session' to have write access to the node. An + explicit access control rule is required for all other users. + + If the NACM module is used, then it must be enabled (i.e., + /nacm/enable-nacm object equals 'true'), or this extension + is ignored. + + The 'default-deny-write' extension MAY appear within a data + definition statement. It is ignored otherwise."; + } + + extension default-deny-all { + description + "Used to indicate that the data model node + controls a very sensitive security system parameter. + + If present, the NETCONF server will only allow the designated + 'recovery session' to have read, write, or execute access to + the node. An explicit access control rule is required for all + other users. + + If the NACM module is used, then it must be enabled (i.e., + /nacm/enable-nacm object equals 'true'), or this extension + is ignored. + + The 'default-deny-all' extension MAY appear within a data + definition statement, 'rpc' statement, or 'notification' + statement. It is ignored otherwise."; + } + + /* + * Derived types + */ + + typedef user-name-type { + type string { + length "1..max"; + } + description + "General-purpose username string."; + } + + typedef matchall-string-type { + type string { + pattern '\*'; + } + description + "The string containing a single asterisk '*' is used + to conceptually represent all possible values + for the particular leaf using this data type."; + } + + typedef access-operations-type { + type bits { + bit create { + description + "Any protocol operation that creates a + new data node."; + } + bit read { + description + "Any protocol operation or notification that + returns the value of a data node."; + } + bit update { + description + "Any protocol operation that alters an existing + data node."; + } + bit delete { + description + "Any protocol operation that removes a data node."; + } + bit exec { + description + "Execution access to the specified protocol operation."; + } + } + description + "Access operation."; + } + + typedef group-name-type { + type string { + length "1..max"; + pattern '[^\*].*'; + } + description + "Name of administrative group to which + users can be assigned."; + } + + typedef action-type { + type enumeration { + enum permit { + description + "Requested action is permitted."; + } + enum deny { + description + "Requested action is denied."; + } + } + description + "Action taken by the server when a particular + rule matches."; + } + + typedef node-instance-identifier { + type yang:xpath1.0; + description + "Path expression used to represent a special + data node, action, or notification instance-identifier + string. + + A node-instance-identifier value is an + unrestricted YANG instance-identifier expression. + All the same rules as an instance-identifier apply, + except that predicates for keys are optional. If a key + predicate is missing, then the node-instance-identifier + represents all possible server instances for that key. + + This XML Path Language (XPath) expression is evaluated in the + following context: + + o The set of namespace declarations are those in scope on + the leaf element where this type is used. + + o The set of variable bindings contains one variable, + 'USER', which contains the name of the user of the + current session. + + o The function library is the core function library, but + note that due to the syntax restrictions of an + instance-identifier, no functions are allowed. + + o The context node is the root node in the data tree. + + The accessible tree includes actions and notifications tied + to data nodes."; + } + + /* + * Data definition statements + */ + + container nacm { + nacm:default-deny-all; + + description + "Parameters for NETCONF access control model."; + + leaf enable-nacm { + type boolean; + default "true"; + description + "Enables or disables all NETCONF access control + enforcement. If 'true', then enforcement + is enabled. If 'false', then enforcement + is disabled."; + } + + leaf read-default { + type action-type; + default "permit"; + description + "Controls whether read access is granted if + no appropriate rule is found for a + particular read request."; + } + + leaf write-default { + type action-type; + default "deny"; + description + "Controls whether create, update, or delete access + is granted if no appropriate rule is found for a + particular write request."; + } + + leaf exec-default { + type action-type; + default "permit"; + description + "Controls whether exec access is granted if no appropriate + rule is found for a particular protocol operation request."; + } + + leaf enable-external-groups { + type boolean; + default "true"; + description + "Controls whether the server uses the groups reported by the + NETCONF transport layer when it assigns the user to a set of + NACM groups. If this leaf has the value 'false', any group + names reported by the transport layer are ignored by the + server."; + } + + leaf denied-operations { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request was denied."; + } + + leaf denied-data-writes { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request to alter + a configuration datastore was denied."; + } + + leaf denied-notifications { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that + a notification was dropped for a subscription because + access to the event type was denied."; + } + + container groups { + description + "NETCONF access control groups."; + + list group { + key name; + + description + "One NACM group entry. This list will only contain + configured entries, not any entries learned from + any transport protocols."; + + leaf name { + type group-name-type; + description + "Group name associated with this entry."; + } + + leaf-list user-name { + type user-name-type; + description + "Each entry identifies the username of + a member of the group associated with + this entry."; + } + } + } + + list rule-list { + key name; + ordered-by user; + description + "An ordered collection of access control rules."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule-list."; + } + leaf-list group { + type union { + type matchall-string-type; + type group-name-type; + } + description + "List of administrative groups that will be + assigned the associated access rights + defined by the 'rule' list. + + The string '*' indicates that all groups apply to the + entry."; + } + + list rule { + key name; + ordered-by user; + description + "One access control rule. + + Rules are processed in user-defined order until a match is + found. A rule matches if 'module-name', 'rule-type', and + 'access-operations' match the request. If a rule + matches, the 'action' leaf determines whether or not + access is granted."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule."; + } + + leaf module-name { + type union { + type matchall-string-type; + type string; + } + default "*"; + description + "Name of the module associated with this rule. + + This leaf matches if it has the value '*' or if the + object being accessed is defined in the module with the + specified module name."; + } + choice rule-type { + description + "This choice matches if all leafs present in the rule + match the request. If no leafs are present, the + choice matches all requests."; + case protocol-operation { + leaf rpc-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if + its value equals the requested protocol operation + name."; + } + } + case notification { + leaf notification-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if its + value equals the requested notification name."; + } + } + + case data-node { + leaf path { + type node-instance-identifier; + mandatory true; + description + "Data node instance-identifier associated with the + data node, action, or notification controlled by + this rule. + + Configuration data or state data + instance-identifiers start with a top-level + data node. A complete instance-identifier is + required for this type of path value. + + The special value '/' refers to all possible + datastore contents."; + } + } + } + + leaf access-operations { + type union { + type matchall-string-type; + type access-operations-type; + } + default "*"; + description + "Access operations associated with this rule. + + This leaf matches if it has the value '*' or if the + bit corresponding to the requested operation is set."; + } + + leaf action { + type action-type; + mandatory true; + description + "The access control action associated with the + rule. If a rule has been determined to match a + particular request, then this object is used + to determine whether to permit or deny the + request."; + } + + leaf comment { + type string; + description + "A textual description of the access rule."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-acm@2012-02-22.yang b/models/ietf/RFC/ietf-netconf-acm@2012-02-22.yang new file mode 100644 index 0000000000000000000000000000000000000000..93ac229fe13dc9b8bd999f8e165ebd4d4c1aaf7f --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-acm@2012-02-22.yang @@ -0,0 +1,449 @@ +module ietf-netconf-acm { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"; + + prefix "nacm"; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Bert Wijnen + <mailto:bertietf@bwijnen.net> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "NETCONF Access Control Model. + + Copyright (c) 2012 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6536; see + the RFC itself for full legal notices."; + + revision "2012-02-22" { + description + "Initial version"; + reference + "RFC 6536: Network Configuration Protocol (NETCONF) + Access Control Model"; + } + + /* + * Extension statements + */ + + extension default-deny-write { + description + "Used to indicate that the data model node + represents a sensitive security system parameter. + + If present, and the NACM module is enabled (i.e., + /nacm/enable-nacm object equals 'true'), the NETCONF server + will only allow the designated 'recovery session' to have + write access to the node. An explicit access control rule is + required for all other users. + + The 'default-deny-write' extension MAY appear within a data + definition statement. It is ignored otherwise."; + } + + extension default-deny-all { + description + "Used to indicate that the data model node + controls a very sensitive security system parameter. + + If present, and the NACM module is enabled (i.e., + /nacm/enable-nacm object equals 'true'), the NETCONF server + will only allow the designated 'recovery session' to have + read, write, or execute access to the node. An explicit + access control rule is required for all other users. + + The 'default-deny-all' extension MAY appear within a data + definition statement, 'rpc' statement, or 'notification' + statement. It is ignored otherwise."; + } + + /* + * Derived types + */ + + typedef user-name-type { + type string { + length "1..max"; + } + description + "General Purpose Username string."; + } + + typedef matchall-string-type { + type string { + pattern "\*"; + } + description + "The string containing a single asterisk '*' is used + to conceptually represent all possible values + for the particular leaf using this data type."; + } + + typedef access-operations-type { + type bits { + bit create { + description + "Any protocol operation that creates a + new data node."; + } + bit read { + description + "Any protocol operation or notification that + returns the value of a data node."; + } + bit update { + description + "Any protocol operation that alters an existing + data node."; + } + bit delete { + description + "Any protocol operation that removes a data node."; + } + bit exec { + description + "Execution access to the specified protocol operation."; + } + } + description + "NETCONF Access Operation."; + } + + typedef group-name-type { + type string { + length "1..max"; + pattern "[^\*].*"; + } + description + "Name of administrative group to which + users can be assigned."; + } + + typedef action-type { + type enumeration { + enum permit { + description + "Requested action is permitted."; + } + enum deny { + description + "Requested action is denied."; + } + } + description + "Action taken by the server when a particular + rule matches."; + } + + typedef node-instance-identifier { + type yang:xpath1.0; + description + "Path expression used to represent a special + data node instance identifier string. + + A node-instance-identifier value is an + unrestricted YANG instance-identifier expression. + All the same rules as an instance-identifier apply + except predicates for keys are optional. If a key + predicate is missing, then the node-instance-identifier + represents all possible server instances for that key. + + This XPath expression is evaluated in the following context: + + o The set of namespace declarations are those in scope on + the leaf element where this type is used. + + o The set of variable bindings contains one variable, + 'USER', which contains the name of the user of the current + session. + + o The function library is the core function library, but + note that due to the syntax restrictions of an + instance-identifier, no functions are allowed. + + o The context node is the root node in the data tree."; + } + + /* + * Data definition statements + */ + + container nacm { + nacm:default-deny-all; + + description + "Parameters for NETCONF Access Control Model."; + + leaf enable-nacm { + type boolean; + default true; + description + "Enables or disables all NETCONF access control + enforcement. If 'true', then enforcement + is enabled. If 'false', then enforcement + is disabled."; + } + + leaf read-default { + type action-type; + default "permit"; + description + "Controls whether read access is granted if + no appropriate rule is found for a + particular read request."; + } + + leaf write-default { + type action-type; + default "deny"; + description + "Controls whether create, update, or delete access + is granted if no appropriate rule is found for a + particular write request."; + } + + leaf exec-default { + type action-type; + default "permit"; + description + "Controls whether exec access is granted if no appropriate + rule is found for a particular protocol operation request."; + } + + leaf enable-external-groups { + type boolean; + default true; + description + "Controls whether the server uses the groups reported by the + NETCONF transport layer when it assigns the user to a set of + NACM groups. If this leaf has the value 'false', any group + names reported by the transport layer are ignored by the + server."; + } + + leaf denied-operations { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request was denied."; + } + + leaf denied-data-writes { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request to alter + a configuration datastore was denied."; + } + + leaf denied-notifications { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that + a notification was dropped for a subscription because + access to the event type was denied."; + } + + container groups { + description + "NETCONF Access Control Groups."; + + list group { + key name; + + description + "One NACM Group Entry. This list will only contain + configured entries, not any entries learned from + any transport protocols."; + + leaf name { + type group-name-type; + description + "Group name associated with this entry."; + } + + leaf-list user-name { + type user-name-type; + description + "Each entry identifies the username of + a member of the group associated with + this entry."; + } + } + } + + list rule-list { + key "name"; + ordered-by user; + description + "An ordered collection of access control rules."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule-list."; + } + leaf-list group { + type union { + type matchall-string-type; + type group-name-type; + } + description + "List of administrative groups that will be + assigned the associated access rights + defined by the 'rule' list. + + The string '*' indicates that all groups apply to the + entry."; + } + + list rule { + key "name"; + ordered-by user; + description + "One access control rule. + + Rules are processed in user-defined order until a match is + found. A rule matches if 'module-name', 'rule-type', and + 'access-operations' match the request. If a rule + matches, the 'action' leaf determines if access is granted + or not."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule."; + } + + leaf module-name { + type union { + type matchall-string-type; + type string; + } + default "*"; + description + "Name of the module associated with this rule. + + This leaf matches if it has the value '*' or if the + object being accessed is defined in the module with the + specified module name."; + } + choice rule-type { + description + "This choice matches if all leafs present in the rule + match the request. If no leafs are present, the + choice matches all requests."; + case protocol-operation { + leaf rpc-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if + its value equals the requested protocol operation + name."; + } + } + case notification { + leaf notification-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if its + value equals the requested notification name."; + } + } + case data-node { + leaf path { + type node-instance-identifier; + mandatory true; + description + "Data Node Instance Identifier associated with the + data node controlled by this rule. + + Configuration data or state data instance + identifiers start with a top-level data node. A + complete instance identifier is required for this + type of path value. + + The special value '/' refers to all possible + datastore contents."; + } + } + } + + leaf access-operations { + type union { + type matchall-string-type; + type access-operations-type; + } + default "*"; + description + "Access operations associated with this rule. + + This leaf matches if it has the value '*' or if the + bit corresponding to the requested operation is set."; + } + + leaf action { + type action-type; + mandatory true; + description + "The access control action associated with the + rule. If a rule is determined to match a + particular request, then this object is used + to determine whether to permit or deny the + request."; + } + + leaf comment { + type string; + description + "A textual description of the access rule."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-acm@2018-02-14.yang b/models/ietf/RFC/ietf-netconf-acm@2018-02-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..bf4855faf0508a152471f6c6c8f756581b8ebb96 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-acm@2018-02-14.yang @@ -0,0 +1,464 @@ +module ietf-netconf-acm { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"; + + prefix nacm; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "Network Configuration Access Control Model. + + Copyright (c) 2012 - 2018 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 Simplified 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 8341; see + the RFC itself for full legal notices."; + + revision "2018-02-14" { + description + "Added support for YANG 1.1 actions and notifications tied to + data nodes. Clarified how NACM extensions can be used by + other data models."; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + revision "2012-02-22" { + description + "Initial version."; + reference + "RFC 6536: Network Configuration Protocol (NETCONF) + Access Control Model"; + } + + /* + * Extension statements + */ + + extension default-deny-write { + description + "Used to indicate that the data model node + represents a sensitive security system parameter. + + If present, the NETCONF server will only allow the designated + 'recovery session' to have write access to the node. An + explicit access control rule is required for all other users. + + If the NACM module is used, then it must be enabled (i.e., + /nacm/enable-nacm object equals 'true'), or this extension + is ignored. + + The 'default-deny-write' extension MAY appear within a data + definition statement. It is ignored otherwise."; + } + + extension default-deny-all { + description + "Used to indicate that the data model node + controls a very sensitive security system parameter. + + If present, the NETCONF server will only allow the designated + 'recovery session' to have read, write, or execute access to + the node. An explicit access control rule is required for all + other users. + + If the NACM module is used, then it must be enabled (i.e., + /nacm/enable-nacm object equals 'true'), or this extension + is ignored. + + The 'default-deny-all' extension MAY appear within a data + definition statement, 'rpc' statement, or 'notification' + statement. It is ignored otherwise."; + } + + /* + * Derived types + */ + + typedef user-name-type { + type string { + length "1..max"; + } + description + "General-purpose username string."; + } + + typedef matchall-string-type { + type string { + pattern '\*'; + } + description + "The string containing a single asterisk '*' is used + to conceptually represent all possible values + for the particular leaf using this data type."; + } + + typedef access-operations-type { + type bits { + bit create { + description + "Any protocol operation that creates a + new data node."; + } + bit read { + description + "Any protocol operation or notification that + returns the value of a data node."; + } + bit update { + description + "Any protocol operation that alters an existing + data node."; + } + bit delete { + description + "Any protocol operation that removes a data node."; + } + bit exec { + description + "Execution access to the specified protocol operation."; + } + } + description + "Access operation."; + } + + typedef group-name-type { + type string { + length "1..max"; + pattern '[^\*].*'; + } + description + "Name of administrative group to which + users can be assigned."; + } + + typedef action-type { + type enumeration { + enum permit { + description + "Requested action is permitted."; + } + enum deny { + description + "Requested action is denied."; + } + } + description + "Action taken by the server when a particular + rule matches."; + } + + typedef node-instance-identifier { + type yang:xpath1.0; + description + "Path expression used to represent a special + data node, action, or notification instance-identifier + string. + + A node-instance-identifier value is an + unrestricted YANG instance-identifier expression. + All the same rules as an instance-identifier apply, + except that predicates for keys are optional. If a key + predicate is missing, then the node-instance-identifier + represents all possible server instances for that key. + + This XML Path Language (XPath) expression is evaluated in the + following context: + + o The set of namespace declarations are those in scope on + the leaf element where this type is used. + + o The set of variable bindings contains one variable, + 'USER', which contains the name of the user of the + current session. + + o The function library is the core function library, but + note that due to the syntax restrictions of an + instance-identifier, no functions are allowed. + + o The context node is the root node in the data tree. + + The accessible tree includes actions and notifications tied + to data nodes."; + } + + /* + * Data definition statements + */ + + container nacm { + nacm:default-deny-all; + + description + "Parameters for NETCONF access control model."; + + leaf enable-nacm { + type boolean; + default "true"; + description + "Enables or disables all NETCONF access control + enforcement. If 'true', then enforcement + is enabled. If 'false', then enforcement + is disabled."; + } + + leaf read-default { + type action-type; + default "permit"; + description + "Controls whether read access is granted if + no appropriate rule is found for a + particular read request."; + } + + leaf write-default { + type action-type; + default "deny"; + description + "Controls whether create, update, or delete access + is granted if no appropriate rule is found for a + particular write request."; + } + + leaf exec-default { + type action-type; + default "permit"; + description + "Controls whether exec access is granted if no appropriate + rule is found for a particular protocol operation request."; + } + + leaf enable-external-groups { + type boolean; + default "true"; + description + "Controls whether the server uses the groups reported by the + NETCONF transport layer when it assigns the user to a set of + NACM groups. If this leaf has the value 'false', any group + names reported by the transport layer are ignored by the + server."; + } + + leaf denied-operations { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request was denied."; + } + + leaf denied-data-writes { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request to alter + a configuration datastore was denied."; + } + + leaf denied-notifications { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that + a notification was dropped for a subscription because + access to the event type was denied."; + } + + container groups { + description + "NETCONF access control groups."; + + list group { + key name; + + description + "One NACM group entry. This list will only contain + configured entries, not any entries learned from + any transport protocols."; + + leaf name { + type group-name-type; + description + "Group name associated with this entry."; + } + + leaf-list user-name { + type user-name-type; + description + "Each entry identifies the username of + a member of the group associated with + this entry."; + } + } + } + + list rule-list { + key name; + ordered-by user; + description + "An ordered collection of access control rules."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule-list."; + } + leaf-list group { + type union { + type matchall-string-type; + type group-name-type; + } + description + "List of administrative groups that will be + assigned the associated access rights + defined by the 'rule' list. + + The string '*' indicates that all groups apply to the + entry."; + } + + list rule { + key name; + ordered-by user; + description + "One access control rule. + + Rules are processed in user-defined order until a match is + found. A rule matches if 'module-name', 'rule-type', and + 'access-operations' match the request. If a rule + matches, the 'action' leaf determines whether or not + access is granted."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule."; + } + + leaf module-name { + type union { + type matchall-string-type; + type string; + } + default "*"; + description + "Name of the module associated with this rule. + + This leaf matches if it has the value '*' or if the + object being accessed is defined in the module with the + specified module name."; + } + choice rule-type { + description + "This choice matches if all leafs present in the rule + match the request. If no leafs are present, the + choice matches all requests."; + case protocol-operation { + leaf rpc-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if + its value equals the requested protocol operation + name."; + } + } + case notification { + leaf notification-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if its + value equals the requested notification name."; + } + } + + case data-node { + leaf path { + type node-instance-identifier; + mandatory true; + description + "Data node instance-identifier associated with the + data node, action, or notification controlled by + this rule. + + Configuration data or state data + instance-identifiers start with a top-level + data node. A complete instance-identifier is + required for this type of path value. + + The special value '/' refers to all possible + datastore contents."; + } + } + } + + leaf access-operations { + type union { + type matchall-string-type; + type access-operations-type; + } + default "*"; + description + "Access operations associated with this rule. + + This leaf matches if it has the value '*' or if the + bit corresponding to the requested operation is set."; + } + + leaf action { + type action-type; + mandatory true; + description + "The access control action associated with the + rule. If a rule has been determined to match a + particular request, then this object is used + to determine whether to permit or deny the + request."; + } + + leaf comment { + type string; + description + "A textual description of the access rule."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-monitoring.yang b/models/ietf/RFC/ietf-netconf-monitoring.yang new file mode 100644 index 0000000000000000000000000000000000000000..8193cf33a37ec920e60ddd8885f13f4cdb1257fd --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-monitoring.yang @@ -0,0 +1,561 @@ +module ietf-netconf-monitoring { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"; + prefix "ncm"; + + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Bert Wijnen + <mailto:bertietf@bwijnen.net> + + Editor: Mark Scott + <mailto:mark.scott@ericsson.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "NETCONF Monitoring Module. + All elements in this module are read-only. + + Copyright (c) 2010 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6022; see + the RFC itself for full legal notices."; + + revision 2010-10-04 { + description + "Initial revision."; + reference + "RFC 6022: YANG Module for NETCONF Monitoring"; + } + + typedef netconf-datastore-type { + type enumeration { + enum running; + enum candidate; + enum startup; + } + description + "Enumeration of possible NETCONF datastore types."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + + identity transport { + description + "Base identity for NETCONF transport types."; + } + + identity netconf-ssh { + base transport; + description + "NETCONF over Secure Shell (SSH)."; + reference + "RFC 4742: Using the NETCONF Configuration Protocol + over Secure SHell (SSH)"; + } + + identity netconf-soap-over-beep { + base transport; + description + "NETCONF over Simple Object Access Protocol (SOAP) over + Blocks Extensible Exchange Protocol (BEEP)."; + + reference + "RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)"; + } + + identity netconf-soap-over-https { + base transport; + description + "NETCONF over Simple Object Access Protocol (SOAP) + over Hypertext Transfer Protocol Secure (HTTPS)."; + reference + "RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)"; + } + + identity netconf-beep { + base transport; + description + "NETCONF over Blocks Extensible Exchange Protocol (BEEP)."; + reference + "RFC 4744: Using the NETCONF Protocol over the + Blocks Extensible Exchange Protocol (BEEP)"; + } + + identity netconf-tls { + base transport; + description + "NETCONF over Transport Layer Security (TLS)."; + reference + "RFC 5539: NETCONF over Transport Layer Security (TLS)"; + } + + identity schema-format { + description + "Base identity for data model schema languages."; + } + + identity xsd { + base schema-format; + description + "W3C XML Schema Definition."; + reference + "W3C REC REC-xmlschema-1-20041028: + XML Schema Part 1: Structures"; + } + + identity yang { + base schema-format; + description + "The YANG data modeling language for NETCONF."; + reference + "RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)"; + } + + identity yin { + base schema-format; + description + "The YIN syntax for YANG."; + reference + "RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)"; + } + + identity rng { + base schema-format; + description + "Regular Language for XML Next Generation (RELAX NG)."; + reference + "ISO/IEC 19757-2:2008: RELAX NG"; + } + + identity rnc { + base schema-format; + description + "Relax NG Compact Syntax"; + reference + "ISO/IEC 19757-2:2008: RELAX NG"; + } + + grouping common-counters { + description + "Counters that exist both per session, and also globally, + accumulated from all sessions."; + + leaf in-rpcs { + type yang:zero-based-counter32; + description + "Number of correct <rpc> messages received."; + } + leaf in-bad-rpcs { + type yang:zero-based-counter32; + + description + "Number of messages received when an <rpc> message was expected, + that were not correct <rpc> messages. This includes XML parse + errors and errors on the rpc layer."; + } + leaf out-rpc-errors { + type yang:zero-based-counter32; + description + "Number of <rpc-reply> messages sent that contained an + <rpc-error> element."; + } + leaf out-notifications { + type yang:zero-based-counter32; + description + "Number of <notification> messages sent."; + } + } + + container netconf-state { + config false; + description + "The netconf-state container is the root of the monitoring + data model."; + + container capabilities { + description + "Contains the list of NETCONF capabilities supported by the + server."; + + leaf-list capability { + type inet:uri; + description + "List of NETCONF capabilities supported by the server."; + } + } + + container datastores { + description + "Contains the list of NETCONF configuration datastores."; + + list datastore { + key name; + description + "List of NETCONF configuration datastores supported by + the NETCONF server and related information."; + + leaf name { + type netconf-datastore-type; + description + "Name of the datastore associated with this list entry."; + } + container locks { + presence + "This container is present only if the datastore + is locked."; + description + "The NETCONF <lock> and <partial-lock> operations allow + a client to lock specific resources in a datastore. The + NETCONF server will prevent changes to the locked + resources by all sessions except the one that acquired + the lock(s). + + Monitoring information is provided for each datastore + entry including details such as the session that acquired + the lock, the type of lock (global or partial) and the + list of locked resources. Multiple locks per datastore + are supported."; + + grouping lock-info { + description + "Lock related parameters, common to both global and + partial locks."; + + leaf locked-by-session { + type uint32; + mandatory true; + description + "The session ID of the session that has locked + this resource. Both a global lock and a partial + lock MUST contain the NETCONF session-id. + + If the lock is held by a session that is not managed + by the NETCONF server (e.g., a CLI session), a session + id of 0 (zero) is reported."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + leaf locked-time { + type yang:date-and-time; + mandatory true; + description + "The date and time of when the resource was + locked."; + } + } + + choice lock-type { + description + "Indicates if a global lock or a set of partial locks + are set."; + + container global-lock { + description + "Present if the global lock is set."; + uses lock-info; + } + + list partial-lock { + key lock-id; + description + "List of partial locks."; + reference + "RFC 5717: Partial Lock Remote Procedure Call (RPC) for + NETCONF"; + + leaf lock-id { + type uint32; + description + "This is the lock id returned in the <partial-lock> + response."; + } + uses lock-info; + leaf-list select { + type yang:xpath1.0; + min-elements 1; + description + "The xpath expression that was used to request + the lock. The select expression indicates the + original intended scope of the lock."; + } + leaf-list locked-node { + type instance-identifier; + description + "The list of instance-identifiers (i.e., the + locked nodes). + + The scope of the partial lock is defined by the list + of locked nodes."; + } + } + } + } + } + } + container schemas { + description + "Contains the list of data model schemas supported by the + server."; + + list schema { + key "identifier version format"; + + description + "List of data model schemas supported by the server."; + + leaf identifier { + type string; + description + "Identifier to uniquely reference the schema. The + identifier is used in the <get-schema> operation and may + be used for other purposes such as file retrieval. + + For modeling languages that support or require a data + model name (e.g., YANG module name) the identifier MUST + match that name. For YANG data models, the identifier is + the name of the module or submodule. In other cases, an + identifier such as a filename MAY be used instead."; + } + leaf version { + type string; + description + "Version of the schema supported. Multiple versions MAY be + supported simultaneously by a NETCONF server. Each + version MUST be reported individually in the schema list, + i.e., with same identifier, possibly different location, + but different version. + + For YANG data models, version is the value of the most + recent YANG 'revision' statement in the module or + submodule, or the empty string if no 'revision' statement + is present."; + } + leaf format { + type identityref { + base schema-format; + } + description + "The data modeling language the schema is written + in (currently xsd, yang, yin, rng, or rnc). + + For YANG data models, 'yang' format MUST be supported and + 'yin' format MAY also be provided."; + } + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace defined by the data model. + + For YANG data models, this is the module's namespace. + If the list entry describes a submodule, this field + contains the namespace of the module to which the + submodule belongs."; + } + leaf-list location { + type union { + type enumeration { + enum "NETCONF"; + } + type inet:uri; + } + description + "One or more locations from which the schema can be + retrieved. This list SHOULD contain at least one + entry per schema. + + A schema entry may be located on a remote file system + (e.g., reference to file system for ftp retrieval) or + retrieved directly from a server supporting the + <get-schema> operation (denoted by the value 'NETCONF')."; + } + } + } + + container sessions { + description + "The sessions container includes session-specific data for + NETCONF management sessions. The session list MUST include + all currently active NETCONF sessions."; + + list session { + key session-id; + description + "All NETCONF sessions managed by the NETCONF server + MUST be reported in this list."; + + leaf session-id { + type uint32 { + range "1..max"; + } + description + "Unique identifier for the session. This value is the + NETCONF session identifier, as defined in RFC 4741."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + leaf transport { + type identityref { + base transport; + } + mandatory true; + description + "Identifies the transport for each session, e.g., + 'netconf-ssh', 'netconf-soap', etc."; + } + leaf username { + type string; + mandatory true; + description + "The username is the client identity that was authenticated + by the NETCONF transport protocol. The algorithm used to + derive the username is NETCONF transport protocol specific + and in addition specific to the authentication mechanism + used by the NETCONF transport protocol."; + } + leaf source-host { + type inet:host; + description + "Host identifier of the NETCONF client. The value + returned is implementation specific (e.g., hostname, + IPv4 address, IPv6 address)"; + } + leaf login-time { + type yang:date-and-time; + mandatory true; + description + "Time at the server at which the session was established."; + } + uses common-counters { + description + "Per-session counters. Zero based with following reset + behaviour: + - at start of a session + - when max value is reached"; + } + } + } + + container statistics { + description + "Statistical data pertaining to the NETCONF server."; + + leaf netconf-start-time { + type yang:date-and-time; + description + "Date and time at which the management subsystem was + started."; + } + leaf in-bad-hellos { + type yang:zero-based-counter32; + description + "Number of sessions silently dropped because an + invalid <hello> message was received. This includes <hello> + messages with a 'session-id' attribute, bad namespace, and + bad capability declarations."; + } + leaf in-sessions { + type yang:zero-based-counter32; + description + "Number of sessions started. This counter is incremented + when a <hello> message with a <session-id> is sent. + + 'in-sessions' - 'in-bad-hellos' = + 'number of correctly started netconf sessions'"; + } + leaf dropped-sessions { + type yang:zero-based-counter32; + + description + "Number of sessions that were abnormally terminated, e.g., + due to idle timeout or transport close. This counter is not + incremented when a session is properly closed by a + <close-session> operation, or killed by a <kill-session> + operation."; + } + uses common-counters { + description + "Global counters, accumulated from all sessions. + Zero based with following reset behaviour: + - re-initialization of NETCONF server + - when max value is reached"; + } + } + } + + rpc get-schema { + description + "This operation is used to retrieve a schema from the + NETCONF server. + + Positive Response: + The NETCONF server returns the requested schema. + + Negative Response: + If requested schema does not exist, the <error-tag> is + 'invalid-value'. + + If more than one schema matches the requested parameters, the + <error-tag> is 'operation-failed', and <error-app-tag> is + 'data-not-unique'."; + + input { + leaf identifier { + type string; + mandatory true; + description + "Identifier for the schema list entry."; + } + leaf version { + type string; + description + "Version of the schema requested. If this parameter is not + present, and more than one version of the schema exists on + the server, a 'data-not-unique' error is returned, as + described above."; + } + leaf format { + type identityref { + base schema-format; + } + description + "The data modeling language of the schema. If this + parameter is not present, and more than one formats of + the schema exists on the server, a 'data-not-unique' error + is returned, as described above."; + } + } + output { + anyxml data { + description + "Contains the schema content."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-monitoring@2010-10-04.yang b/models/ietf/RFC/ietf-netconf-monitoring@2010-10-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..8193cf33a37ec920e60ddd8885f13f4cdb1257fd --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-monitoring@2010-10-04.yang @@ -0,0 +1,561 @@ +module ietf-netconf-monitoring { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"; + prefix "ncm"; + + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Bert Wijnen + <mailto:bertietf@bwijnen.net> + + Editor: Mark Scott + <mailto:mark.scott@ericsson.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "NETCONF Monitoring Module. + All elements in this module are read-only. + + Copyright (c) 2010 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6022; see + the RFC itself for full legal notices."; + + revision 2010-10-04 { + description + "Initial revision."; + reference + "RFC 6022: YANG Module for NETCONF Monitoring"; + } + + typedef netconf-datastore-type { + type enumeration { + enum running; + enum candidate; + enum startup; + } + description + "Enumeration of possible NETCONF datastore types."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + + identity transport { + description + "Base identity for NETCONF transport types."; + } + + identity netconf-ssh { + base transport; + description + "NETCONF over Secure Shell (SSH)."; + reference + "RFC 4742: Using the NETCONF Configuration Protocol + over Secure SHell (SSH)"; + } + + identity netconf-soap-over-beep { + base transport; + description + "NETCONF over Simple Object Access Protocol (SOAP) over + Blocks Extensible Exchange Protocol (BEEP)."; + + reference + "RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)"; + } + + identity netconf-soap-over-https { + base transport; + description + "NETCONF over Simple Object Access Protocol (SOAP) + over Hypertext Transfer Protocol Secure (HTTPS)."; + reference + "RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)"; + } + + identity netconf-beep { + base transport; + description + "NETCONF over Blocks Extensible Exchange Protocol (BEEP)."; + reference + "RFC 4744: Using the NETCONF Protocol over the + Blocks Extensible Exchange Protocol (BEEP)"; + } + + identity netconf-tls { + base transport; + description + "NETCONF over Transport Layer Security (TLS)."; + reference + "RFC 5539: NETCONF over Transport Layer Security (TLS)"; + } + + identity schema-format { + description + "Base identity for data model schema languages."; + } + + identity xsd { + base schema-format; + description + "W3C XML Schema Definition."; + reference + "W3C REC REC-xmlschema-1-20041028: + XML Schema Part 1: Structures"; + } + + identity yang { + base schema-format; + description + "The YANG data modeling language for NETCONF."; + reference + "RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)"; + } + + identity yin { + base schema-format; + description + "The YIN syntax for YANG."; + reference + "RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)"; + } + + identity rng { + base schema-format; + description + "Regular Language for XML Next Generation (RELAX NG)."; + reference + "ISO/IEC 19757-2:2008: RELAX NG"; + } + + identity rnc { + base schema-format; + description + "Relax NG Compact Syntax"; + reference + "ISO/IEC 19757-2:2008: RELAX NG"; + } + + grouping common-counters { + description + "Counters that exist both per session, and also globally, + accumulated from all sessions."; + + leaf in-rpcs { + type yang:zero-based-counter32; + description + "Number of correct <rpc> messages received."; + } + leaf in-bad-rpcs { + type yang:zero-based-counter32; + + description + "Number of messages received when an <rpc> message was expected, + that were not correct <rpc> messages. This includes XML parse + errors and errors on the rpc layer."; + } + leaf out-rpc-errors { + type yang:zero-based-counter32; + description + "Number of <rpc-reply> messages sent that contained an + <rpc-error> element."; + } + leaf out-notifications { + type yang:zero-based-counter32; + description + "Number of <notification> messages sent."; + } + } + + container netconf-state { + config false; + description + "The netconf-state container is the root of the monitoring + data model."; + + container capabilities { + description + "Contains the list of NETCONF capabilities supported by the + server."; + + leaf-list capability { + type inet:uri; + description + "List of NETCONF capabilities supported by the server."; + } + } + + container datastores { + description + "Contains the list of NETCONF configuration datastores."; + + list datastore { + key name; + description + "List of NETCONF configuration datastores supported by + the NETCONF server and related information."; + + leaf name { + type netconf-datastore-type; + description + "Name of the datastore associated with this list entry."; + } + container locks { + presence + "This container is present only if the datastore + is locked."; + description + "The NETCONF <lock> and <partial-lock> operations allow + a client to lock specific resources in a datastore. The + NETCONF server will prevent changes to the locked + resources by all sessions except the one that acquired + the lock(s). + + Monitoring information is provided for each datastore + entry including details such as the session that acquired + the lock, the type of lock (global or partial) and the + list of locked resources. Multiple locks per datastore + are supported."; + + grouping lock-info { + description + "Lock related parameters, common to both global and + partial locks."; + + leaf locked-by-session { + type uint32; + mandatory true; + description + "The session ID of the session that has locked + this resource. Both a global lock and a partial + lock MUST contain the NETCONF session-id. + + If the lock is held by a session that is not managed + by the NETCONF server (e.g., a CLI session), a session + id of 0 (zero) is reported."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + leaf locked-time { + type yang:date-and-time; + mandatory true; + description + "The date and time of when the resource was + locked."; + } + } + + choice lock-type { + description + "Indicates if a global lock or a set of partial locks + are set."; + + container global-lock { + description + "Present if the global lock is set."; + uses lock-info; + } + + list partial-lock { + key lock-id; + description + "List of partial locks."; + reference + "RFC 5717: Partial Lock Remote Procedure Call (RPC) for + NETCONF"; + + leaf lock-id { + type uint32; + description + "This is the lock id returned in the <partial-lock> + response."; + } + uses lock-info; + leaf-list select { + type yang:xpath1.0; + min-elements 1; + description + "The xpath expression that was used to request + the lock. The select expression indicates the + original intended scope of the lock."; + } + leaf-list locked-node { + type instance-identifier; + description + "The list of instance-identifiers (i.e., the + locked nodes). + + The scope of the partial lock is defined by the list + of locked nodes."; + } + } + } + } + } + } + container schemas { + description + "Contains the list of data model schemas supported by the + server."; + + list schema { + key "identifier version format"; + + description + "List of data model schemas supported by the server."; + + leaf identifier { + type string; + description + "Identifier to uniquely reference the schema. The + identifier is used in the <get-schema> operation and may + be used for other purposes such as file retrieval. + + For modeling languages that support or require a data + model name (e.g., YANG module name) the identifier MUST + match that name. For YANG data models, the identifier is + the name of the module or submodule. In other cases, an + identifier such as a filename MAY be used instead."; + } + leaf version { + type string; + description + "Version of the schema supported. Multiple versions MAY be + supported simultaneously by a NETCONF server. Each + version MUST be reported individually in the schema list, + i.e., with same identifier, possibly different location, + but different version. + + For YANG data models, version is the value of the most + recent YANG 'revision' statement in the module or + submodule, or the empty string if no 'revision' statement + is present."; + } + leaf format { + type identityref { + base schema-format; + } + description + "The data modeling language the schema is written + in (currently xsd, yang, yin, rng, or rnc). + + For YANG data models, 'yang' format MUST be supported and + 'yin' format MAY also be provided."; + } + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace defined by the data model. + + For YANG data models, this is the module's namespace. + If the list entry describes a submodule, this field + contains the namespace of the module to which the + submodule belongs."; + } + leaf-list location { + type union { + type enumeration { + enum "NETCONF"; + } + type inet:uri; + } + description + "One or more locations from which the schema can be + retrieved. This list SHOULD contain at least one + entry per schema. + + A schema entry may be located on a remote file system + (e.g., reference to file system for ftp retrieval) or + retrieved directly from a server supporting the + <get-schema> operation (denoted by the value 'NETCONF')."; + } + } + } + + container sessions { + description + "The sessions container includes session-specific data for + NETCONF management sessions. The session list MUST include + all currently active NETCONF sessions."; + + list session { + key session-id; + description + "All NETCONF sessions managed by the NETCONF server + MUST be reported in this list."; + + leaf session-id { + type uint32 { + range "1..max"; + } + description + "Unique identifier for the session. This value is the + NETCONF session identifier, as defined in RFC 4741."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + leaf transport { + type identityref { + base transport; + } + mandatory true; + description + "Identifies the transport for each session, e.g., + 'netconf-ssh', 'netconf-soap', etc."; + } + leaf username { + type string; + mandatory true; + description + "The username is the client identity that was authenticated + by the NETCONF transport protocol. The algorithm used to + derive the username is NETCONF transport protocol specific + and in addition specific to the authentication mechanism + used by the NETCONF transport protocol."; + } + leaf source-host { + type inet:host; + description + "Host identifier of the NETCONF client. The value + returned is implementation specific (e.g., hostname, + IPv4 address, IPv6 address)"; + } + leaf login-time { + type yang:date-and-time; + mandatory true; + description + "Time at the server at which the session was established."; + } + uses common-counters { + description + "Per-session counters. Zero based with following reset + behaviour: + - at start of a session + - when max value is reached"; + } + } + } + + container statistics { + description + "Statistical data pertaining to the NETCONF server."; + + leaf netconf-start-time { + type yang:date-and-time; + description + "Date and time at which the management subsystem was + started."; + } + leaf in-bad-hellos { + type yang:zero-based-counter32; + description + "Number of sessions silently dropped because an + invalid <hello> message was received. This includes <hello> + messages with a 'session-id' attribute, bad namespace, and + bad capability declarations."; + } + leaf in-sessions { + type yang:zero-based-counter32; + description + "Number of sessions started. This counter is incremented + when a <hello> message with a <session-id> is sent. + + 'in-sessions' - 'in-bad-hellos' = + 'number of correctly started netconf sessions'"; + } + leaf dropped-sessions { + type yang:zero-based-counter32; + + description + "Number of sessions that were abnormally terminated, e.g., + due to idle timeout or transport close. This counter is not + incremented when a session is properly closed by a + <close-session> operation, or killed by a <kill-session> + operation."; + } + uses common-counters { + description + "Global counters, accumulated from all sessions. + Zero based with following reset behaviour: + - re-initialization of NETCONF server + - when max value is reached"; + } + } + } + + rpc get-schema { + description + "This operation is used to retrieve a schema from the + NETCONF server. + + Positive Response: + The NETCONF server returns the requested schema. + + Negative Response: + If requested schema does not exist, the <error-tag> is + 'invalid-value'. + + If more than one schema matches the requested parameters, the + <error-tag> is 'operation-failed', and <error-app-tag> is + 'data-not-unique'."; + + input { + leaf identifier { + type string; + mandatory true; + description + "Identifier for the schema list entry."; + } + leaf version { + type string; + description + "Version of the schema requested. If this parameter is not + present, and more than one version of the schema exists on + the server, a 'data-not-unique' error is returned, as + described above."; + } + leaf format { + type identityref { + base schema-format; + } + description + "The data modeling language of the schema. If this + parameter is not present, and more than one formats of + the schema exists on the server, a 'data-not-unique' error + is returned, as described above."; + } + } + output { + anyxml data { + description + "Contains the schema content."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-nmda.yang b/models/ietf/RFC/ietf-netconf-nmda.yang new file mode 100644 index 0000000000000000000000000000000000000000..cf537dc609a908730f5161c47a21f174ad4e14f9 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-nmda.yang @@ -0,0 +1,387 @@ +module ietf-netconf-nmda { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"; + prefix ncds; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-datastores { + prefix ds; + reference + "RFC 8342: Network Management Datastore Architecture + (NMDA)"; + } + import ietf-origin { + prefix or; + reference + "RFC 8342: Network Management Datastore Architecture + (NMDA)"; + } + import ietf-netconf { + prefix nc; + reference + "RFC 6241: Network Configuration Protocol (NETCONF)"; + } + import ietf-netconf-with-defaults { + prefix ncwd; + reference + "RFC 6243: With-defaults Capability for NETCONF"; + } + + organization + "IETF NETCONF Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + + WG List: <mailto:netconf@ietf.org> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Phil Shafer + <mailto:phil@juniper.net> + + Author: Kent Watsen + <mailto:kent+ietf@watsen.net> + + Author: Robert Wilton + <mailto:rwilton@cisco.com>"; + description + "This YANG module defines a set of NETCONF operations to support + the Network Management Datastore Architecture (NMDA). + + 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. + + Copyright (c) 2019 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 Simplified 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 8526; see + the RFC itself for full legal notices."; + + revision 2019-01-07 { + description + "Initial revision."; + reference + "RFC 8526: NETCONF Extensions to Support the Network Management + Datastore Architecture"; + } + + feature origin { + description + "Indicates that the server supports the 'origin' annotation."; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + + feature with-defaults { + description + "NETCONF :with-defaults capability. If the server advertises + the :with-defaults capability for a session, then this + feature must also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6243: With-defaults Capability for NETCONF, Section 4; and + RFC 8526: NETCONF Extensions to Support the Network Management + Datastore Architecture, Section 3.1.1.2"; + } + + rpc get-data { + description + "Retrieve data from an NMDA datastore. The content returned + by get-data must satisfy all filters, i.e., the filter + criteria are logically ANDed. + + Any ancestor nodes (including list keys) of nodes selected by + the filters are included in the response. + + The 'with-origin' parameter is only valid for an operational + datastore. If 'with-origin' is used with an invalid + datastore, then the server MUST return an <rpc-error> element + with an <error-tag> value of 'invalid-value'. + + The 'with-defaults' parameter only applies to the operational + datastore if the NETCONF :with-defaults and + :with-operational-defaults capabilities are both advertised. + If the 'with-defaults' parameter is present in a request for + which it is not supported, then the server MUST return an + <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + input { + leaf datastore { + type ds:datastore-ref; + mandatory true; + + description + "Datastore from which to retrieve data. + + If the datastore is not supported by the server, then the + server MUST return an <rpc-error> element with an + <error-tag> value of 'invalid-value'."; + } + choice filter-spec { + description + "The content filter specification for this request."; + anydata subtree-filter { + description + "This parameter identifies the portions of the + target datastore to retrieve."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 6"; + } + leaf xpath-filter { + if-feature "nc:xpath"; + type yang:xpath1.0; + description + "This parameter contains an XPath expression identifying + the portions of the target datastore to retrieve. + + If the expression returns a node-set, all nodes in the + node-set are selected by the filter. Otherwise, if the + expression does not return a node-set, then the + <get-data> operation fails. + + The expression is evaluated in the following XPath + context: + + o The set of namespace declarations are those in + scope on the 'xpath-filter' leaf element. + + o The set of variable bindings is empty. + + o The function library is the core function library, + and the XPath functions are defined in Section 10 + of RFC 7950. + + o The context node is the root node of the target + datastore."; + } + } + leaf config-filter { + type boolean; + description + "Filter for nodes with the given value for their 'config' + property. When this leaf is set to 'true', only 'config + true' nodes are selected, and when set to 'false', only + 'config false' nodes are selected. If this leaf is not + present, no nodes are filtered."; + } + choice origin-filters { + when 'derived-from-or-self(datastore, "ds:operational")'; + if-feature "origin"; + description + "Filters configuration nodes based on the 'origin' + annotation. Configuration nodes that do not have an + 'origin' annotation are treated as if they have the + 'origin' annotation 'or:unknown'. + + System state nodes are not affected by origin-filters and + thus not filtered. Note that system state nodes can be + filtered with the 'config-filter' leaf."; + + leaf-list origin-filter { + type or:origin-ref; + description + "Filter based on the 'origin' annotation. A + configuration node matches the filter if its 'origin' + annotation is derived from or equal to any of the given + filter values."; + } + leaf-list negated-origin-filter { + type or:origin-ref; + description + "Filter based on the 'origin' annotation. A + configuration node matches the filter if its 'origin' + annotation is neither derived from nor equal to any of + the given filter values."; + } + } + leaf max-depth { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum unbounded { + description + "All descendant nodes are included."; + } + } + } + default "unbounded"; + description + "For each node selected by the filters, this parameter + selects how many conceptual subtree levels should be + returned in the reply. If the depth is 1, the reply + includes just the selected nodes but no children. If the + depth is 'unbounded', all descendant nodes are included."; + } + leaf with-origin { + when 'derived-from-or-self(../datastore, "ds:operational")'; + if-feature "origin"; + type empty; + description + "If this parameter is present, the server will return + the 'origin' annotation for the nodes that have one."; + } + uses ncwd:with-defaults-parameters { + if-feature "with-defaults"; + } + } + output { + anydata data { + description + "Copy of the source datastore subset that matched + the filter criteria (if any). An empty data + container indicates that the request did not + produce any results."; + } + } + } + + rpc edit-data { + description + "Edit data in an NMDA datastore. + + If an error condition occurs such that an error severity + <rpc-error> element is generated, the server will stop + processing the <edit-data> operation and restore the + specified configuration to its complete state at + the start of this <edit-data> operation."; + input { + leaf datastore { + type ds:datastore-ref; + mandatory true; + + description + "Datastore that is the target of the <edit-data> operation. + + If the target datastore is not writable, or is not + supported by the server, then the server MUST return an + <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + } + leaf default-operation { + type enumeration { + enum merge { + description + "The default operation is merge."; + } + enum replace { + description + "The default operation is replace."; + } + enum none { + description + "There is no default operation."; + } + } + default "merge"; + description + "The default operation to use."; + } + choice edit-content { + mandatory true; + description + "The content for the edit operation."; + anydata config { + description + "Inline config content."; + } + leaf url { + if-feature "nc:url"; + type inet:uri; + description + "URL-based config content."; + } + } + } + } + + /* + * Augment the <lock> and <unlock> operations with a + * "datastore" parameter. + */ + + augment "/nc:lock/nc:input/nc:target/nc:config-target" { + description + "Add NMDA datastore as target."; + leaf datastore { + type ds:datastore-ref; + description + "Datastore to lock. + + The <lock> operation is only supported on writable + datastores. + + If the <lock> operation is not supported by the server on + the specified target datastore, then the server MUST return + an <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + } + } + + augment "/nc:unlock/nc:input/nc:target/nc:config-target" { + description + "Add NMDA datastore as target."; + leaf datastore { + type ds:datastore-ref; + description + "Datastore to unlock. + + The <unlock> operation is only supported on writable + datastores. + + If the <unlock> operation is not supported by the server on + the specified target datastore, then the server MUST return + an <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + } + } + + /* + * Augment the <validate> operation with a + * "datastore" parameter. + */ + + augment "/nc:validate/nc:input/nc:source/nc:config-source" { + description + "Add NMDA datastore as source."; + leaf datastore { + type ds:datastore-ref; + description + "Datastore to validate. + + The <validate> operation is supported only on configuration + datastores. + + If the <validate> operation is not supported by the server + on the specified target datastore, then the server MUST + return an <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-nmda@2019-01-07.yang b/models/ietf/RFC/ietf-netconf-nmda@2019-01-07.yang new file mode 100644 index 0000000000000000000000000000000000000000..cf537dc609a908730f5161c47a21f174ad4e14f9 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-nmda@2019-01-07.yang @@ -0,0 +1,387 @@ +module ietf-netconf-nmda { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"; + prefix ncds; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-datastores { + prefix ds; + reference + "RFC 8342: Network Management Datastore Architecture + (NMDA)"; + } + import ietf-origin { + prefix or; + reference + "RFC 8342: Network Management Datastore Architecture + (NMDA)"; + } + import ietf-netconf { + prefix nc; + reference + "RFC 6241: Network Configuration Protocol (NETCONF)"; + } + import ietf-netconf-with-defaults { + prefix ncwd; + reference + "RFC 6243: With-defaults Capability for NETCONF"; + } + + organization + "IETF NETCONF Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + + WG List: <mailto:netconf@ietf.org> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Phil Shafer + <mailto:phil@juniper.net> + + Author: Kent Watsen + <mailto:kent+ietf@watsen.net> + + Author: Robert Wilton + <mailto:rwilton@cisco.com>"; + description + "This YANG module defines a set of NETCONF operations to support + the Network Management Datastore Architecture (NMDA). + + 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. + + Copyright (c) 2019 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 Simplified 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 8526; see + the RFC itself for full legal notices."; + + revision 2019-01-07 { + description + "Initial revision."; + reference + "RFC 8526: NETCONF Extensions to Support the Network Management + Datastore Architecture"; + } + + feature origin { + description + "Indicates that the server supports the 'origin' annotation."; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + + feature with-defaults { + description + "NETCONF :with-defaults capability. If the server advertises + the :with-defaults capability for a session, then this + feature must also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6243: With-defaults Capability for NETCONF, Section 4; and + RFC 8526: NETCONF Extensions to Support the Network Management + Datastore Architecture, Section 3.1.1.2"; + } + + rpc get-data { + description + "Retrieve data from an NMDA datastore. The content returned + by get-data must satisfy all filters, i.e., the filter + criteria are logically ANDed. + + Any ancestor nodes (including list keys) of nodes selected by + the filters are included in the response. + + The 'with-origin' parameter is only valid for an operational + datastore. If 'with-origin' is used with an invalid + datastore, then the server MUST return an <rpc-error> element + with an <error-tag> value of 'invalid-value'. + + The 'with-defaults' parameter only applies to the operational + datastore if the NETCONF :with-defaults and + :with-operational-defaults capabilities are both advertised. + If the 'with-defaults' parameter is present in a request for + which it is not supported, then the server MUST return an + <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + input { + leaf datastore { + type ds:datastore-ref; + mandatory true; + + description + "Datastore from which to retrieve data. + + If the datastore is not supported by the server, then the + server MUST return an <rpc-error> element with an + <error-tag> value of 'invalid-value'."; + } + choice filter-spec { + description + "The content filter specification for this request."; + anydata subtree-filter { + description + "This parameter identifies the portions of the + target datastore to retrieve."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 6"; + } + leaf xpath-filter { + if-feature "nc:xpath"; + type yang:xpath1.0; + description + "This parameter contains an XPath expression identifying + the portions of the target datastore to retrieve. + + If the expression returns a node-set, all nodes in the + node-set are selected by the filter. Otherwise, if the + expression does not return a node-set, then the + <get-data> operation fails. + + The expression is evaluated in the following XPath + context: + + o The set of namespace declarations are those in + scope on the 'xpath-filter' leaf element. + + o The set of variable bindings is empty. + + o The function library is the core function library, + and the XPath functions are defined in Section 10 + of RFC 7950. + + o The context node is the root node of the target + datastore."; + } + } + leaf config-filter { + type boolean; + description + "Filter for nodes with the given value for their 'config' + property. When this leaf is set to 'true', only 'config + true' nodes are selected, and when set to 'false', only + 'config false' nodes are selected. If this leaf is not + present, no nodes are filtered."; + } + choice origin-filters { + when 'derived-from-or-self(datastore, "ds:operational")'; + if-feature "origin"; + description + "Filters configuration nodes based on the 'origin' + annotation. Configuration nodes that do not have an + 'origin' annotation are treated as if they have the + 'origin' annotation 'or:unknown'. + + System state nodes are not affected by origin-filters and + thus not filtered. Note that system state nodes can be + filtered with the 'config-filter' leaf."; + + leaf-list origin-filter { + type or:origin-ref; + description + "Filter based on the 'origin' annotation. A + configuration node matches the filter if its 'origin' + annotation is derived from or equal to any of the given + filter values."; + } + leaf-list negated-origin-filter { + type or:origin-ref; + description + "Filter based on the 'origin' annotation. A + configuration node matches the filter if its 'origin' + annotation is neither derived from nor equal to any of + the given filter values."; + } + } + leaf max-depth { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum unbounded { + description + "All descendant nodes are included."; + } + } + } + default "unbounded"; + description + "For each node selected by the filters, this parameter + selects how many conceptual subtree levels should be + returned in the reply. If the depth is 1, the reply + includes just the selected nodes but no children. If the + depth is 'unbounded', all descendant nodes are included."; + } + leaf with-origin { + when 'derived-from-or-self(../datastore, "ds:operational")'; + if-feature "origin"; + type empty; + description + "If this parameter is present, the server will return + the 'origin' annotation for the nodes that have one."; + } + uses ncwd:with-defaults-parameters { + if-feature "with-defaults"; + } + } + output { + anydata data { + description + "Copy of the source datastore subset that matched + the filter criteria (if any). An empty data + container indicates that the request did not + produce any results."; + } + } + } + + rpc edit-data { + description + "Edit data in an NMDA datastore. + + If an error condition occurs such that an error severity + <rpc-error> element is generated, the server will stop + processing the <edit-data> operation and restore the + specified configuration to its complete state at + the start of this <edit-data> operation."; + input { + leaf datastore { + type ds:datastore-ref; + mandatory true; + + description + "Datastore that is the target of the <edit-data> operation. + + If the target datastore is not writable, or is not + supported by the server, then the server MUST return an + <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + } + leaf default-operation { + type enumeration { + enum merge { + description + "The default operation is merge."; + } + enum replace { + description + "The default operation is replace."; + } + enum none { + description + "There is no default operation."; + } + } + default "merge"; + description + "The default operation to use."; + } + choice edit-content { + mandatory true; + description + "The content for the edit operation."; + anydata config { + description + "Inline config content."; + } + leaf url { + if-feature "nc:url"; + type inet:uri; + description + "URL-based config content."; + } + } + } + } + + /* + * Augment the <lock> and <unlock> operations with a + * "datastore" parameter. + */ + + augment "/nc:lock/nc:input/nc:target/nc:config-target" { + description + "Add NMDA datastore as target."; + leaf datastore { + type ds:datastore-ref; + description + "Datastore to lock. + + The <lock> operation is only supported on writable + datastores. + + If the <lock> operation is not supported by the server on + the specified target datastore, then the server MUST return + an <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + } + } + + augment "/nc:unlock/nc:input/nc:target/nc:config-target" { + description + "Add NMDA datastore as target."; + leaf datastore { + type ds:datastore-ref; + description + "Datastore to unlock. + + The <unlock> operation is only supported on writable + datastores. + + If the <unlock> operation is not supported by the server on + the specified target datastore, then the server MUST return + an <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + } + } + + /* + * Augment the <validate> operation with a + * "datastore" parameter. + */ + + augment "/nc:validate/nc:input/nc:source/nc:config-source" { + description + "Add NMDA datastore as source."; + leaf datastore { + type ds:datastore-ref; + description + "Datastore to validate. + + The <validate> operation is supported only on configuration + datastores. + + If the <validate> operation is not supported by the server + on the specified target datastore, then the server MUST + return an <rpc-error> element with an <error-tag> value of + 'invalid-value'."; + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-notifications.yang b/models/ietf/RFC/ietf-netconf-notifications.yang new file mode 100644 index 0000000000000000000000000000000000000000..e0b49a6764ab79461c84153d93e37d9de28e9562 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-notifications.yang @@ -0,0 +1,336 @@ +module ietf-netconf-notifications { + + namespace + "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"; + + prefix ncn; + + import ietf-inet-types { prefix inet; } + import ietf-netconf { prefix nc; } + + organization + "IETF NETCONF (Network Configuration Protocol) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Bert Wijnen + <mailto:bertietf@bwijnen.net> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + Editor: Andy Bierman + <mailto:andy@netconfcentral.org>"; + + description + "This module defines a YANG data model for use with the + NETCONF protocol that allows the NETCONF client to + receive common NETCONF base event notifications. + + Copyright (c) 2012 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD License + + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6470; see + the RFC itself for full legal notices."; + + revision "2012-02-06" { + description + "Initial version."; + reference + "RFC 6470: NETCONF Base Notifications"; + } + + grouping common-session-parms { + description + "Common session parameters to identify a + management session."; + + leaf username { + type string; + mandatory true; + description + "Name of the user for the session."; + } + + leaf session-id { + type nc:session-id-or-zero-type; + mandatory true; + description + "Identifier of the session. + A NETCONF session MUST be identified by a non-zero value. + A non-NETCONF session MAY be identified by the value zero."; + } + + leaf source-host { + type inet:ip-address; + description + "Address of the remote host for the session."; + } + } + + grouping changed-by-parms { + description + "Common parameters to identify the source + of a change event, such as a configuration + or capability change."; + + container changed-by { + description + "Indicates the source of the change. + If caused by internal action, then the + empty leaf 'server' will be present. + If caused by a management session, then + the name, remote host address, and session ID + of the session that made the change will be reported."; + choice server-or-user { + mandatory true; + leaf server { + type empty; + description + "If present, the change was caused + by the server."; + } + + case by-user { + uses common-session-parms; + } + } // choice server-or-user + } // container changed-by-parms + } + + notification netconf-config-change { + description + "Generated when the NETCONF server detects that the + <running> or <startup> configuration datastore + has been changed by a management session. + The notification summarizes the edits that + have been detected. + + The server MAY choose to also generate this + notification while loading a datastore during the + boot process for the device."; + + uses changed-by-parms; + + leaf datastore { + type enumeration { + enum running { + description "The <running> datastore has changed."; + } + enum startup { + description "The <startup> datastore has changed"; + } + } + default "running"; + description + "Indicates which configuration datastore has changed."; + } + + list edit { + description + "An edit record SHOULD be present for each distinct + edit operation that the server has detected on + the target datastore. This list MAY be omitted + if the detailed edit operations are not known. + The server MAY report entries in this list for + changes not made by a NETCONF session (e.g., CLI)."; + + leaf target { + type instance-identifier; + description + "Topmost node associated with the configuration change. + A server SHOULD set this object to the node within + the datastore that is being altered. A server MAY + set this object to one of the ancestors of the actual + node that was changed, or omit this object, if the + exact node is not known."; + } + + leaf operation { + type nc:edit-operation-type; + description + "Type of edit operation performed. + A server MUST set this object to the NETCONF edit + operation performed on the target datastore."; + } + } // list edit + } // notification netconf-config-change + + notification netconf-capability-change { + description + "Generated when the NETCONF server detects that + the server capabilities have changed. + Indicates which capabilities have been added, deleted, + and/or modified. The manner in which a server + capability is changed is outside the scope of this + document."; + + uses changed-by-parms; + + leaf-list added-capability { + type inet:uri; + description + "List of capabilities that have just been added."; + } + + leaf-list deleted-capability { + type inet:uri; + description + "List of capabilities that have just been deleted."; + } + + leaf-list modified-capability { + type inet:uri; + description + "List of capabilities that have just been modified. + A capability is considered to be modified if the + base URI for the capability has not changed, but + one or more of the parameters encoded at the end of + the capability URI have changed. + The new modified value of the complete URI is returned."; + } + } // notification netconf-capability-change + + notification netconf-session-start { + description + "Generated when a NETCONF server detects that a + NETCONF session has started. A server MAY generate + this event for non-NETCONF management sessions. + Indicates the identity of the user that started + the session."; + uses common-session-parms; + } // notification netconf-session-start + + notification netconf-session-end { + description + "Generated when a NETCONF server detects that a + NETCONF session has terminated. + A server MAY optionally generate this event for + non-NETCONF management sessions. Indicates the + identity of the user that owned the session, + and why the session was terminated."; + + uses common-session-parms; + + leaf killed-by { + when "../termination-reason = 'killed'"; + type nc:session-id-type; + description + "The ID of the session that directly caused this session + to be abnormally terminated. If this session was abnormally + terminated by a non-NETCONF session unknown to the server, + then this leaf will not be present."; + } + + leaf termination-reason { + type enumeration { + enum "closed" { + description + "The session was terminated by the client in normal + fashion, e.g., by the NETCONF <close-session> + protocol operation."; + } + enum "killed" { + description + "The session was terminated in abnormal + fashion, e.g., by the NETCONF <kill-session> + protocol operation."; + } + enum "dropped" { + description + "The session was terminated because the transport layer + connection was unexpectedly closed."; + } + enum "timeout" { + description + "The session was terminated because of inactivity, + e.g., waiting for the <hello> message or <rpc> + messages."; + } + + enum "bad-hello" { + description + "The client's <hello> message was invalid."; + } + enum "other" { + description + "The session was terminated for some other reason."; + } + } + mandatory true; + description + "Reason the session was terminated."; + } + } // notification netconf-session-end + + notification netconf-confirmed-commit { + description + "Generated when a NETCONF server detects that a + confirmed-commit event has occurred. Indicates the event + and the current state of the confirmed-commit procedure + in progress."; + reference + "RFC 6241, Section 8.4"; + + uses common-session-parms { + when "../confirm-event != 'timeout'"; + } + + leaf confirm-event { + type enumeration { + enum "start" { + description + "The confirmed-commit procedure has started."; + } + enum "cancel" { + description + "The confirmed-commit procedure has been canceled, + e.g., due to the session being terminated, or an + explicit <cancel-commit> operation."; + } + enum "timeout" { + description + "The confirmed-commit procedure has been canceled + due to the confirm-timeout interval expiring. + The common session parameters will not be present + in this sub-mode."; + } + enum "extend" { + description + "The confirmed-commit timeout has been extended, + e.g., by a new <confirmed-commit> operation."; + } + enum "complete" { + description + "The confirmed-commit procedure has been completed."; + } + } + mandatory true; + description + "Indicates the event that caused the notification."; + } + + leaf timeout { + when + "../confirm-event = 'start' or ../confirm-event = 'extend'"; + type uint32; + units "seconds"; + description + "The configured timeout value if the event type + is 'start' or 'extend'. This value represents + the approximate number of seconds from the event + time when the 'timeout' event might occur."; + } + } // notification netconf-confirmed-commit + +} diff --git a/models/ietf/RFC/ietf-netconf-notifications@2012-02-06.yang b/models/ietf/RFC/ietf-netconf-notifications@2012-02-06.yang new file mode 100644 index 0000000000000000000000000000000000000000..e0b49a6764ab79461c84153d93e37d9de28e9562 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-notifications@2012-02-06.yang @@ -0,0 +1,336 @@ +module ietf-netconf-notifications { + + namespace + "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"; + + prefix ncn; + + import ietf-inet-types { prefix inet; } + import ietf-netconf { prefix nc; } + + organization + "IETF NETCONF (Network Configuration Protocol) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Bert Wijnen + <mailto:bertietf@bwijnen.net> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + Editor: Andy Bierman + <mailto:andy@netconfcentral.org>"; + + description + "This module defines a YANG data model for use with the + NETCONF protocol that allows the NETCONF client to + receive common NETCONF base event notifications. + + Copyright (c) 2012 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD License + + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6470; see + the RFC itself for full legal notices."; + + revision "2012-02-06" { + description + "Initial version."; + reference + "RFC 6470: NETCONF Base Notifications"; + } + + grouping common-session-parms { + description + "Common session parameters to identify a + management session."; + + leaf username { + type string; + mandatory true; + description + "Name of the user for the session."; + } + + leaf session-id { + type nc:session-id-or-zero-type; + mandatory true; + description + "Identifier of the session. + A NETCONF session MUST be identified by a non-zero value. + A non-NETCONF session MAY be identified by the value zero."; + } + + leaf source-host { + type inet:ip-address; + description + "Address of the remote host for the session."; + } + } + + grouping changed-by-parms { + description + "Common parameters to identify the source + of a change event, such as a configuration + or capability change."; + + container changed-by { + description + "Indicates the source of the change. + If caused by internal action, then the + empty leaf 'server' will be present. + If caused by a management session, then + the name, remote host address, and session ID + of the session that made the change will be reported."; + choice server-or-user { + mandatory true; + leaf server { + type empty; + description + "If present, the change was caused + by the server."; + } + + case by-user { + uses common-session-parms; + } + } // choice server-or-user + } // container changed-by-parms + } + + notification netconf-config-change { + description + "Generated when the NETCONF server detects that the + <running> or <startup> configuration datastore + has been changed by a management session. + The notification summarizes the edits that + have been detected. + + The server MAY choose to also generate this + notification while loading a datastore during the + boot process for the device."; + + uses changed-by-parms; + + leaf datastore { + type enumeration { + enum running { + description "The <running> datastore has changed."; + } + enum startup { + description "The <startup> datastore has changed"; + } + } + default "running"; + description + "Indicates which configuration datastore has changed."; + } + + list edit { + description + "An edit record SHOULD be present for each distinct + edit operation that the server has detected on + the target datastore. This list MAY be omitted + if the detailed edit operations are not known. + The server MAY report entries in this list for + changes not made by a NETCONF session (e.g., CLI)."; + + leaf target { + type instance-identifier; + description + "Topmost node associated with the configuration change. + A server SHOULD set this object to the node within + the datastore that is being altered. A server MAY + set this object to one of the ancestors of the actual + node that was changed, or omit this object, if the + exact node is not known."; + } + + leaf operation { + type nc:edit-operation-type; + description + "Type of edit operation performed. + A server MUST set this object to the NETCONF edit + operation performed on the target datastore."; + } + } // list edit + } // notification netconf-config-change + + notification netconf-capability-change { + description + "Generated when the NETCONF server detects that + the server capabilities have changed. + Indicates which capabilities have been added, deleted, + and/or modified. The manner in which a server + capability is changed is outside the scope of this + document."; + + uses changed-by-parms; + + leaf-list added-capability { + type inet:uri; + description + "List of capabilities that have just been added."; + } + + leaf-list deleted-capability { + type inet:uri; + description + "List of capabilities that have just been deleted."; + } + + leaf-list modified-capability { + type inet:uri; + description + "List of capabilities that have just been modified. + A capability is considered to be modified if the + base URI for the capability has not changed, but + one or more of the parameters encoded at the end of + the capability URI have changed. + The new modified value of the complete URI is returned."; + } + } // notification netconf-capability-change + + notification netconf-session-start { + description + "Generated when a NETCONF server detects that a + NETCONF session has started. A server MAY generate + this event for non-NETCONF management sessions. + Indicates the identity of the user that started + the session."; + uses common-session-parms; + } // notification netconf-session-start + + notification netconf-session-end { + description + "Generated when a NETCONF server detects that a + NETCONF session has terminated. + A server MAY optionally generate this event for + non-NETCONF management sessions. Indicates the + identity of the user that owned the session, + and why the session was terminated."; + + uses common-session-parms; + + leaf killed-by { + when "../termination-reason = 'killed'"; + type nc:session-id-type; + description + "The ID of the session that directly caused this session + to be abnormally terminated. If this session was abnormally + terminated by a non-NETCONF session unknown to the server, + then this leaf will not be present."; + } + + leaf termination-reason { + type enumeration { + enum "closed" { + description + "The session was terminated by the client in normal + fashion, e.g., by the NETCONF <close-session> + protocol operation."; + } + enum "killed" { + description + "The session was terminated in abnormal + fashion, e.g., by the NETCONF <kill-session> + protocol operation."; + } + enum "dropped" { + description + "The session was terminated because the transport layer + connection was unexpectedly closed."; + } + enum "timeout" { + description + "The session was terminated because of inactivity, + e.g., waiting for the <hello> message or <rpc> + messages."; + } + + enum "bad-hello" { + description + "The client's <hello> message was invalid."; + } + enum "other" { + description + "The session was terminated for some other reason."; + } + } + mandatory true; + description + "Reason the session was terminated."; + } + } // notification netconf-session-end + + notification netconf-confirmed-commit { + description + "Generated when a NETCONF server detects that a + confirmed-commit event has occurred. Indicates the event + and the current state of the confirmed-commit procedure + in progress."; + reference + "RFC 6241, Section 8.4"; + + uses common-session-parms { + when "../confirm-event != 'timeout'"; + } + + leaf confirm-event { + type enumeration { + enum "start" { + description + "The confirmed-commit procedure has started."; + } + enum "cancel" { + description + "The confirmed-commit procedure has been canceled, + e.g., due to the session being terminated, or an + explicit <cancel-commit> operation."; + } + enum "timeout" { + description + "The confirmed-commit procedure has been canceled + due to the confirm-timeout interval expiring. + The common session parameters will not be present + in this sub-mode."; + } + enum "extend" { + description + "The confirmed-commit timeout has been extended, + e.g., by a new <confirmed-commit> operation."; + } + enum "complete" { + description + "The confirmed-commit procedure has been completed."; + } + } + mandatory true; + description + "Indicates the event that caused the notification."; + } + + leaf timeout { + when + "../confirm-event = 'start' or ../confirm-event = 'extend'"; + type uint32; + units "seconds"; + description + "The configured timeout value if the event type + is 'start' or 'extend'. This value represents + the approximate number of seconds from the event + time when the 'timeout' event might occur."; + } + } // notification netconf-confirmed-commit + +} diff --git a/models/ietf/RFC/ietf-netconf-partial-lock.yang b/models/ietf/RFC/ietf-netconf-partial-lock.yang new file mode 100644 index 0000000000000000000000000000000000000000..31b6e73a5c225ebe23a41b06f00168cbc5972054 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-partial-lock.yang @@ -0,0 +1,77 @@ +module ietf-netconf-partial-lock { + + namespace urn:ietf:params:xml:ns:netconf:partial-lock:1.0; + prefix pl; + + organization "IETF Network Configuration (netconf) Working Group"; + + contact + "Netconf Working Group + Mailing list: netconf@ietf.org + Web: http://www.ietf.org/html.charters/netconf-charter.html + + Balazs Lengyel + Ericsson + balazs.lengyel@ericsson.com"; + + description + "This YANG module defines the <partial-lock> and + <partial-unlock> operations."; + + revision 2009-10-19 { + description + "Initial version, published as RFC 5717."; + } + + typedef lock-id-type { + type uint32; + description + "A number identifying a specific partial-lock granted to a session. + It is allocated by the system, and SHOULD be used in the + partial-unlock operation."; + } + + rpc partial-lock { + description + "A NETCONF operation that locks parts of the running datastore."; + input { + leaf-list select { + type string; + min-elements 1; + description + "XPath expression that specifies the scope of the lock. + An Instance Identifier expression MUST be used unless the + :xpath capability is supported, in which case any XPath 1.0 + expression is allowed."; + } + } + output { + leaf lock-id { + type lock-id-type; + description + "Identifies the lock, if granted. The lock-id SHOULD be + used in the partial-unlock rpc."; + } + leaf-list locked-node { + type instance-identifier; + min-elements 1; + description + "List of locked nodes in the running datastore"; + } + } + } + + rpc partial-unlock { + description + "A NETCONF operation that releases a previously acquired + partial-lock."; + input { + leaf lock-id { + type lock-id-type; + description + "Identifies the lock to be released. MUST be the value + received in the response to a partial-lock operation."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-partial-lock@2009-10-19.yang b/models/ietf/RFC/ietf-netconf-partial-lock@2009-10-19.yang new file mode 100644 index 0000000000000000000000000000000000000000..31b6e73a5c225ebe23a41b06f00168cbc5972054 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-partial-lock@2009-10-19.yang @@ -0,0 +1,77 @@ +module ietf-netconf-partial-lock { + + namespace urn:ietf:params:xml:ns:netconf:partial-lock:1.0; + prefix pl; + + organization "IETF Network Configuration (netconf) Working Group"; + + contact + "Netconf Working Group + Mailing list: netconf@ietf.org + Web: http://www.ietf.org/html.charters/netconf-charter.html + + Balazs Lengyel + Ericsson + balazs.lengyel@ericsson.com"; + + description + "This YANG module defines the <partial-lock> and + <partial-unlock> operations."; + + revision 2009-10-19 { + description + "Initial version, published as RFC 5717."; + } + + typedef lock-id-type { + type uint32; + description + "A number identifying a specific partial-lock granted to a session. + It is allocated by the system, and SHOULD be used in the + partial-unlock operation."; + } + + rpc partial-lock { + description + "A NETCONF operation that locks parts of the running datastore."; + input { + leaf-list select { + type string; + min-elements 1; + description + "XPath expression that specifies the scope of the lock. + An Instance Identifier expression MUST be used unless the + :xpath capability is supported, in which case any XPath 1.0 + expression is allowed."; + } + } + output { + leaf lock-id { + type lock-id-type; + description + "Identifies the lock, if granted. The lock-id SHOULD be + used in the partial-unlock rpc."; + } + leaf-list locked-node { + type instance-identifier; + min-elements 1; + description + "List of locked nodes in the running datastore"; + } + } + } + + rpc partial-unlock { + description + "A NETCONF operation that releases a previously acquired + partial-lock."; + input { + leaf lock-id { + type lock-id-type; + description + "Identifies the lock to be released. MUST be the value + received in the response to a partial-lock operation."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-netconf-time.yang b/models/ietf/RFC/ietf-netconf-time.yang new file mode 100644 index 0000000000000000000000000000000000000000..b5f880370a0b2113fd9a8f3b1f7d3b617731ace2 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-time.yang @@ -0,0 +1,378 @@ +module ietf-netconf-time { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-time"; + + prefix nct; + import ietf-netconf { prefix nc; } + + import ietf-yang-types { prefix yang; } + + import ietf-netconf-monitoring { prefix ncm; } + + organization + "IETF"; + + contact + "Editor: Tal Mizrahi + <dew@tx.technion.ac.il> + Editor: Yoram Moses + <moses@ee.technion.ac.il>"; + + description + "This module defines a capability-based extension to the + Network Configuration Protocol (NETCONF) that allows + time-triggered configuration and management operations. + This extension allows NETCONF clients to invoke configuration + updates according to scheduled times and allows NETCONF + servers to attach timestamps to the data they send to NETCONF + clients. + + Copyright (c) 2016 IETF Trust and the persons identified as + the 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info)."; + + revision 2016-01-26 { + description + "Initial version."; + reference + "RFC 7758: + Time Capability in NETCONF"; + } + + typedef time-interval { + type string { + pattern '\d{2}:\d{2}:\d{2}(\.\d+)?'; + } + description + "Defines a time interval, up to 24 hours. + The format is specified as HH:mm:ss.f, + consisting of two digits for hours, + two digits for minutes, two digits + for seconds, and zero or more digits + representing second fractions."; + } + + grouping scheduling-tolerance-parameters { + leaf sched-max-future { + type time-interval; + default 00:00:15.0; + description + "When the scheduled time is in the future, i.e., greater + than the present time, this leaf defines the maximal + difference between the scheduled time + and the present time that the server is willing to + accept. If the difference exceeds this number, the + server responds with an error."; + } + + leaf sched-max-past { + type time-interval; + default 00:00:15.0; + description + "When the scheduled time is in the past, i.e., less + than the present time, this leaf defines the maximal + difference between the present time + and the scheduled time that the server is willing to + accept. If the difference exceeds this number, the + server responds with an error."; + } + + description + "Contains the parameters of the scheduling tolerance."; + } + // extending the get-config operation + augment /nc:get-config/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <get-config>."; + } + + augment /nc:get-config/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <get-config>."; + } + + augment /nc:get/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <get>."; + } + + augment /nc:get/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <get>."; + } + + augment /nc:copy-config/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <copy-config>."; + } + + augment /nc:copy-config/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <copy-config>."; + } + + augment /nc:edit-config/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <edit-config>."; + } + + augment /nc:edit-config/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <edit-config>."; + } + + augment /nc:delete-config/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <delete-config>."; + } + + augment /nc:delete-config/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + description + "Adds the time element to <delete-config>."; + } + + augment /nc:lock/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <lock>."; + } + augment /nc:lock/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <lock>."; + } + + augment /nc:unlock/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <unlock>."; + } + + augment /nc:unlock/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <unlock>."; + } + augment /nc:commit/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <commit>."; + } + + augment /nc:commit/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <commit>."; + } + + augment /ncm:netconf-state { + container scheduling-tolerance { + uses scheduling-tolerance-parameters; + description + "The scheduling tolerance when the time capability + is enabled."; + } + description + "The scheduling tolerance of the server."; + } + + rpc cancel-schedule { + description + "Cancels a scheduled message."; + reference + "RFC 7758: + Time Capability in NETCONF"; + + input { + leaf cancelled-message-id { + type string; + description + "The ID of the message to be cancelled."; + } + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include + the execution-time."; + } + } + output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + } + } + + notification netconf-scheduled-message { + leaf schedule-id { + type string; + description + "The ID of the scheduled message."; + } + + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + description + "Indicates that a scheduled message was received."; + reference + "RFC 7758: + Time Capability in NETCONF"; + } + +} diff --git a/models/ietf/RFC/ietf-netconf-time@2016-01-26.yang b/models/ietf/RFC/ietf-netconf-time@2016-01-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..b5f880370a0b2113fd9a8f3b1f7d3b617731ace2 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-time@2016-01-26.yang @@ -0,0 +1,378 @@ +module ietf-netconf-time { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-time"; + + prefix nct; + import ietf-netconf { prefix nc; } + + import ietf-yang-types { prefix yang; } + + import ietf-netconf-monitoring { prefix ncm; } + + organization + "IETF"; + + contact + "Editor: Tal Mizrahi + <dew@tx.technion.ac.il> + Editor: Yoram Moses + <moses@ee.technion.ac.il>"; + + description + "This module defines a capability-based extension to the + Network Configuration Protocol (NETCONF) that allows + time-triggered configuration and management operations. + This extension allows NETCONF clients to invoke configuration + updates according to scheduled times and allows NETCONF + servers to attach timestamps to the data they send to NETCONF + clients. + + Copyright (c) 2016 IETF Trust and the persons identified as + the 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info)."; + + revision 2016-01-26 { + description + "Initial version."; + reference + "RFC 7758: + Time Capability in NETCONF"; + } + + typedef time-interval { + type string { + pattern '\d{2}:\d{2}:\d{2}(\.\d+)?'; + } + description + "Defines a time interval, up to 24 hours. + The format is specified as HH:mm:ss.f, + consisting of two digits for hours, + two digits for minutes, two digits + for seconds, and zero or more digits + representing second fractions."; + } + + grouping scheduling-tolerance-parameters { + leaf sched-max-future { + type time-interval; + default 00:00:15.0; + description + "When the scheduled time is in the future, i.e., greater + than the present time, this leaf defines the maximal + difference between the scheduled time + and the present time that the server is willing to + accept. If the difference exceeds this number, the + server responds with an error."; + } + + leaf sched-max-past { + type time-interval; + default 00:00:15.0; + description + "When the scheduled time is in the past, i.e., less + than the present time, this leaf defines the maximal + difference between the present time + and the scheduled time that the server is willing to + accept. If the difference exceeds this number, the + server responds with an error."; + } + + description + "Contains the parameters of the scheduling tolerance."; + } + // extending the get-config operation + augment /nc:get-config/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <get-config>."; + } + + augment /nc:get-config/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <get-config>."; + } + + augment /nc:get/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <get>."; + } + + augment /nc:get/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <get>."; + } + + augment /nc:copy-config/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <copy-config>."; + } + + augment /nc:copy-config/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <copy-config>."; + } + + augment /nc:edit-config/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <edit-config>."; + } + + augment /nc:edit-config/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <edit-config>."; + } + + augment /nc:delete-config/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <delete-config>."; + } + + augment /nc:delete-config/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + description + "Adds the time element to <delete-config>."; + } + + augment /nc:lock/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <lock>."; + } + augment /nc:lock/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <lock>."; + } + + augment /nc:unlock/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <unlock>."; + } + + augment /nc:unlock/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <unlock>."; + } + augment /nc:commit/nc:input { + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include the + execution-time."; + } + + description + "Adds the time element to <commit>."; + } + + augment /nc:commit/nc:output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + + description + "Adds the time element to <commit>."; + } + + augment /ncm:netconf-state { + container scheduling-tolerance { + uses scheduling-tolerance-parameters; + description + "The scheduling tolerance when the time capability + is enabled."; + } + description + "The scheduling tolerance of the server."; + } + + rpc cancel-schedule { + description + "Cancels a scheduled message."; + reference + "RFC 7758: + Time Capability in NETCONF"; + + input { + leaf cancelled-message-id { + type string; + description + "The ID of the message to be cancelled."; + } + leaf get-time { + type empty; + description + "Indicates that the rpc-reply should include + the execution-time."; + } + } + output { + leaf execution-time { + type yang:date-and-time; + description + "The time at which the RPC was executed."; + } + } + } + + notification netconf-scheduled-message { + leaf schedule-id { + type string; + description + "The ID of the scheduled message."; + } + + leaf scheduled-time { + type yang:date-and-time; + description + "The time at which the RPC is scheduled to be performed."; + } + description + "Indicates that a scheduled message was received."; + reference + "RFC 7758: + Time Capability in NETCONF"; + } + +} diff --git a/models/ietf/RFC/ietf-netconf-with-defaults.yang b/models/ietf/RFC/ietf-netconf-with-defaults.yang new file mode 100644 index 0000000000000000000000000000000000000000..8a7be8c29f12dee55d09202dc081a6d3052c6b05 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-with-defaults.yang @@ -0,0 +1,138 @@ +module ietf-netconf-with-defaults { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"; + + prefix ncwd; + + import ietf-netconf { prefix nc; } + + organization + "IETF NETCONF (Network Configuration Protocol) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + + WG List: <netconf@ietf.org> + + WG Chair: Bert Wijnen + <bertietf@bwijnen.net> + + WG Chair: Mehmet Ersue + <mehmet.ersue@nsn.com> + + Editor: Andy Bierman + <andy.bierman@brocade.com> + + Editor: Balazs Lengyel + <balazs.lengyel@ericsson.com>"; + + description + "This module defines an extension to the NETCONF protocol + that allows the NETCONF client to control how default + values are handled by the server in particular NETCONF + operations. + + Copyright (c) 2011 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6243; see + the RFC itself for full legal notices."; + revision 2011-06-01 { + description + "Initial version."; + reference + "RFC 6243: With-defaults Capability for NETCONF"; + } + + typedef with-defaults-mode { + description + "Possible modes to report default data."; + reference + "RFC 6243; Section 3."; + type enumeration { + enum report-all { + description + "All default data is reported."; + reference + "RFC 6243; Section 3.1"; + } + enum report-all-tagged { + description + "All default data is reported. + Any nodes considered to be default data + will contain a 'default' XML attribute, + set to 'true' or '1'."; + reference + "RFC 6243; Section 3.4"; + } + enum trim { + description + "Values are not reported if they contain the default."; + reference + "RFC 6243; Section 3.2"; + } + enum explicit { + description + "Report values that contain the definition of + explicitly set data."; + reference + "RFC 6243; Section 3.3"; + } + } + } + + grouping with-defaults-parameters { + description + "Contains the <with-defaults> parameter for control + of defaults in NETCONF retrieval operations."; + leaf with-defaults { + description + "The explicit defaults processing mode requested."; + reference + "RFC 6243; Section 4.5.1"; + + type with-defaults-mode; + } + } + + // extending the get-config operation + augment /nc:get-config/nc:input { + description + "Adds the <with-defaults> parameter to the + input of the NETCONF <get-config> operation."; + reference + "RFC 6243; Section 4.5.1"; + + uses with-defaults-parameters; + } + + // extending the get operation + augment /nc:get/nc:input { + description + "Adds the <with-defaults> parameter to + the input of the NETCONF <get> operation."; + reference + "RFC 6243; Section 4.5.1"; + + uses with-defaults-parameters; + } + + // extending the copy-config operation + augment /nc:copy-config/nc:input { + description + "Adds the <with-defaults> parameter to + the input of the NETCONF <copy-config> operation."; + reference + "RFC 6243; Section 4.5.1"; + + uses with-defaults-parameters; + } + +} diff --git a/models/ietf/RFC/ietf-netconf-with-defaults@2011-06-01.yang b/models/ietf/RFC/ietf-netconf-with-defaults@2011-06-01.yang new file mode 100644 index 0000000000000000000000000000000000000000..8a7be8c29f12dee55d09202dc081a6d3052c6b05 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf-with-defaults@2011-06-01.yang @@ -0,0 +1,138 @@ +module ietf-netconf-with-defaults { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"; + + prefix ncwd; + + import ietf-netconf { prefix nc; } + + organization + "IETF NETCONF (Network Configuration Protocol) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + + WG List: <netconf@ietf.org> + + WG Chair: Bert Wijnen + <bertietf@bwijnen.net> + + WG Chair: Mehmet Ersue + <mehmet.ersue@nsn.com> + + Editor: Andy Bierman + <andy.bierman@brocade.com> + + Editor: Balazs Lengyel + <balazs.lengyel@ericsson.com>"; + + description + "This module defines an extension to the NETCONF protocol + that allows the NETCONF client to control how default + values are handled by the server in particular NETCONF + operations. + + Copyright (c) 2011 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6243; see + the RFC itself for full legal notices."; + revision 2011-06-01 { + description + "Initial version."; + reference + "RFC 6243: With-defaults Capability for NETCONF"; + } + + typedef with-defaults-mode { + description + "Possible modes to report default data."; + reference + "RFC 6243; Section 3."; + type enumeration { + enum report-all { + description + "All default data is reported."; + reference + "RFC 6243; Section 3.1"; + } + enum report-all-tagged { + description + "All default data is reported. + Any nodes considered to be default data + will contain a 'default' XML attribute, + set to 'true' or '1'."; + reference + "RFC 6243; Section 3.4"; + } + enum trim { + description + "Values are not reported if they contain the default."; + reference + "RFC 6243; Section 3.2"; + } + enum explicit { + description + "Report values that contain the definition of + explicitly set data."; + reference + "RFC 6243; Section 3.3"; + } + } + } + + grouping with-defaults-parameters { + description + "Contains the <with-defaults> parameter for control + of defaults in NETCONF retrieval operations."; + leaf with-defaults { + description + "The explicit defaults processing mode requested."; + reference + "RFC 6243; Section 4.5.1"; + + type with-defaults-mode; + } + } + + // extending the get-config operation + augment /nc:get-config/nc:input { + description + "Adds the <with-defaults> parameter to the + input of the NETCONF <get-config> operation."; + reference + "RFC 6243; Section 4.5.1"; + + uses with-defaults-parameters; + } + + // extending the get operation + augment /nc:get/nc:input { + description + "Adds the <with-defaults> parameter to + the input of the NETCONF <get> operation."; + reference + "RFC 6243; Section 4.5.1"; + + uses with-defaults-parameters; + } + + // extending the copy-config operation + augment /nc:copy-config/nc:input { + description + "Adds the <with-defaults> parameter to + the input of the NETCONF <copy-config> operation."; + reference + "RFC 6243; Section 4.5.1"; + + uses with-defaults-parameters; + } + +} diff --git a/models/ietf/RFC/ietf-netconf.yang b/models/ietf/RFC/ietf-netconf.yang new file mode 100644 index 0000000000000000000000000000000000000000..44c19c329a668bee7bfa17b2f4d0682de48feba4 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf.yang @@ -0,0 +1,927 @@ +module ietf-netconf { + + // the namespace for NETCONF XML definitions is unchanged + // from RFC 4741, which this document replaces + namespace "urn:ietf:params:xml:ns:netconf:base:1.0"; + + prefix nc; + + import ietf-inet-types { + prefix inet; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <netconf@ietf.org> + + WG Chair: Bert Wijnen + <bertietf@bwijnen.net> + + WG Chair: Mehmet Ersue + <mehmet.ersue@nsn.com> + + Editor: Martin Bjorklund + <mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Andy Bierman + <andy.bierman@brocade.com>"; + description + "NETCONF Protocol Data Types and Protocol Operations. + + Copyright (c) 2011 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6241; see + the RFC itself for full legal notices."; + revision 2011-06-01 { + description + "Initial revision"; + reference + "RFC 6241: Network Configuration Protocol"; + } + + extension get-filter-element-attributes { + description + "If this extension is present within an 'anyxml' + statement named 'filter', which must be conceptually + defined within the RPC input section for the <get> + and <get-config> protocol operations, then the + following unqualified XML attribute is supported + within the <filter> element, within a <get> or + <get-config> protocol operation: + + type : optional attribute with allowed + value strings 'subtree' and 'xpath'. + If missing, the default value is 'subtree'. + + If the 'xpath' feature is supported, then the + following unqualified XML attribute is + also supported: + + select: optional attribute containing a + string representing an XPath expression. + The 'type' attribute must be equal to 'xpath' + if this attribute is present."; + } + + // NETCONF capabilities defined as features + feature writable-running { + description + "NETCONF :writable-running capability; + If the server advertises the :writable-running + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.2"; + } + + feature candidate { + description + "NETCONF :candidate capability; + If the server advertises the :candidate + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.3"; + } + + feature confirmed-commit { + if-feature candidate; + description + "NETCONF :confirmed-commit:1.1 capability; + If the server advertises the :confirmed-commit:1.1 + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + + reference "RFC 6241, Section 8.4"; + } + + feature rollback-on-error { + description + "NETCONF :rollback-on-error capability; + If the server advertises the :rollback-on-error + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.5"; + } + + feature validate { + description + "NETCONF :validate:1.1 capability; + If the server advertises the :validate:1.1 + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.6"; + } + + feature startup { + description + "NETCONF :startup capability; + If the server advertises the :startup + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.7"; + } + + feature url { + description + "NETCONF :url capability; + If the server advertises the :url + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.8"; + } + + feature xpath { + description + "NETCONF :xpath capability; + If the server advertises the :xpath + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.9"; + } + + // NETCONF Simple Types + + typedef session-id-type { + type uint32 { + range "1..max"; + } + description + "NETCONF Session Id"; + } + + typedef session-id-or-zero-type { + type uint32; + description + "NETCONF Session Id or Zero to indicate none"; + } + typedef error-tag-type { + type enumeration { + enum in-use { + description + "The request requires a resource that + already is in use."; + } + enum invalid-value { + description + "The request specifies an unacceptable value for one + or more parameters."; + } + enum too-big { + description + "The request or response (that would be generated) is + too large for the implementation to handle."; + } + enum missing-attribute { + description + "An expected attribute is missing."; + } + enum bad-attribute { + description + "An attribute value is not correct; e.g., wrong type, + out of range, pattern mismatch."; + } + enum unknown-attribute { + description + "An unexpected attribute is present."; + } + enum missing-element { + description + "An expected element is missing."; + } + enum bad-element { + description + "An element value is not correct; e.g., wrong type, + out of range, pattern mismatch."; + } + enum unknown-element { + description + "An unexpected element is present."; + } + enum unknown-namespace { + description + "An unexpected namespace is present."; + } + enum access-denied { + description + "Access to the requested protocol operation or + data model is denied because authorization failed."; + } + enum lock-denied { + description + "Access to the requested lock is denied because the + lock is currently held by another entity."; + } + enum resource-denied { + description + "Request could not be completed because of + insufficient resources."; + } + enum rollback-failed { + description + "Request to roll back some configuration change (via + rollback-on-error or <discard-changes> operations) + was not completed for some reason."; + + } + enum data-exists { + description + "Request could not be completed because the relevant + data model content already exists. For example, + a 'create' operation was attempted on data that + already exists."; + } + enum data-missing { + description + "Request could not be completed because the relevant + data model content does not exist. For example, + a 'delete' operation was attempted on + data that does not exist."; + } + enum operation-not-supported { + description + "Request could not be completed because the requested + operation is not supported by this implementation."; + } + enum operation-failed { + description + "Request could not be completed because the requested + operation failed for some reason not covered by + any other error condition."; + } + enum partial-operation { + description + "This error-tag is obsolete, and SHOULD NOT be sent + by servers conforming to this document."; + } + enum malformed-message { + description + "A message could not be handled because it failed to + be parsed correctly. For example, the message is not + well-formed XML or it uses an invalid character set."; + } + } + description "NETCONF Error Tag"; + reference "RFC 6241, Appendix A"; + } + + typedef error-severity-type { + type enumeration { + enum error { + description "Error severity"; + } + enum warning { + description "Warning severity"; + } + } + description "NETCONF Error Severity"; + reference "RFC 6241, Section 4.3"; + } + + typedef edit-operation-type { + type enumeration { + enum merge { + description + "The configuration data identified by the + element containing this attribute is merged + with the configuration at the corresponding + level in the configuration datastore identified + by the target parameter."; + } + enum replace { + description + "The configuration data identified by the element + containing this attribute replaces any related + configuration in the configuration datastore + identified by the target parameter. If no such + configuration data exists in the configuration + datastore, it is created. Unlike a + <copy-config> operation, which replaces the + entire target configuration, only the configuration + actually present in the config parameter is affected."; + } + enum create { + description + "The configuration data identified by the element + containing this attribute is added to the + configuration if and only if the configuration + data does not already exist in the configuration + datastore. If the configuration data exists, an + <rpc-error> element is returned with an + <error-tag> value of 'data-exists'."; + } + enum delete { + description + "The configuration data identified by the element + containing this attribute is deleted from the + configuration if and only if the configuration + data currently exists in the configuration + datastore. If the configuration data does not + exist, an <rpc-error> element is returned with + an <error-tag> value of 'data-missing'."; + } + enum remove { + description + "The configuration data identified by the element + containing this attribute is deleted from the + configuration if the configuration + data currently exists in the configuration + datastore. If the configuration data does not + exist, the 'remove' operation is silently ignored + by the server."; + } + } + default "merge"; + description "NETCONF 'operation' attribute values"; + reference "RFC 6241, Section 7.2"; + } + + // NETCONF Standard Protocol Operations + + rpc get-config { + description + "Retrieve all or part of a specified configuration."; + + reference "RFC 6241, Section 7.1"; + + input { + container source { + description + "Particular configuration to retrieve."; + + choice config-source { + mandatory true; + description + "The configuration to retrieve."; + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source. + This is optional-to-implement on the server because + not all servers will support filtering for this + datastore."; + } + } + } + + anyxml filter { + description + "Subtree or XPath filter to use."; + nc:get-filter-element-attributes; + } + } + + output { + anyxml data { + description + "Copy of the source datastore subset that matched + the filter criteria (if any). An empty data container + indicates that the request did not produce any results."; + } + } + } + + rpc edit-config { + description + "The <edit-config> operation loads all or part of a specified + configuration to the specified target configuration."; + + reference "RFC 6241, Section 7.2"; + + input { + container target { + description + "Particular configuration to edit."; + + choice config-target { + mandatory true; + description + "The configuration target."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + if-feature writable-running; + type empty; + description + "The running configuration is the config source."; + } + } + } + + leaf default-operation { + type enumeration { + enum merge { + description + "The default operation is merge."; + } + enum replace { + description + "The default operation is replace."; + } + enum none { + description + "There is no default operation."; + } + } + default "merge"; + description + "The default operation to use."; + } + + leaf test-option { + if-feature validate; + type enumeration { + enum test-then-set { + description + "The server will test and then set if no errors."; + } + enum set { + description + "The server will set without a test first."; + } + + enum test-only { + description + "The server will only test and not set, even + if there are no errors."; + } + } + default "test-then-set"; + description + "The test option to use."; + } + + leaf error-option { + type enumeration { + enum stop-on-error { + description + "The server will stop on errors."; + } + enum continue-on-error { + description + "The server may continue on errors."; + } + enum rollback-on-error { + description + "The server will roll back on errors. + This value can only be used if the 'rollback-on-error' + feature is supported."; + } + } + default "stop-on-error"; + description + "The error option to use."; + } + + choice edit-content { + mandatory true; + description + "The content for the edit operation."; + + anyxml config { + description + "Inline Config content."; + } + leaf url { + if-feature url; + type inet:uri; + description + "URL-based config content."; + } + } + } + } + + rpc copy-config { + description + "Create or replace an entire configuration datastore with the + contents of another complete configuration datastore."; + + reference "RFC 6241, Section 7.3"; + + input { + container target { + description + "Particular configuration to copy to."; + + choice config-target { + mandatory true; + description + "The configuration target of the copy operation."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + if-feature writable-running; + type empty; + description + "The running configuration is the config target. + This is optional-to-implement on the server."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config target."; + } + } + } + + container source { + description + "Particular configuration to copy from."; + + choice config-source { + mandatory true; + description + "The configuration source for the copy operation."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config source."; + } + anyxml config { + description + "Inline Config content: <config> element. Represents + an entire configuration datastore, not + a subset of the running datastore."; + } + } + } + } + } + + rpc delete-config { + description + "Delete a configuration datastore."; + + reference "RFC 6241, Section 7.4"; + + input { + container target { + description + "Particular configuration to delete."; + + choice config-target { + mandatory true; + description + "The configuration target to delete."; + + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config target."; + } + } + } + } + } + + rpc lock { + description + "The lock operation allows the client to lock the configuration + system of a device."; + + reference "RFC 6241, Section 7.5"; + + input { + container target { + description + "Particular configuration to lock."; + + choice config-target { + mandatory true; + description + "The configuration target to lock."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + type empty; + description + "The running configuration is the config target."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + } + } + } + } + + rpc unlock { + description + "The unlock operation is used to release a configuration lock, + previously obtained with the 'lock' operation."; + + reference "RFC 6241, Section 7.6"; + + input { + container target { + description + "Particular configuration to unlock."; + + choice config-target { + mandatory true; + description + "The configuration target to unlock."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + type empty; + description + "The running configuration is the config target."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + } + } + } + } + + rpc get { + description + "Retrieve running configuration and device state information."; + + reference "RFC 6241, Section 7.7"; + + input { + anyxml filter { + description + "This parameter specifies the portion of the system + configuration and state data to retrieve."; + nc:get-filter-element-attributes; + } + } + + output { + anyxml data { + description + "Copy of the running datastore subset and/or state + data that matched the filter criteria (if any). + An empty data container indicates that the request did not + produce any results."; + } + } + } + + rpc close-session { + description + "Request graceful termination of a NETCONF session."; + + reference "RFC 6241, Section 7.8"; + } + + rpc kill-session { + description + "Force the termination of a NETCONF session."; + + reference "RFC 6241, Section 7.9"; + + input { + leaf session-id { + type session-id-type; + mandatory true; + description + "Particular session to kill."; + } + } + } + + rpc commit { + if-feature candidate; + + description + "Commit the candidate configuration as the device's new + current configuration."; + + reference "RFC 6241, Section 8.3.4.1"; + + input { + leaf confirmed { + if-feature confirmed-commit; + type empty; + description + "Requests a confirmed commit."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf confirm-timeout { + if-feature confirmed-commit; + type uint32 { + range "1..max"; + } + units "seconds"; + default "600"; // 10 minutes + description + "The timeout interval for a confirmed commit."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf persist { + if-feature confirmed-commit; + type string; + description + "This parameter is used to make a confirmed commit + persistent. A persistent confirmed commit is not aborted + if the NETCONF session terminates. The only way to abort + a persistent confirmed commit is to let the timer expire, + or to use the <cancel-commit> operation. + + The value of this parameter is a token that must be given + in the 'persist-id' parameter of <commit> or + <cancel-commit> operations in order to confirm or cancel + the persistent confirmed commit. + + The token should be a random string."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf persist-id { + if-feature confirmed-commit; + type string; + description + "This parameter is given in order to commit a persistent + confirmed commit. The value must be equal to the value + given in the 'persist' parameter to the <commit> operation. + If it does not match, the operation fails with an + 'invalid-value' error."; + reference "RFC 6241, Section 8.3.4.1"; + } + + } + } + + rpc discard-changes { + if-feature candidate; + + description + "Revert the candidate configuration to the current + running configuration."; + reference "RFC 6241, Section 8.3.4.2"; + } + + rpc cancel-commit { + if-feature confirmed-commit; + description + "This operation is used to cancel an ongoing confirmed commit. + If the confirmed commit is persistent, the parameter + 'persist-id' must be given, and it must match the value of the + 'persist' parameter."; + reference "RFC 6241, Section 8.4.4.1"; + + input { + leaf persist-id { + type string; + description + "This parameter is given in order to cancel a persistent + confirmed commit. The value must be equal to the value + given in the 'persist' parameter to the <commit> operation. + If it does not match, the operation fails with an + 'invalid-value' error."; + } + } + } + + rpc validate { + if-feature validate; + + description + "Validates the contents of the specified configuration."; + + reference "RFC 6241, Section 8.6.4.1"; + + input { + container source { + description + "Particular configuration to validate."; + + choice config-source { + mandatory true; + description + "The configuration source to validate."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config source."; + } + anyxml config { + description + "Inline Config content: <config> element. Represents + an entire configuration datastore, not + a subset of the running datastore."; + } + } + } + } + } + +} diff --git a/models/ietf/RFC/ietf-netconf@2011-06-01.yang b/models/ietf/RFC/ietf-netconf@2011-06-01.yang new file mode 100644 index 0000000000000000000000000000000000000000..44c19c329a668bee7bfa17b2f4d0682de48feba4 --- /dev/null +++ b/models/ietf/RFC/ietf-netconf@2011-06-01.yang @@ -0,0 +1,927 @@ +module ietf-netconf { + + // the namespace for NETCONF XML definitions is unchanged + // from RFC 4741, which this document replaces + namespace "urn:ietf:params:xml:ns:netconf:base:1.0"; + + prefix nc; + + import ietf-inet-types { + prefix inet; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <netconf@ietf.org> + + WG Chair: Bert Wijnen + <bertietf@bwijnen.net> + + WG Chair: Mehmet Ersue + <mehmet.ersue@nsn.com> + + Editor: Martin Bjorklund + <mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Andy Bierman + <andy.bierman@brocade.com>"; + description + "NETCONF Protocol Data Types and Protocol Operations. + + Copyright (c) 2011 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6241; see + the RFC itself for full legal notices."; + revision 2011-06-01 { + description + "Initial revision"; + reference + "RFC 6241: Network Configuration Protocol"; + } + + extension get-filter-element-attributes { + description + "If this extension is present within an 'anyxml' + statement named 'filter', which must be conceptually + defined within the RPC input section for the <get> + and <get-config> protocol operations, then the + following unqualified XML attribute is supported + within the <filter> element, within a <get> or + <get-config> protocol operation: + + type : optional attribute with allowed + value strings 'subtree' and 'xpath'. + If missing, the default value is 'subtree'. + + If the 'xpath' feature is supported, then the + following unqualified XML attribute is + also supported: + + select: optional attribute containing a + string representing an XPath expression. + The 'type' attribute must be equal to 'xpath' + if this attribute is present."; + } + + // NETCONF capabilities defined as features + feature writable-running { + description + "NETCONF :writable-running capability; + If the server advertises the :writable-running + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.2"; + } + + feature candidate { + description + "NETCONF :candidate capability; + If the server advertises the :candidate + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.3"; + } + + feature confirmed-commit { + if-feature candidate; + description + "NETCONF :confirmed-commit:1.1 capability; + If the server advertises the :confirmed-commit:1.1 + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + + reference "RFC 6241, Section 8.4"; + } + + feature rollback-on-error { + description + "NETCONF :rollback-on-error capability; + If the server advertises the :rollback-on-error + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.5"; + } + + feature validate { + description + "NETCONF :validate:1.1 capability; + If the server advertises the :validate:1.1 + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.6"; + } + + feature startup { + description + "NETCONF :startup capability; + If the server advertises the :startup + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.7"; + } + + feature url { + description + "NETCONF :url capability; + If the server advertises the :url + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.8"; + } + + feature xpath { + description + "NETCONF :xpath capability; + If the server advertises the :xpath + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.9"; + } + + // NETCONF Simple Types + + typedef session-id-type { + type uint32 { + range "1..max"; + } + description + "NETCONF Session Id"; + } + + typedef session-id-or-zero-type { + type uint32; + description + "NETCONF Session Id or Zero to indicate none"; + } + typedef error-tag-type { + type enumeration { + enum in-use { + description + "The request requires a resource that + already is in use."; + } + enum invalid-value { + description + "The request specifies an unacceptable value for one + or more parameters."; + } + enum too-big { + description + "The request or response (that would be generated) is + too large for the implementation to handle."; + } + enum missing-attribute { + description + "An expected attribute is missing."; + } + enum bad-attribute { + description + "An attribute value is not correct; e.g., wrong type, + out of range, pattern mismatch."; + } + enum unknown-attribute { + description + "An unexpected attribute is present."; + } + enum missing-element { + description + "An expected element is missing."; + } + enum bad-element { + description + "An element value is not correct; e.g., wrong type, + out of range, pattern mismatch."; + } + enum unknown-element { + description + "An unexpected element is present."; + } + enum unknown-namespace { + description + "An unexpected namespace is present."; + } + enum access-denied { + description + "Access to the requested protocol operation or + data model is denied because authorization failed."; + } + enum lock-denied { + description + "Access to the requested lock is denied because the + lock is currently held by another entity."; + } + enum resource-denied { + description + "Request could not be completed because of + insufficient resources."; + } + enum rollback-failed { + description + "Request to roll back some configuration change (via + rollback-on-error or <discard-changes> operations) + was not completed for some reason."; + + } + enum data-exists { + description + "Request could not be completed because the relevant + data model content already exists. For example, + a 'create' operation was attempted on data that + already exists."; + } + enum data-missing { + description + "Request could not be completed because the relevant + data model content does not exist. For example, + a 'delete' operation was attempted on + data that does not exist."; + } + enum operation-not-supported { + description + "Request could not be completed because the requested + operation is not supported by this implementation."; + } + enum operation-failed { + description + "Request could not be completed because the requested + operation failed for some reason not covered by + any other error condition."; + } + enum partial-operation { + description + "This error-tag is obsolete, and SHOULD NOT be sent + by servers conforming to this document."; + } + enum malformed-message { + description + "A message could not be handled because it failed to + be parsed correctly. For example, the message is not + well-formed XML or it uses an invalid character set."; + } + } + description "NETCONF Error Tag"; + reference "RFC 6241, Appendix A"; + } + + typedef error-severity-type { + type enumeration { + enum error { + description "Error severity"; + } + enum warning { + description "Warning severity"; + } + } + description "NETCONF Error Severity"; + reference "RFC 6241, Section 4.3"; + } + + typedef edit-operation-type { + type enumeration { + enum merge { + description + "The configuration data identified by the + element containing this attribute is merged + with the configuration at the corresponding + level in the configuration datastore identified + by the target parameter."; + } + enum replace { + description + "The configuration data identified by the element + containing this attribute replaces any related + configuration in the configuration datastore + identified by the target parameter. If no such + configuration data exists in the configuration + datastore, it is created. Unlike a + <copy-config> operation, which replaces the + entire target configuration, only the configuration + actually present in the config parameter is affected."; + } + enum create { + description + "The configuration data identified by the element + containing this attribute is added to the + configuration if and only if the configuration + data does not already exist in the configuration + datastore. If the configuration data exists, an + <rpc-error> element is returned with an + <error-tag> value of 'data-exists'."; + } + enum delete { + description + "The configuration data identified by the element + containing this attribute is deleted from the + configuration if and only if the configuration + data currently exists in the configuration + datastore. If the configuration data does not + exist, an <rpc-error> element is returned with + an <error-tag> value of 'data-missing'."; + } + enum remove { + description + "The configuration data identified by the element + containing this attribute is deleted from the + configuration if the configuration + data currently exists in the configuration + datastore. If the configuration data does not + exist, the 'remove' operation is silently ignored + by the server."; + } + } + default "merge"; + description "NETCONF 'operation' attribute values"; + reference "RFC 6241, Section 7.2"; + } + + // NETCONF Standard Protocol Operations + + rpc get-config { + description + "Retrieve all or part of a specified configuration."; + + reference "RFC 6241, Section 7.1"; + + input { + container source { + description + "Particular configuration to retrieve."; + + choice config-source { + mandatory true; + description + "The configuration to retrieve."; + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source. + This is optional-to-implement on the server because + not all servers will support filtering for this + datastore."; + } + } + } + + anyxml filter { + description + "Subtree or XPath filter to use."; + nc:get-filter-element-attributes; + } + } + + output { + anyxml data { + description + "Copy of the source datastore subset that matched + the filter criteria (if any). An empty data container + indicates that the request did not produce any results."; + } + } + } + + rpc edit-config { + description + "The <edit-config> operation loads all or part of a specified + configuration to the specified target configuration."; + + reference "RFC 6241, Section 7.2"; + + input { + container target { + description + "Particular configuration to edit."; + + choice config-target { + mandatory true; + description + "The configuration target."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + if-feature writable-running; + type empty; + description + "The running configuration is the config source."; + } + } + } + + leaf default-operation { + type enumeration { + enum merge { + description + "The default operation is merge."; + } + enum replace { + description + "The default operation is replace."; + } + enum none { + description + "There is no default operation."; + } + } + default "merge"; + description + "The default operation to use."; + } + + leaf test-option { + if-feature validate; + type enumeration { + enum test-then-set { + description + "The server will test and then set if no errors."; + } + enum set { + description + "The server will set without a test first."; + } + + enum test-only { + description + "The server will only test and not set, even + if there are no errors."; + } + } + default "test-then-set"; + description + "The test option to use."; + } + + leaf error-option { + type enumeration { + enum stop-on-error { + description + "The server will stop on errors."; + } + enum continue-on-error { + description + "The server may continue on errors."; + } + enum rollback-on-error { + description + "The server will roll back on errors. + This value can only be used if the 'rollback-on-error' + feature is supported."; + } + } + default "stop-on-error"; + description + "The error option to use."; + } + + choice edit-content { + mandatory true; + description + "The content for the edit operation."; + + anyxml config { + description + "Inline Config content."; + } + leaf url { + if-feature url; + type inet:uri; + description + "URL-based config content."; + } + } + } + } + + rpc copy-config { + description + "Create or replace an entire configuration datastore with the + contents of another complete configuration datastore."; + + reference "RFC 6241, Section 7.3"; + + input { + container target { + description + "Particular configuration to copy to."; + + choice config-target { + mandatory true; + description + "The configuration target of the copy operation."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + if-feature writable-running; + type empty; + description + "The running configuration is the config target. + This is optional-to-implement on the server."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config target."; + } + } + } + + container source { + description + "Particular configuration to copy from."; + + choice config-source { + mandatory true; + description + "The configuration source for the copy operation."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config source."; + } + anyxml config { + description + "Inline Config content: <config> element. Represents + an entire configuration datastore, not + a subset of the running datastore."; + } + } + } + } + } + + rpc delete-config { + description + "Delete a configuration datastore."; + + reference "RFC 6241, Section 7.4"; + + input { + container target { + description + "Particular configuration to delete."; + + choice config-target { + mandatory true; + description + "The configuration target to delete."; + + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config target."; + } + } + } + } + } + + rpc lock { + description + "The lock operation allows the client to lock the configuration + system of a device."; + + reference "RFC 6241, Section 7.5"; + + input { + container target { + description + "Particular configuration to lock."; + + choice config-target { + mandatory true; + description + "The configuration target to lock."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + type empty; + description + "The running configuration is the config target."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + } + } + } + } + + rpc unlock { + description + "The unlock operation is used to release a configuration lock, + previously obtained with the 'lock' operation."; + + reference "RFC 6241, Section 7.6"; + + input { + container target { + description + "Particular configuration to unlock."; + + choice config-target { + mandatory true; + description + "The configuration target to unlock."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + type empty; + description + "The running configuration is the config target."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + } + } + } + } + + rpc get { + description + "Retrieve running configuration and device state information."; + + reference "RFC 6241, Section 7.7"; + + input { + anyxml filter { + description + "This parameter specifies the portion of the system + configuration and state data to retrieve."; + nc:get-filter-element-attributes; + } + } + + output { + anyxml data { + description + "Copy of the running datastore subset and/or state + data that matched the filter criteria (if any). + An empty data container indicates that the request did not + produce any results."; + } + } + } + + rpc close-session { + description + "Request graceful termination of a NETCONF session."; + + reference "RFC 6241, Section 7.8"; + } + + rpc kill-session { + description + "Force the termination of a NETCONF session."; + + reference "RFC 6241, Section 7.9"; + + input { + leaf session-id { + type session-id-type; + mandatory true; + description + "Particular session to kill."; + } + } + } + + rpc commit { + if-feature candidate; + + description + "Commit the candidate configuration as the device's new + current configuration."; + + reference "RFC 6241, Section 8.3.4.1"; + + input { + leaf confirmed { + if-feature confirmed-commit; + type empty; + description + "Requests a confirmed commit."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf confirm-timeout { + if-feature confirmed-commit; + type uint32 { + range "1..max"; + } + units "seconds"; + default "600"; // 10 minutes + description + "The timeout interval for a confirmed commit."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf persist { + if-feature confirmed-commit; + type string; + description + "This parameter is used to make a confirmed commit + persistent. A persistent confirmed commit is not aborted + if the NETCONF session terminates. The only way to abort + a persistent confirmed commit is to let the timer expire, + or to use the <cancel-commit> operation. + + The value of this parameter is a token that must be given + in the 'persist-id' parameter of <commit> or + <cancel-commit> operations in order to confirm or cancel + the persistent confirmed commit. + + The token should be a random string."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf persist-id { + if-feature confirmed-commit; + type string; + description + "This parameter is given in order to commit a persistent + confirmed commit. The value must be equal to the value + given in the 'persist' parameter to the <commit> operation. + If it does not match, the operation fails with an + 'invalid-value' error."; + reference "RFC 6241, Section 8.3.4.1"; + } + + } + } + + rpc discard-changes { + if-feature candidate; + + description + "Revert the candidate configuration to the current + running configuration."; + reference "RFC 6241, Section 8.3.4.2"; + } + + rpc cancel-commit { + if-feature confirmed-commit; + description + "This operation is used to cancel an ongoing confirmed commit. + If the confirmed commit is persistent, the parameter + 'persist-id' must be given, and it must match the value of the + 'persist' parameter."; + reference "RFC 6241, Section 8.4.4.1"; + + input { + leaf persist-id { + type string; + description + "This parameter is given in order to cancel a persistent + confirmed commit. The value must be equal to the value + given in the 'persist' parameter to the <commit> operation. + If it does not match, the operation fails with an + 'invalid-value' error."; + } + } + } + + rpc validate { + if-feature validate; + + description + "Validates the contents of the specified configuration."; + + reference "RFC 6241, Section 8.6.4.1"; + + input { + container source { + description + "Particular configuration to validate."; + + choice config-source { + mandatory true; + description + "The configuration source to validate."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config source."; + } + anyxml config { + description + "Inline Config content: <config> element. Represents + an entire configuration datastore, not + a subset of the running datastore."; + } + } + } + } + } + +} diff --git a/models/ietf/RFC/ietf-network-instance.yang b/models/ietf/RFC/ietf-network-instance.yang new file mode 100644 index 0000000000000000000000000000000000000000..dfde7fbe8ea00a79294916ac63ced7c4dfb4b04e --- /dev/null +++ b/models/ietf/RFC/ietf-network-instance.yang @@ -0,0 +1,282 @@ +module ietf-network-instance { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-instance"; + prefix ni; + + // import some basic types + + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-ip { + prefix ip; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + import ietf-yang-schema-mount { + prefix yangmnt; + reference + "RFC 8528: YANG Schema Mount"; + } + + organization + "IETF Routing Area (rtgwg) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/rtgwg> + WG List: <mailto:rtgwg@ietf.org> + + Author: Lou Berger + <mailto:lberger@labn.net> + Author: Christian Hopps + <mailto:chopps@chopps.org> + Author: Acee Lindem + <mailto:acee@cisco.com> + Author: Dean Bogdanovic + <mailto:ivandean@gmail.com>"; + description + "This module is used to support multiple network instances + within a single physical or virtual device. Network + instances are commonly known as VRFs (VPN Routing and + Forwarding) and VSIs (Virtual Switching Instances). + 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. + + Copyright (c) 2019 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 Simplified 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 8529; see + the RFC itself for full legal notices."; + + revision 2019-01-21 { + description + "Initial revision."; + reference + "RFC 8529"; + } + + // top-level device definition statements + + container network-instances { + description + "Network instances, each of which consists of + VRFs and/or VSIs."; + reference + "RFC 8349: A YANG Data Model for Routing Management"; + list network-instance { + key "name"; + description + "List of network instances."; + leaf name { + type string; + mandatory true; + description + "device-scoped identifier for the network + instance."; + } + leaf enabled { + type boolean; + default "true"; + description + "Flag indicating whether or not the network + instance is enabled."; + } + leaf description { + type string; + description + "Description of the network instance + and its intended purpose."; + } + choice ni-type { + description + "This node serves as an anchor point for different types + of network instances. Each 'case' is expected to + differ in terms of the information needed in the + parent/core to support the NI and may differ in their + mounted-schema definition. When the mounted schema is + not expected to be the same for a specific type of NI, + a mount point should be defined."; + } + choice root-type { + mandatory true; + description + "Well-known mount points."; + container vrf-root { + description + "Container for mount point."; + yangmnt:mount-point "vrf-root" { + description + "Root for L3VPN-type models. This will typically + not be an inline-type mount point."; + } + } + container vsi-root { + description + "Container for mount point."; + yangmnt:mount-point "vsi-root" { + description + "Root for L2VPN-type models. This will typically + not be an inline-type mount point."; + } + } + container vv-root { + description + "Container for mount point."; + yangmnt:mount-point "vv-root" { + description + "Root models that support both L2VPN-type bridging + and L3VPN-type routing. This will typically + not be an inline-type mount point."; + } + } + } + } + } + + // augment statements + + augment "/if:interfaces/if:interface" { + description + "Add a node for the identification of the network + instance associated with the information configured + on a interface. + + Note that a standard error will be returned if the + identified leafref isn't present. If an interface cannot + be assigned for any other reason, the operation SHALL fail + with an error-tag of 'operation-failed' and an + error-app-tag of 'ni-assignment-failed'. A meaningful + error-info that indicates the source of the assignment + failure SHOULD also be provided."; + leaf bind-ni-name { + type leafref { + path "/network-instances/network-instance/name"; + } + description + "Network instance to which an interface is bound."; + } + } + augment "/if:interfaces/if:interface/ip:ipv4" { + description + "Add a node for the identification of the network + instance associated with the information configured + on an IPv4 interface. + + Note that a standard error will be returned if the + identified leafref isn't present. If an interface cannot + be assigned for any other reason, the operation SHALL fail + with an error-tag of 'operation-failed' and an + error-app-tag of 'ni-assignment-failed'. A meaningful + error-info that indicates the source of the assignment + failure SHOULD also be provided."; + leaf bind-ni-name { + type leafref { + path "/network-instances/network-instance/name"; + } + description + "Network instance to which IPv4 interface is bound."; + } + } + augment "/if:interfaces/if:interface/ip:ipv6" { + description + "Add a node for the identification of the network + instance associated with the information configured + on an IPv6 interface. + + Note that a standard error will be returned if the + identified leafref isn't present. If an interface cannot + be assigned for any other reason, the operation SHALL fail + with an error-tag of 'operation-failed' and an + error-app-tag of 'ni-assignment-failed'. A meaningful + error-info that indicates the source of the assignment + failure SHOULD also be provided."; + leaf bind-ni-name { + type leafref { + path "/network-instances/network-instance/name"; + } + description + "Network instance to which IPv6 interface is bound."; + } + } + + // notification statements + + notification bind-ni-name-failed { + description + "Indicates an error in the association of an interface to an + NI. Only generated after success is initially returned when + bind-ni-name is set. + + Note: Some errors may need to be reported for multiple + associations, e.g., a single error may need to be reported + for an IPv4 and an IPv6 bind-ni-name. + + At least one container with a bind-ni-name leaf MUST be + included in this notification."; + leaf name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + mandatory true; + description + "Contains the interface name associated with the + failure."; + } + container interface { + description + "Generic interface type."; + leaf bind-ni-name { + type leafref { + path "/if:interfaces/if:interface" + + "/ni:bind-ni-name"; + } + description + "Contains the bind-ni-name associated with the + failure."; + } + } + container ipv4 { + description + "IPv4 interface type."; + leaf bind-ni-name { + type leafref { + path "/if:interfaces/if:interface/ip:ipv4/ni:bind-ni-name"; + } + description + "Contains the bind-ni-name associated with the + failure."; + } + } + container ipv6 { + description + "IPv6 interface type."; + leaf bind-ni-name { + type leafref { + path "/if:interfaces/if:interface/ip:ipv6" + + "/ni:bind-ni-name"; + } + description + "Contains the bind-ni-name associated with the + failure."; + } + } + leaf error-info { + type string; + description + "Optionally, indicates the source of the assignment + failure."; + } + } +} diff --git a/models/ietf/RFC/ietf-network-instance@2019-01-21.yang b/models/ietf/RFC/ietf-network-instance@2019-01-21.yang new file mode 100644 index 0000000000000000000000000000000000000000..dfde7fbe8ea00a79294916ac63ced7c4dfb4b04e --- /dev/null +++ b/models/ietf/RFC/ietf-network-instance@2019-01-21.yang @@ -0,0 +1,282 @@ +module ietf-network-instance { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-instance"; + prefix ni; + + // import some basic types + + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-ip { + prefix ip; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + import ietf-yang-schema-mount { + prefix yangmnt; + reference + "RFC 8528: YANG Schema Mount"; + } + + organization + "IETF Routing Area (rtgwg) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/rtgwg> + WG List: <mailto:rtgwg@ietf.org> + + Author: Lou Berger + <mailto:lberger@labn.net> + Author: Christian Hopps + <mailto:chopps@chopps.org> + Author: Acee Lindem + <mailto:acee@cisco.com> + Author: Dean Bogdanovic + <mailto:ivandean@gmail.com>"; + description + "This module is used to support multiple network instances + within a single physical or virtual device. Network + instances are commonly known as VRFs (VPN Routing and + Forwarding) and VSIs (Virtual Switching Instances). + 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. + + Copyright (c) 2019 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 Simplified 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 8529; see + the RFC itself for full legal notices."; + + revision 2019-01-21 { + description + "Initial revision."; + reference + "RFC 8529"; + } + + // top-level device definition statements + + container network-instances { + description + "Network instances, each of which consists of + VRFs and/or VSIs."; + reference + "RFC 8349: A YANG Data Model for Routing Management"; + list network-instance { + key "name"; + description + "List of network instances."; + leaf name { + type string; + mandatory true; + description + "device-scoped identifier for the network + instance."; + } + leaf enabled { + type boolean; + default "true"; + description + "Flag indicating whether or not the network + instance is enabled."; + } + leaf description { + type string; + description + "Description of the network instance + and its intended purpose."; + } + choice ni-type { + description + "This node serves as an anchor point for different types + of network instances. Each 'case' is expected to + differ in terms of the information needed in the + parent/core to support the NI and may differ in their + mounted-schema definition. When the mounted schema is + not expected to be the same for a specific type of NI, + a mount point should be defined."; + } + choice root-type { + mandatory true; + description + "Well-known mount points."; + container vrf-root { + description + "Container for mount point."; + yangmnt:mount-point "vrf-root" { + description + "Root for L3VPN-type models. This will typically + not be an inline-type mount point."; + } + } + container vsi-root { + description + "Container for mount point."; + yangmnt:mount-point "vsi-root" { + description + "Root for L2VPN-type models. This will typically + not be an inline-type mount point."; + } + } + container vv-root { + description + "Container for mount point."; + yangmnt:mount-point "vv-root" { + description + "Root models that support both L2VPN-type bridging + and L3VPN-type routing. This will typically + not be an inline-type mount point."; + } + } + } + } + } + + // augment statements + + augment "/if:interfaces/if:interface" { + description + "Add a node for the identification of the network + instance associated with the information configured + on a interface. + + Note that a standard error will be returned if the + identified leafref isn't present. If an interface cannot + be assigned for any other reason, the operation SHALL fail + with an error-tag of 'operation-failed' and an + error-app-tag of 'ni-assignment-failed'. A meaningful + error-info that indicates the source of the assignment + failure SHOULD also be provided."; + leaf bind-ni-name { + type leafref { + path "/network-instances/network-instance/name"; + } + description + "Network instance to which an interface is bound."; + } + } + augment "/if:interfaces/if:interface/ip:ipv4" { + description + "Add a node for the identification of the network + instance associated with the information configured + on an IPv4 interface. + + Note that a standard error will be returned if the + identified leafref isn't present. If an interface cannot + be assigned for any other reason, the operation SHALL fail + with an error-tag of 'operation-failed' and an + error-app-tag of 'ni-assignment-failed'. A meaningful + error-info that indicates the source of the assignment + failure SHOULD also be provided."; + leaf bind-ni-name { + type leafref { + path "/network-instances/network-instance/name"; + } + description + "Network instance to which IPv4 interface is bound."; + } + } + augment "/if:interfaces/if:interface/ip:ipv6" { + description + "Add a node for the identification of the network + instance associated with the information configured + on an IPv6 interface. + + Note that a standard error will be returned if the + identified leafref isn't present. If an interface cannot + be assigned for any other reason, the operation SHALL fail + with an error-tag of 'operation-failed' and an + error-app-tag of 'ni-assignment-failed'. A meaningful + error-info that indicates the source of the assignment + failure SHOULD also be provided."; + leaf bind-ni-name { + type leafref { + path "/network-instances/network-instance/name"; + } + description + "Network instance to which IPv6 interface is bound."; + } + } + + // notification statements + + notification bind-ni-name-failed { + description + "Indicates an error in the association of an interface to an + NI. Only generated after success is initially returned when + bind-ni-name is set. + + Note: Some errors may need to be reported for multiple + associations, e.g., a single error may need to be reported + for an IPv4 and an IPv6 bind-ni-name. + + At least one container with a bind-ni-name leaf MUST be + included in this notification."; + leaf name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + mandatory true; + description + "Contains the interface name associated with the + failure."; + } + container interface { + description + "Generic interface type."; + leaf bind-ni-name { + type leafref { + path "/if:interfaces/if:interface" + + "/ni:bind-ni-name"; + } + description + "Contains the bind-ni-name associated with the + failure."; + } + } + container ipv4 { + description + "IPv4 interface type."; + leaf bind-ni-name { + type leafref { + path "/if:interfaces/if:interface/ip:ipv4/ni:bind-ni-name"; + } + description + "Contains the bind-ni-name associated with the + failure."; + } + } + container ipv6 { + description + "IPv6 interface type."; + leaf bind-ni-name { + type leafref { + path "/if:interfaces/if:interface/ip:ipv6" + + "/ni:bind-ni-name"; + } + description + "Contains the bind-ni-name associated with the + failure."; + } + } + leaf error-info { + type string; + description + "Optionally, indicates the source of the assignment + failure."; + } + } +} diff --git a/models/ietf/RFC/ietf-network-state.yang b/models/ietf/RFC/ietf-network-state.yang new file mode 100644 index 0000000000000000000000000000000000000000..9a6893da2042ca5d1dfe44eea5743dcdad088a1d --- /dev/null +++ b/models/ietf/RFC/ietf-network-state.yang @@ -0,0 +1,176 @@ +module ietf-network-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-state"; + prefix nw-s; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Jan Medved + <mailto:jmedved@cisco.com> + + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com>"; + + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. It represents + information that either (1) is learned and automatically + populated or (2) results from applying network information + that has been configured per the 'ietf-network' data model, + mirroring the corresponding data nodes in this data model. + + The data model mirrors 'ietf-network' but contains only + read-only state data. The data model is not needed when the + underlying implementation infrastructure supports the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + config false; + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + leaf network-id { + type nw:network-id; + description + "Identifies a network."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type nw:node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-network/nw-s:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-network-state@2018-02-26.yang b/models/ietf/RFC/ietf-network-state@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..9a6893da2042ca5d1dfe44eea5743dcdad088a1d --- /dev/null +++ b/models/ietf/RFC/ietf-network-state@2018-02-26.yang @@ -0,0 +1,176 @@ +module ietf-network-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-state"; + prefix nw-s; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Jan Medved + <mailto:jmedved@cisco.com> + + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com>"; + + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. It represents + information that either (1) is learned and automatically + populated or (2) results from applying network information + that has been configured per the 'ietf-network' data model, + mirroring the corresponding data nodes in this data model. + + The data model mirrors 'ietf-network' but contains only + read-only state data. The data model is not needed when the + underlying implementation infrastructure supports the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + config false; + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + leaf network-id { + type nw:network-id; + description + "Identifies a network."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type nw:node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-network/nw-s:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-network-topology-state.yang b/models/ietf/RFC/ietf-network-topology-state.yang new file mode 100644 index 0000000000000000000000000000000000000000..1c1ba1b2e5ef7de11d646cb54b768ce4fda3c23d --- /dev/null +++ b/models/ietf/RFC/ietf-network-topology-state.yang @@ -0,0 +1,273 @@ +module ietf-network-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology-state"; + prefix nt-s; + + import ietf-network-state { + prefix nw-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Jan Medved + <mailto:jmedved@cisco.com> + + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com>"; + + description + "This module defines a common base data model for network + topology state, representing topology that either (1) is learned + or (2) results from applying topology that has been configured + per the 'ietf-network-topology' data model, mirroring the + corresponding data nodes in this data model. It augments the + base network state data model with links to connect nodes, as + well as termination points to terminate links on nodes. + + The data model mirrors 'ietf-network-topology' but contains only + read-only state data. The data model is not needed when the + underlying implementation infrastructure supports the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + grouping link-ref { + description + "References a link in a specific network. Although this + grouping is not used in this module, it is defined here for + the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nt-s:link/nt-s:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw-s:network-ref; + } + + grouping tp-ref { + description + "References a termination point in a specific node. Although + this grouping is not used in this module, it is defined here + for the convenience of augmenting modules."; + leaf tp-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nw-s:node[nw-s:node-id=current()/../"+ + "node-ref]/nt-s:termination-point/nt-s:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw-s:node-ref; + } + + augment "/nw-s:networks/nw-s:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw-s:node[nw-s:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + + leaf dest-tp { + type leafref { + path "../../../nw-s:node[nw-s:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + leaf link-id { + type nt:link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-network/nw-s:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + leaf link-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id="+ + "current()/../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + + augment "/nw-s:networks/nw-s:network/nw-s:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type nt:tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-node/nw-s:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw-s:supporting-node/nw-s:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + + leaf tp-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id="+ + "current()/../network-ref]/nw-s:node[nw-s:node-id="+ + "current()/../node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-network-topology-state@2018-02-26.yang b/models/ietf/RFC/ietf-network-topology-state@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..1c1ba1b2e5ef7de11d646cb54b768ce4fda3c23d --- /dev/null +++ b/models/ietf/RFC/ietf-network-topology-state@2018-02-26.yang @@ -0,0 +1,273 @@ +module ietf-network-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology-state"; + prefix nt-s; + + import ietf-network-state { + prefix nw-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Jan Medved + <mailto:jmedved@cisco.com> + + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com>"; + + description + "This module defines a common base data model for network + topology state, representing topology that either (1) is learned + or (2) results from applying topology that has been configured + per the 'ietf-network-topology' data model, mirroring the + corresponding data nodes in this data model. It augments the + base network state data model with links to connect nodes, as + well as termination points to terminate links on nodes. + + The data model mirrors 'ietf-network-topology' but contains only + read-only state data. The data model is not needed when the + underlying implementation infrastructure supports the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + grouping link-ref { + description + "References a link in a specific network. Although this + grouping is not used in this module, it is defined here for + the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nt-s:link/nt-s:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw-s:network-ref; + } + + grouping tp-ref { + description + "References a termination point in a specific node. Although + this grouping is not used in this module, it is defined here + for the convenience of augmenting modules."; + leaf tp-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nw-s:node[nw-s:node-id=current()/../"+ + "node-ref]/nt-s:termination-point/nt-s:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw-s:node-ref; + } + + augment "/nw-s:networks/nw-s:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw-s:node[nw-s:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + + leaf dest-tp { + type leafref { + path "../../../nw-s:node[nw-s:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + leaf link-id { + type nt:link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-network/nw-s:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + leaf link-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id="+ + "current()/../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + + augment "/nw-s:networks/nw-s:network/nw-s:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type nt:tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-node/nw-s:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw-s:supporting-node/nw-s:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + + leaf tp-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id="+ + "current()/../network-ref]/nw-s:node[nw-s:node-id="+ + "current()/../node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-network-topology.yang b/models/ietf/RFC/ietf-network-topology.yang new file mode 100644 index 0000000000000000000000000000000000000000..1ec944d791db1da1b8236c6069f10d65b1b6f97f --- /dev/null +++ b/models/ietf/RFC/ietf-network-topology.yang @@ -0,0 +1,294 @@ +module ietf-network-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology"; + prefix nt; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Jan Medved + <mailto:jmedved@cisco.com> + + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com>"; + + description + "This module defines a common base model for a network topology, + augmenting the base network data model with links to connect + nodes, as well as termination points to terminate links + on nodes. + + Copyright (c) 2018 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 Simplified 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. The precise + structure of the link-id will be up to the implementation. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the data model is instantiated in + separate datastores. An implementation MAY choose to capture + semantics in the identifier -- for example, to indicate the + type of link and/or the type of topology of which the link is + a part."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. The precise + structure of the tp-id will be up to the implementation. + The identifier SHOULD be chosen such that the same termination + point in a real network topology will always be identified + through the same identifier, even if the data model is + instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of termination point and/or the type of + node that contains the termination point."; + } + + grouping link-ref { + description + "This grouping can be used to reference a link in a specific + network. Although it is not used in this module, it is + defined here for the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nt:link/nt:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:network-ref; + } + + grouping tp-ref { + description + "This grouping can be used to reference a termination point + in a specific node. Although it is not used in this module, + it is defined here for the convenience of augmenting + modules."; + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/nt:termination-point/nt:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:node-ref; + } + + augment "/nw:networks/nw:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + leaf dest-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + augment "/nw:networks/nw:network/nw:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + + leaf network-ref { + type leafref { + path "../../../nw:supporting-node/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw:supporting-node/nw:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-network-topology@2018-02-26.yang b/models/ietf/RFC/ietf-network-topology@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..1ec944d791db1da1b8236c6069f10d65b1b6f97f --- /dev/null +++ b/models/ietf/RFC/ietf-network-topology@2018-02-26.yang @@ -0,0 +1,294 @@ +module ietf-network-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology"; + prefix nt; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Jan Medved + <mailto:jmedved@cisco.com> + + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com>"; + + description + "This module defines a common base model for a network topology, + augmenting the base network data model with links to connect + nodes, as well as termination points to terminate links + on nodes. + + Copyright (c) 2018 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 Simplified 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. The precise + structure of the link-id will be up to the implementation. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the data model is instantiated in + separate datastores. An implementation MAY choose to capture + semantics in the identifier -- for example, to indicate the + type of link and/or the type of topology of which the link is + a part."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. The precise + structure of the tp-id will be up to the implementation. + The identifier SHOULD be chosen such that the same termination + point in a real network topology will always be identified + through the same identifier, even if the data model is + instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of termination point and/or the type of + node that contains the termination point."; + } + + grouping link-ref { + description + "This grouping can be used to reference a link in a specific + network. Although it is not used in this module, it is + defined here for the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nt:link/nt:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:network-ref; + } + + grouping tp-ref { + description + "This grouping can be used to reference a termination point + in a specific node. Although it is not used in this module, + it is defined here for the convenience of augmenting + modules."; + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/nt:termination-point/nt:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:node-ref; + } + + augment "/nw:networks/nw:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + leaf dest-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + augment "/nw:networks/nw:network/nw:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + + leaf network-ref { + type leafref { + path "../../../nw:supporting-node/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw:supporting-node/nw:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-network.yang b/models/ietf/RFC/ietf-network.yang new file mode 100644 index 0000000000000000000000000000000000000000..6a03d7e41614cc8dc017cfb4d5aacfb4ca60bc2c --- /dev/null +++ b/models/ietf/RFC/ietf-network.yang @@ -0,0 +1,192 @@ +module ietf-network { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network"; + prefix nw; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Jan Medved + <mailto:jmedved@cisco.com> + + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com>"; + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. + + Copyright (c) 2018 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 Simplified 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef node-id { + type inet:uri; + description + "Identifier for a node. The precise structure of the node-id + will be up to the implementation. For example, some + implementations MAY pick a URI that includes the network-id + as part of the path. The identifier SHOULD be chosen + such that the same node in a real network topology will + always be identified through the same identifier, even if + the data model is instantiated in separate datastores. An + implementation MAY choose to capture semantics in the + identifier -- for example, to indicate the type of node."; + } + + typedef network-id { + type inet:uri; + description + "Identifier for a network. The precise structure of the + network-id will be up to the implementation. The identifier + SHOULD be chosen such that the same network will always be + identified through the same identifier, even if the data model + is instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of network."; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node/nw:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + leaf network-id { + type network-id; + description + "Identifies a network."; + } + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw:networks/nw:network/nw:node/nw:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-network@2018-02-26.yang b/models/ietf/RFC/ietf-network@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..6a03d7e41614cc8dc017cfb4d5aacfb4ca60bc2c --- /dev/null +++ b/models/ietf/RFC/ietf-network@2018-02-26.yang @@ -0,0 +1,192 @@ +module ietf-network { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network"; + prefix nw; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Jan Medved + <mailto:jmedved@cisco.com> + + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com>"; + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. + + Copyright (c) 2018 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 Simplified 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef node-id { + type inet:uri; + description + "Identifier for a node. The precise structure of the node-id + will be up to the implementation. For example, some + implementations MAY pick a URI that includes the network-id + as part of the path. The identifier SHOULD be chosen + such that the same node in a real network topology will + always be identified through the same identifier, even if + the data model is instantiated in separate datastores. An + implementation MAY choose to capture semantics in the + identifier -- for example, to indicate the type of node."; + } + + typedef network-id { + type inet:uri; + description + "Identifier for a network. The precise structure of the + network-id will be up to the implementation. The identifier + SHOULD be chosen such that the same network will always be + identified through the same identifier, even if the data model + is instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of network."; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node/nw:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + leaf network-id { + type network-id; + description + "Identifies a network."; + } + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw:networks/nw:network/nw:node/nw:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-origin.yang b/models/ietf/RFC/ietf-origin.yang new file mode 100644 index 0000000000000000000000000000000000000000..3080c9114f37a40e6e1d42e4740fa2196c851322 --- /dev/null +++ b/models/ietf/RFC/ietf-origin.yang @@ -0,0 +1,147 @@ +module ietf-origin { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-origin"; + prefix or; + + import ietf-yang-metadata { + prefix md; + } + + organization + "IETF Network Modeling (NETMOD) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + + WG List: <mailto:netmod@ietf.org> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Phil Shafer + <mailto:phil@juniper.net> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net> + + Author: Rob Wilton + <rwilton@cisco.com>"; + + description + "This YANG module defines an 'origin' metadata annotation and a + set of identities for the origin value. + + Copyright (c) 2018 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 Simplified 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 8342 + (https://www.rfc-editor.org/info/rfc8342); see the RFC itself + for full legal notices."; + + revision 2018-02-14 { + description + "Initial revision."; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + + /* + * Identities + */ + + identity origin { + description + "Abstract base identity for the origin annotation."; + } + + identity intended { + base origin; + description + "Denotes configuration from the intended configuration + datastore."; + } + + identity dynamic { + base origin; + description + "Denotes configuration from a dynamic configuration + datastore."; + } + + identity system { + base origin; + description + "Denotes configuration originated by the system itself. + + Examples of system configuration include applied configuration + for an always-existing loopback interface, or interface + configuration that is auto-created due to the hardware + currently present in the device."; + } + + identity learned { + base origin; + description + "Denotes configuration learned from protocol interactions with + other devices, instead of via either the intended + configuration datastore or any dynamic configuration + datastore. + + Examples of protocols that provide learned configuration + include link-layer negotiations, routing protocols, and + DHCP."; + } + + identity default { + base origin; + description + "Denotes configuration that does not have a configured or + learned value but has a default value in use. Covers both + values defined in a 'default' statement and values defined + via an explanation in a 'description' statement."; + } + + identity unknown { + base origin; + description + "Denotes configuration for which the system cannot identify the + origin."; + } + + /* + * Type definitions + */ + + typedef origin-ref { + type identityref { + base origin; + } + description + "An origin identity reference."; + } + + /* + * Metadata annotations + */ + + md:annotation origin { + type origin-ref; + description + "The 'origin' annotation can be present on any configuration + data node in the operational state datastore. It specifies + from where the node originated. If not specified for a given + configuration data node, then the origin is the same as the + origin of its parent node in the data tree. The origin for + any top-level configuration data nodes must be specified."; + } +} diff --git a/models/ietf/RFC/ietf-origin@2018-02-14.yang b/models/ietf/RFC/ietf-origin@2018-02-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..3080c9114f37a40e6e1d42e4740fa2196c851322 --- /dev/null +++ b/models/ietf/RFC/ietf-origin@2018-02-14.yang @@ -0,0 +1,147 @@ +module ietf-origin { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-origin"; + prefix or; + + import ietf-yang-metadata { + prefix md; + } + + organization + "IETF Network Modeling (NETMOD) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + + WG List: <mailto:netmod@ietf.org> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Phil Shafer + <mailto:phil@juniper.net> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net> + + Author: Rob Wilton + <rwilton@cisco.com>"; + + description + "This YANG module defines an 'origin' metadata annotation and a + set of identities for the origin value. + + Copyright (c) 2018 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 Simplified 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 8342 + (https://www.rfc-editor.org/info/rfc8342); see the RFC itself + for full legal notices."; + + revision 2018-02-14 { + description + "Initial revision."; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + + /* + * Identities + */ + + identity origin { + description + "Abstract base identity for the origin annotation."; + } + + identity intended { + base origin; + description + "Denotes configuration from the intended configuration + datastore."; + } + + identity dynamic { + base origin; + description + "Denotes configuration from a dynamic configuration + datastore."; + } + + identity system { + base origin; + description + "Denotes configuration originated by the system itself. + + Examples of system configuration include applied configuration + for an always-existing loopback interface, or interface + configuration that is auto-created due to the hardware + currently present in the device."; + } + + identity learned { + base origin; + description + "Denotes configuration learned from protocol interactions with + other devices, instead of via either the intended + configuration datastore or any dynamic configuration + datastore. + + Examples of protocols that provide learned configuration + include link-layer negotiations, routing protocols, and + DHCP."; + } + + identity default { + base origin; + description + "Denotes configuration that does not have a configured or + learned value but has a default value in use. Covers both + values defined in a 'default' statement and values defined + via an explanation in a 'description' statement."; + } + + identity unknown { + base origin; + description + "Denotes configuration for which the system cannot identify the + origin."; + } + + /* + * Type definitions + */ + + typedef origin-ref { + type identityref { + base origin; + } + description + "An origin identity reference."; + } + + /* + * Metadata annotations + */ + + md:annotation origin { + type origin-ref; + description + "The 'origin' annotation can be present on any configuration + data node in the operational state datastore. It specifies + from where the node originated. If not specified for a given + configuration data node, then the origin is the same as the + origin of its parent node in the data tree. The origin for + any top-level configuration data nodes must be specified."; + } +} diff --git a/models/ietf/RFC/ietf-packet-fields.yang b/models/ietf/RFC/ietf-packet-fields.yang new file mode 100644 index 0000000000000000000000000000000000000000..2fb797bd87bf4ed825f83ec788df707b94c5f68b --- /dev/null +++ b/models/ietf/RFC/ietf-packet-fields.yang @@ -0,0 +1,576 @@ +module ietf-packet-fields { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields"; + prefix packet-fields; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991 - Common YANG Data Types."; + } + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991 - Common YANG Data Types."; + } + + import ietf-ethertypes { + prefix eth; + reference + "RFC 8519 - YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group."; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: netmod@ietf.org + + Editor: Mahesh Jethanandani + mjethanandani@gmail.com + Editor: Lisa Huang + huangyi_99@yahoo.com + Editor: Sonal Agarwal + sagarwal12@gmail.com + Editor: Dana Blair + dana@blairhome.com"; + + description + "This YANG module defines groupings that are used by + the ietf-access-control-list YANG module. Their usage + is not limited to ietf-access-control-list and can be + used anywhere as applicable. + + Copyright (c) 2019 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8519; see + the RFC itself for full legal notices."; + + revision 2019-03-04 { + description + "Initial version."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + /* + * Typedefs + */ + typedef operator { + type enumeration { + enum lte { + description + "Less than or equal to."; + } + enum gte { + description + "Greater than or equal to."; + } + enum eq { + description + "Equal to."; + } + enum neq { + description + "Not equal to."; + } + } + description + "The source and destination port range definitions + can be further qualified using an operator. An + operator is needed only if the lower-port is specified + and the upper-port is not specified. The operator + therefore further qualifies the lower-port only."; + } + + /* + * Groupings + */ + grouping port-range-or-operator { + choice port-range-or-operator { + case range { + leaf lower-port { + type inet:port-number; + must '. <= ../upper-port' { + error-message + "The lower-port must be less than or equal to + the upper-port."; + } + mandatory true; + description + "Lower boundary for a port."; + } + leaf upper-port { + type inet:port-number; + mandatory true; + description + "Upper boundary for a port."; + } + } + case operator { + leaf operator { + type operator; + default "eq"; + description + "Operator to be applied on the port below."; + } + leaf port { + type inet:port-number; + mandatory true; + description + "Port number along with the operator on which to + match."; + } + } + description + "Choice of specifying a port range or a single + port along with an operator."; + } + description + "Grouping for port definitions in the form of a + choice statement."; + } + + grouping acl-ip-header-fields { + description + "IP header fields common to IPv4 and IPv6"; + reference + "RFC 791: Internet Protocol."; + + leaf dscp { + type inet:dscp; + description + "Differentiated Services Code Point."; + reference + "RFC 2474: Definition of the Differentiated Services + Field (DS Field) in the IPv4 and IPv6 + Headers."; + } + + leaf ecn { + type uint8 { + range "0..3"; + } + description + "Explicit Congestion Notification."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + + leaf length { + type uint16; + description + "In the IPv4 header field, this field is known as the Total + Length. Total Length is the length of the datagram, measured + in octets, including internet header and data. + + In the IPv6 header field, this field is known as the Payload + Length, which is the length of the IPv6 payload, i.e., the rest + of the packet following the IPv6 header, in octets."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + leaf ttl { + type uint8; + description + "This field indicates the maximum time the datagram is allowed + to remain in the internet system. If this field contains the + value zero, then the datagram must be dropped. + + In IPv6, this field is known as the Hop Limit."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + leaf protocol { + type uint8; + description + "Internet Protocol number. Refers to the protocol of the + payload. In IPv6, this field is known as 'next-header', + and if extension headers are present, the protocol is + present in the 'upper-layer' header."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + } + + grouping acl-ipv4-header-fields { + description + "Fields in the IPv4 header."; + leaf ihl { + type uint8 { + range "5..60"; + } + description + "In an IPv4 header field, the Internet Header Length (IHL) is + the length of the internet header in 32-bit words and + thus points to the beginning of the data. Note that the + minimum value for a correct header is 5."; + } + leaf flags { + type bits { + bit reserved { + position 0; + description + "Reserved. Must be zero."; + } + bit fragment { + position 1; + description + "Setting the value to 0 indicates may fragment, while + setting the value to 1 indicates do not fragment."; + } + bit more { + position 2; + description + "Setting the value to 0 indicates this is the last fragment, + and setting the value to 1 indicates more fragments are + coming."; + } + } + description + "Bit definitions for the Flags field in the IPv4 header."; + } + leaf offset { + type uint16 { + range "20..65535"; + } + description + "The fragment offset is measured in units of 8 octets (64 bits). + The first fragment has offset zero. The length is 13 bits"; + } + leaf identification { + type uint16; + description + "An identifying value assigned by the sender to aid in + assembling the fragments of a datagram."; + } + + choice destination-network { + case destination-ipv4-network { + leaf destination-ipv4-network { + type inet:ipv4-prefix; + description + "Destination IPv4 address prefix."; + } + } + description + "Choice of specifying a destination IPv4 address or + referring to a group of IPv4 destination addresses."; + } + + choice source-network { + case source-ipv4-network { + leaf source-ipv4-network { + type inet:ipv4-prefix; + description + "Source IPv4 address prefix."; + } + } + description + "Choice of specifying a source IPv4 address or + referring to a group of IPv4 source addresses."; + } + } + + grouping acl-ipv6-header-fields { + description + "Fields in the IPv6 header."; + + choice destination-network { + case destination-ipv6-network { + leaf destination-ipv6-network { + type inet:ipv6-prefix; + description + "Destination IPv6 address prefix."; + } + } + description + "Choice of specifying a destination IPv6 address + or referring to a group of IPv6 destination + addresses."; + } + + choice source-network { + case source-ipv6-network { + leaf source-ipv6-network { + type inet:ipv6-prefix; + description + "Source IPv6 address prefix."; + } + } + description + "Choice of specifying a source IPv6 address or + referring to a group of IPv6 source addresses."; + } + + leaf flow-label { + type inet:ipv6-flow-label; + description + "IPv6 Flow label."; + } + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation."; + } + + grouping acl-eth-header-fields { + description + "Fields in the Ethernet header."; + leaf destination-mac-address { + type yang:mac-address; + description + "Destination IEEE 802 Media Access Control (MAC) + address."; + } + leaf destination-mac-address-mask { + type yang:mac-address; + description + "Destination IEEE 802 MAC address mask."; + } + leaf source-mac-address { + type yang:mac-address; + description + "Source IEEE 802 MAC address."; + } + leaf source-mac-address-mask { + type yang:mac-address; + description + "Source IEEE 802 MAC address mask."; + } + leaf ethertype { + type eth:ethertype; + description + "The Ethernet Type (or Length) value represented + in the canonical order defined by IEEE 802. + The canonical representation uses lowercase + characters."; + reference + "IEEE 802-2014, Clause 9.2."; + } + reference + "IEEE 802: IEEE Standard for Local and Metropolitan + Area Networks: Overview and Architecture."; + } + + grouping acl-tcp-header-fields { + description + "Collection of TCP header fields that can be used to + set up a match filter."; + leaf sequence-number { + type uint32; + description + "Sequence number that appears in the packet."; + } + leaf acknowledgement-number { + type uint32; + description + "The acknowledgement number that appears in the + packet."; + } + leaf data-offset { + type uint8 { + range "5..15"; + } + description + "Specifies the size of the TCP header in 32-bit + words. The minimum size header is 5 words and + the maximum is 15 words; thus, this gives a + minimum size of 20 bytes and a maximum of 60 + bytes, allowing for up to 40 bytes of options + in the header."; + } + leaf reserved { + type uint8; + description + "Reserved for future use."; + } + leaf flags { + type bits { + bit cwr { + position 1; + description + "The Congestion Window Reduced (CWR) flag is set + by the sending host to indicate that it received + a TCP segment with the ECN-Echo (ECE) flag set + and had responded in the congestion control + mechanism."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + bit ece { + position 2; + description + "ECN-Echo has a dual role, depending on the value + of the SYN flag. It indicates the following: if + the SYN flag is set (1), the TCP peer is ECN + capable, and if the SYN flag is clear (0), a packet + with the Congestion Experienced flag set (ECN=11) + in the IP header was received during normal + transmission (added to the header by RFC 3168). + This serves as an indication of network congestion + (or impending congestion) to the TCP sender."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + bit urg { + position 3; + description + "Indicates that the Urgent Pointer field is significant."; + } + bit ack { + position 4; + description + "Indicates that the Acknowledgement field is significant. + All packets after the initial SYN packet sent by the + client should have this flag set."; + } + bit psh { + position 5; + description + "Push function. Asks to push the buffered data to the + receiving application."; + } + bit rst { + position 6; + description + "Reset the connection."; + } + bit syn { + position 7; + description + "Synchronize sequence numbers. Only the first packet + sent from each end should have this flag set. Some + other flags and fields change meaning based on this + flag, and some are only valid for when it is set, + and others when it is clear."; + } + bit fin { + position 8; + description + "Last package from the sender."; + } + } + description + "Also known as Control Bits. Contains nine 1-bit flags."; + reference + "RFC 793: Transmission Control Protocol."; + } + leaf window-size { + type uint16; + units "bytes"; + description + "The size of the receive window, which specifies + the number of window size units beyond the segment + identified by the sequence number in the Acknowledgement + field that the sender of this segment is currently + willing to receive."; + } + leaf urgent-pointer { + type uint16; + description + "This field is an offset from the sequence number + indicating the last urgent data byte."; + } + leaf options { + type binary { + length "1..40"; + } + description + "The length of this field is determined by the + Data Offset field. Options have up to three + fields: Option-Kind (1 byte), Option-Length + (1 byte), and Option-Data (variable). The Option-Kind + field indicates the type of option and is the + only field that is not optional. Depending on + what kind of option we are dealing with, + the next two fields may be set: the Option-Length + field indicates the total length of the option, + and the Option-Data field contains the value of + the option, if applicable."; + } + } + + grouping acl-udp-header-fields { + description + "Collection of UDP header fields that can be used + to set up a match filter."; + leaf length { + type uint16; + description + "A field that specifies the length in bytes of + the UDP header and UDP data. The minimum + length is 8 bytes because that is the length of + the header. The field size sets a theoretical + limit of 65,535 bytes (8-byte header plus 65,527 + bytes of data) for a UDP datagram. However, the + actual limit for the data length, which is + imposed by the underlying IPv4 protocol, is + 65,507 bytes (65,535 minus 8-byte UDP header + minus 20-byte IP header). + + In IPv6 jumbograms, it is possible to have + UDP packets of a size greater than 65,535 bytes. + RFC 2675 specifies that the Length field is set + to zero if the length of the UDP header plus + UDP data is greater than 65,535."; + } + } + + grouping acl-icmp-header-fields { + description + "Collection of ICMP header fields that can be + used to set up a match filter."; + leaf type { + type uint8; + description + "Also known as control messages."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + leaf code { + type uint8; + description + "ICMP subtype. Also known as control messages."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + leaf rest-of-header { + type binary; + description + "Unbounded in length, the contents vary based on the + ICMP type and code. Also referred to as 'Message Body' + in ICMPv6."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + } +} diff --git a/models/ietf/RFC/ietf-packet-fields@2019-03-04.yang b/models/ietf/RFC/ietf-packet-fields@2019-03-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..2fb797bd87bf4ed825f83ec788df707b94c5f68b --- /dev/null +++ b/models/ietf/RFC/ietf-packet-fields@2019-03-04.yang @@ -0,0 +1,576 @@ +module ietf-packet-fields { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields"; + prefix packet-fields; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991 - Common YANG Data Types."; + } + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991 - Common YANG Data Types."; + } + + import ietf-ethertypes { + prefix eth; + reference + "RFC 8519 - YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group."; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: netmod@ietf.org + + Editor: Mahesh Jethanandani + mjethanandani@gmail.com + Editor: Lisa Huang + huangyi_99@yahoo.com + Editor: Sonal Agarwal + sagarwal12@gmail.com + Editor: Dana Blair + dana@blairhome.com"; + + description + "This YANG module defines groupings that are used by + the ietf-access-control-list YANG module. Their usage + is not limited to ietf-access-control-list and can be + used anywhere as applicable. + + Copyright (c) 2019 IETF Trust and the persons identified as + the document authors. 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 Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8519; see + the RFC itself for full legal notices."; + + revision 2019-03-04 { + description + "Initial version."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + /* + * Typedefs + */ + typedef operator { + type enumeration { + enum lte { + description + "Less than or equal to."; + } + enum gte { + description + "Greater than or equal to."; + } + enum eq { + description + "Equal to."; + } + enum neq { + description + "Not equal to."; + } + } + description + "The source and destination port range definitions + can be further qualified using an operator. An + operator is needed only if the lower-port is specified + and the upper-port is not specified. The operator + therefore further qualifies the lower-port only."; + } + + /* + * Groupings + */ + grouping port-range-or-operator { + choice port-range-or-operator { + case range { + leaf lower-port { + type inet:port-number; + must '. <= ../upper-port' { + error-message + "The lower-port must be less than or equal to + the upper-port."; + } + mandatory true; + description + "Lower boundary for a port."; + } + leaf upper-port { + type inet:port-number; + mandatory true; + description + "Upper boundary for a port."; + } + } + case operator { + leaf operator { + type operator; + default "eq"; + description + "Operator to be applied on the port below."; + } + leaf port { + type inet:port-number; + mandatory true; + description + "Port number along with the operator on which to + match."; + } + } + description + "Choice of specifying a port range or a single + port along with an operator."; + } + description + "Grouping for port definitions in the form of a + choice statement."; + } + + grouping acl-ip-header-fields { + description + "IP header fields common to IPv4 and IPv6"; + reference + "RFC 791: Internet Protocol."; + + leaf dscp { + type inet:dscp; + description + "Differentiated Services Code Point."; + reference + "RFC 2474: Definition of the Differentiated Services + Field (DS Field) in the IPv4 and IPv6 + Headers."; + } + + leaf ecn { + type uint8 { + range "0..3"; + } + description + "Explicit Congestion Notification."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + + leaf length { + type uint16; + description + "In the IPv4 header field, this field is known as the Total + Length. Total Length is the length of the datagram, measured + in octets, including internet header and data. + + In the IPv6 header field, this field is known as the Payload + Length, which is the length of the IPv6 payload, i.e., the rest + of the packet following the IPv6 header, in octets."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + leaf ttl { + type uint8; + description + "This field indicates the maximum time the datagram is allowed + to remain in the internet system. If this field contains the + value zero, then the datagram must be dropped. + + In IPv6, this field is known as the Hop Limit."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + leaf protocol { + type uint8; + description + "Internet Protocol number. Refers to the protocol of the + payload. In IPv6, this field is known as 'next-header', + and if extension headers are present, the protocol is + present in the 'upper-layer' header."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + } + + grouping acl-ipv4-header-fields { + description + "Fields in the IPv4 header."; + leaf ihl { + type uint8 { + range "5..60"; + } + description + "In an IPv4 header field, the Internet Header Length (IHL) is + the length of the internet header in 32-bit words and + thus points to the beginning of the data. Note that the + minimum value for a correct header is 5."; + } + leaf flags { + type bits { + bit reserved { + position 0; + description + "Reserved. Must be zero."; + } + bit fragment { + position 1; + description + "Setting the value to 0 indicates may fragment, while + setting the value to 1 indicates do not fragment."; + } + bit more { + position 2; + description + "Setting the value to 0 indicates this is the last fragment, + and setting the value to 1 indicates more fragments are + coming."; + } + } + description + "Bit definitions for the Flags field in the IPv4 header."; + } + leaf offset { + type uint16 { + range "20..65535"; + } + description + "The fragment offset is measured in units of 8 octets (64 bits). + The first fragment has offset zero. The length is 13 bits"; + } + leaf identification { + type uint16; + description + "An identifying value assigned by the sender to aid in + assembling the fragments of a datagram."; + } + + choice destination-network { + case destination-ipv4-network { + leaf destination-ipv4-network { + type inet:ipv4-prefix; + description + "Destination IPv4 address prefix."; + } + } + description + "Choice of specifying a destination IPv4 address or + referring to a group of IPv4 destination addresses."; + } + + choice source-network { + case source-ipv4-network { + leaf source-ipv4-network { + type inet:ipv4-prefix; + description + "Source IPv4 address prefix."; + } + } + description + "Choice of specifying a source IPv4 address or + referring to a group of IPv4 source addresses."; + } + } + + grouping acl-ipv6-header-fields { + description + "Fields in the IPv6 header."; + + choice destination-network { + case destination-ipv6-network { + leaf destination-ipv6-network { + type inet:ipv6-prefix; + description + "Destination IPv6 address prefix."; + } + } + description + "Choice of specifying a destination IPv6 address + or referring to a group of IPv6 destination + addresses."; + } + + choice source-network { + case source-ipv6-network { + leaf source-ipv6-network { + type inet:ipv6-prefix; + description + "Source IPv6 address prefix."; + } + } + description + "Choice of specifying a source IPv6 address or + referring to a group of IPv6 source addresses."; + } + + leaf flow-label { + type inet:ipv6-flow-label; + description + "IPv6 Flow label."; + } + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation."; + } + + grouping acl-eth-header-fields { + description + "Fields in the Ethernet header."; + leaf destination-mac-address { + type yang:mac-address; + description + "Destination IEEE 802 Media Access Control (MAC) + address."; + } + leaf destination-mac-address-mask { + type yang:mac-address; + description + "Destination IEEE 802 MAC address mask."; + } + leaf source-mac-address { + type yang:mac-address; + description + "Source IEEE 802 MAC address."; + } + leaf source-mac-address-mask { + type yang:mac-address; + description + "Source IEEE 802 MAC address mask."; + } + leaf ethertype { + type eth:ethertype; + description + "The Ethernet Type (or Length) value represented + in the canonical order defined by IEEE 802. + The canonical representation uses lowercase + characters."; + reference + "IEEE 802-2014, Clause 9.2."; + } + reference + "IEEE 802: IEEE Standard for Local and Metropolitan + Area Networks: Overview and Architecture."; + } + + grouping acl-tcp-header-fields { + description + "Collection of TCP header fields that can be used to + set up a match filter."; + leaf sequence-number { + type uint32; + description + "Sequence number that appears in the packet."; + } + leaf acknowledgement-number { + type uint32; + description + "The acknowledgement number that appears in the + packet."; + } + leaf data-offset { + type uint8 { + range "5..15"; + } + description + "Specifies the size of the TCP header in 32-bit + words. The minimum size header is 5 words and + the maximum is 15 words; thus, this gives a + minimum size of 20 bytes and a maximum of 60 + bytes, allowing for up to 40 bytes of options + in the header."; + } + leaf reserved { + type uint8; + description + "Reserved for future use."; + } + leaf flags { + type bits { + bit cwr { + position 1; + description + "The Congestion Window Reduced (CWR) flag is set + by the sending host to indicate that it received + a TCP segment with the ECN-Echo (ECE) flag set + and had responded in the congestion control + mechanism."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + bit ece { + position 2; + description + "ECN-Echo has a dual role, depending on the value + of the SYN flag. It indicates the following: if + the SYN flag is set (1), the TCP peer is ECN + capable, and if the SYN flag is clear (0), a packet + with the Congestion Experienced flag set (ECN=11) + in the IP header was received during normal + transmission (added to the header by RFC 3168). + This serves as an indication of network congestion + (or impending congestion) to the TCP sender."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + bit urg { + position 3; + description + "Indicates that the Urgent Pointer field is significant."; + } + bit ack { + position 4; + description + "Indicates that the Acknowledgement field is significant. + All packets after the initial SYN packet sent by the + client should have this flag set."; + } + bit psh { + position 5; + description + "Push function. Asks to push the buffered data to the + receiving application."; + } + bit rst { + position 6; + description + "Reset the connection."; + } + bit syn { + position 7; + description + "Synchronize sequence numbers. Only the first packet + sent from each end should have this flag set. Some + other flags and fields change meaning based on this + flag, and some are only valid for when it is set, + and others when it is clear."; + } + bit fin { + position 8; + description + "Last package from the sender."; + } + } + description + "Also known as Control Bits. Contains nine 1-bit flags."; + reference + "RFC 793: Transmission Control Protocol."; + } + leaf window-size { + type uint16; + units "bytes"; + description + "The size of the receive window, which specifies + the number of window size units beyond the segment + identified by the sequence number in the Acknowledgement + field that the sender of this segment is currently + willing to receive."; + } + leaf urgent-pointer { + type uint16; + description + "This field is an offset from the sequence number + indicating the last urgent data byte."; + } + leaf options { + type binary { + length "1..40"; + } + description + "The length of this field is determined by the + Data Offset field. Options have up to three + fields: Option-Kind (1 byte), Option-Length + (1 byte), and Option-Data (variable). The Option-Kind + field indicates the type of option and is the + only field that is not optional. Depending on + what kind of option we are dealing with, + the next two fields may be set: the Option-Length + field indicates the total length of the option, + and the Option-Data field contains the value of + the option, if applicable."; + } + } + + grouping acl-udp-header-fields { + description + "Collection of UDP header fields that can be used + to set up a match filter."; + leaf length { + type uint16; + description + "A field that specifies the length in bytes of + the UDP header and UDP data. The minimum + length is 8 bytes because that is the length of + the header. The field size sets a theoretical + limit of 65,535 bytes (8-byte header plus 65,527 + bytes of data) for a UDP datagram. However, the + actual limit for the data length, which is + imposed by the underlying IPv4 protocol, is + 65,507 bytes (65,535 minus 8-byte UDP header + minus 20-byte IP header). + + In IPv6 jumbograms, it is possible to have + UDP packets of a size greater than 65,535 bytes. + RFC 2675 specifies that the Length field is set + to zero if the length of the UDP header plus + UDP data is greater than 65,535."; + } + } + + grouping acl-icmp-header-fields { + description + "Collection of ICMP header fields that can be + used to set up a match filter."; + leaf type { + type uint8; + description + "Also known as control messages."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + leaf code { + type uint8; + description + "ICMP subtype. Also known as control messages."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + leaf rest-of-header { + type binary; + description + "Unbounded in length, the contents vary based on the + ICMP type and code. Also referred to as 'Message Body' + in ICMPv6."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + } +} diff --git a/models/ietf/RFC/ietf-ptp.yang b/models/ietf/RFC/ietf-ptp.yang new file mode 100644 index 0000000000000000000000000000000000000000..b9c952e7b3627caf9d3dc885cbd123fc3e62c04c --- /dev/null +++ b/models/ietf/RFC/ietf-ptp.yang @@ -0,0 +1,575 @@ +module ietf-ptp { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ptp"; + prefix ptp; + + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + organization + "IETF TICTOC Working Group"; + contact + "WG Web: https://datatracker.ietf.org/wg/tictoc/ + WG List: <mailto:tictoc@ietf.org> + Editor: Yuanlong Jiang + <mailto:jiangyuanlong@huawei.com> + Editor: Rodney Cummings + <mailto:rodney.cummings@ni.com>"; + description + "This YANG module defines a data model for the configuration + of IEEE Std 1588-2008 clocks, and also for retrieval of the state + data of IEEE Std 1588-2008 clocks."; + + revision 2019-05-07 { + description + "Initial version"; + reference + "RFC 8575: YANG Data Model for the Precision Time Protocol"; + } + + typedef delay-mechanism-enumeration { + type enumeration { + enum e2e { + value 1; + description + "The port uses the delay request-response mechanism."; + } + enum p2p { + value 2; + description + "The port uses the peer delay mechanism."; + } + enum disabled { + value 254; + description + "The port does not implement any delay mechanism."; + } + } + description + "The propagation-delay measuring option used by the + port. Values for this enumeration are specified + by the IEEE Std 1588 standard exclusively."; + reference + "IEEE Std 1588-2008: 8.2.5.4.4"; + } + + typedef port-state-enumeration { + type enumeration { + enum initializing { + value 1; + description + "The port is initializing its data sets, hardware, and + communication facilities."; + } + enum faulty { + value 2; + description + "The port is in the fault state."; + } + enum disabled { + value 3; + description + "The port is disabled and is not communicating PTP + messages (other than possibly PTP management + messages)."; + } + enum listening { + value 4; + description + "The port is listening for an Announce message."; + } + enum pre-master { + value 5; + description + "The port is in the pre-master state."; + } + enum master { + value 6; + description + "The port is behaving as a master port."; + } + enum passive { + value 7; + description + "The port is in the passive state."; + } + enum uncalibrated { + value 8; + description + "A master port has been selected, but the port is still + in the uncalibrated state."; + } + enum slave { + value 9; + description + "The port is synchronizing to the selected master port."; + } + } + description + "The current state of the protocol engine associated + with the port. Values for this enumeration are specified + by the IEEE Std 1588 standard exclusively."; + reference + "IEEE Std 1588-2008: 8.2.5.3.1, 9.2.5"; + } + + typedef time-interval-type { + type int64; + description + "Derived data type for time interval, represented in units of + nanoseconds and multiplied by 2^16"; + reference + "IEEE Std 1588-2008: 5.3.2"; + } + + typedef clock-identity-type { + type binary { + length "8"; + } + description + "Derived data type to identify a clock"; + reference + "IEEE Std 1588-2008: 5.3.4"; + } + + grouping clock-quality-grouping { + description + "Derived data type for quality of a clock, which contains + clockClass, clockAccuracy, and offsetScaledLogVariance."; + reference + "IEEE Std 1588-2008: 5.3.7"; + leaf clock-class { + type uint8; + default "248"; + description + "The clockClass denotes the traceability of the time + or frequency distributed by the clock."; + } + leaf clock-accuracy { + type uint8; + description + "The clockAccuracy indicates the expected accuracy + of the clock."; + } + leaf offset-scaled-log-variance { + type uint16; + description + "The offsetScaledLogVariance provides an estimate of + the variations of the clock from a linear timescale + when it is not synchronized to another clock + using the protocol."; + } + } + + container ptp { + description + "The PTP struct containing all attributes of PTP data set, + other optional PTP attributes can be augmented as well."; + list instance-list { + key "instance-number"; + description + "List of one or more PTP data sets in the device (see IEEE + Std 1588-2008 subclause 6.3). + Each PTP data set represents a distinct instance of + PTP implementation in the device (i.e., distinct + Ordinary Clock or Boundary Clock)."; + leaf instance-number { + type uint32; + description + "The instance number of the current PTP instance. + This instance number is used for management purposes + only. This instance number does not represent the PTP + domain number and is not used in PTP messages."; + } + container default-ds { + description + "The default data set of the clock (see IEEE Std + 1588-2008 subclause 8.2.1). This data set represents + the configuration/state required for operation + of Precision Time Protocol (PTP) state machines."; + reference + "IEEE Std 1588-2008: 8.2.1"; + leaf two-step-flag { + type boolean; + description + "When set to true, the clock is a two-step clock; + otherwise,the clock is a one-step clock."; + } + leaf clock-identity { + type clock-identity-type; + config false; + description + "The clockIdentity of the local clock."; + } + leaf number-ports { + type uint16; + description + "The number of PTP ports on the instance."; + } + container clock-quality { + description + "The clockQuality of the local clock."; + uses clock-quality-grouping; + } + leaf priority1 { + type uint8; + description + "The priority1 attribute of the local clock."; + } + leaf priority2 { + type uint8; + description + "The priority2 attribute of the local clock."; + } + leaf domain-number { + type uint8; + description + "The domain number of the current syntonization + domain."; + } + leaf slave-only { + type boolean; + description + "When set to true, the clock is a slave-only clock."; + } + } + container current-ds { + description + "The current data set of the clock (see IEEE Std + 1588-2008 subclause 8.2.2). This data set represents + local states learned from the exchange of + Precision Time Protocol (PTP) messages."; + reference + "IEEE Std 1588-2008: 8.2.2"; + leaf steps-removed { + type uint16; + default "0"; + description + "The number of communication paths traversed + between the local clock and the grandmaster clock."; + } + leaf offset-from-master { + type time-interval-type; + description + "The current value of the time difference between + a master and a slave clock as computed by the slave."; + } + leaf mean-path-delay { + type time-interval-type; + description + "The current value of the mean propagation time between + a master and a slave clock as computed by the slave."; + } + } + container parent-ds { + description + "The parent data set of the clock (see IEEE Std 1588-2008 + subclause 8.2.3)."; + reference + "IEEE Std 1588-2008: 8.2.3"; + container parent-port-identity { + description + "The portIdentity of the port on the master, it + contains two members: clockIdentity and portNumber."; + reference + "IEEE Std 1588-2008: 5.3.5"; + leaf clock-identity { + type clock-identity-type; + + description + "Identity of the clock."; + } + leaf port-number { + type uint16; + description + "Port number."; + } + } + leaf parent-stats { + type boolean; + default "false"; + description + "When set to true, the values of + observedParentOffsetScaledLogVariance and + observedParentClockPhaseChangeRate of parentDS + have been measured and are valid."; + } + leaf observed-parent-offset-scaled-log-variance { + type uint16; + default "65535"; + description + "An estimate of the parent clock's PTP variance + as observed by the slave clock."; + } + leaf observed-parent-clock-phase-change-rate { + type int32; + description + "An estimate of the parent clock's phase change rate + as observed by the slave clock."; + } + leaf grandmaster-identity { + type clock-identity-type; + description + "The clockIdentity attribute of the grandmaster clock."; + } + container grandmaster-clock-quality { + description + "The clockQuality of the grandmaster clock."; + uses clock-quality-grouping; + } + leaf grandmaster-priority1 { + type uint8; + description + "The priority1 attribute of the grandmaster clock."; + } + leaf grandmaster-priority2 { + type uint8; + description + "The priority2 attribute of the grandmaster clock."; + } + } + container time-properties-ds { + description + "The timeProperties data set of the clock (see + IEEE Std 1588-2008 subclause 8.2.4)."; + reference + "IEEE Std 1588-2008: 8.2.4"; + leaf current-utc-offset-valid { + type boolean; + description + "When set to true, the current UTC offset is valid."; + } + leaf current-utc-offset { + when "../current-utc-offset-valid='true'"; + type int16; + description + "The offset between TAI and UTC when the epoch of the + PTP system is the PTP epoch in units of seconds, i.e., + when ptp-timescale is TRUE; otherwise, the value has + no meaning."; + } + leaf leap59 { + type boolean; + description + "When set to true, the last minute of the current UTC + day contains 59 seconds."; + } + leaf leap61 { + type boolean; + description + "When set to true, the last minute of the current UTC + day contains 61 seconds."; + } + leaf time-traceable { + type boolean; + description + "When set to true, the timescale and the + currentUtcOffset are traceable to a primary + reference."; + } + leaf frequency-traceable { + type boolean; + description + "When set to true, the frequency determining the + timescale is traceable to a primary reference."; + } + leaf ptp-timescale { + type boolean; + description + "When set to true, the clock timescale of the + grandmaster clock is PTP; otherwise, the timescale is + ARB (arbitrary)."; + } + leaf time-source { + type uint8; + description + "The source of time used by the grandmaster clock."; + } + } + list port-ds-list { + key "port-number"; + description + "List of port data sets of the clock (see IEEE Std + 1588-2008 subclause 8.2.5)."; + reference + "IEEE Std 1588-2008: 8.2.5"; + leaf port-number { + type uint16; + description + "Port number. + The data sets (i.e., information model) of IEEE Std + 1588-2008 specify a member portDS.portIdentity, which + uses a typed struct with members clockIdentity and + portNumber. + + In this YANG data model, portIdentity is not modeled + in the port-ds-list. However, its members are provided + as follows: + portIdentity.portNumber is provided as this + port-number leaf in port-ds-list, and + portIdentity.clockIdentity is provided as the + clock-identity leaf in default-ds of the instance + (i.e., ../../default-ds/clock-identity)."; + } + leaf port-state { + type port-state-enumeration; + default "initializing"; + description + "Current state associated with the port."; + } + leaf underlying-interface { + type if:interface-ref; + + description + "Reference to the configured underlying interface that + is used by this PTP port (see RFC 8343)."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + leaf log-min-delay-req-interval { + type int8; + description + "The base-2 logarithm of the minDelayReqInterval + (the minimum permitted mean time interval between + successive Delay_Req messages)."; + } + leaf peer-mean-path-delay { + type time-interval-type; + default "0"; + description + "An estimate of the current one-way propagation delay + on the link when the delayMechanism is P2P; otherwise, + it is zero."; + } + leaf log-announce-interval { + type int8; + description + "The base-2 logarithm of the mean + announceInterval (mean time interval between + successive Announce messages)."; + } + leaf announce-receipt-timeout { + type uint8; + description + "The number of announceIntervals that have to pass + without receipt of an Announce message before the + occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_ + EXPIRES."; + } + leaf log-sync-interval { + type int8; + description + "The base-2 logarithm of the mean SyncInterval + for multicast messages. The rates for unicast + transmissions are negotiated separately on a per-port + basis and are not constrained by this attribute."; + } + leaf delay-mechanism { + type delay-mechanism-enumeration; + + description + "The propagation delay measuring option used by the + port in computing meanPathDelay."; + } + leaf log-min-pdelay-req-interval { + type int8; + description + "The base-2 logarithm of the + minPdelayReqInterval (minimum permitted mean time + interval between successive Pdelay_Req messages)."; + } + leaf version-number { + type uint8; + description + "The PTP version in use on the port."; + } + } + } + container transparent-clock-default-ds { + description + "The members of the transparentClockDefault data set (see + IEEE Std 1588-2008 subclause 8.3.2)."; + reference + "IEEE Std 1588-2008: 8.3.2"; + leaf clock-identity { + type clock-identity-type; + config false; + description + "The clockIdentity of the transparent clock."; + } + leaf number-ports { + type uint16; + description + "The number of PTP ports on the transparent clock."; + } + leaf delay-mechanism { + type delay-mechanism-enumeration; + description + "The propagation delay measuring option + used by the transparent clock."; + } + leaf primary-domain { + type uint8; + default "0"; + description + "The domainNumber of the primary syntonization domain (see + IEEE Std 1588-2008 subclause 10.1)."; + + reference + "IEEE Std 1588-2008: 10.1"; + } + } + list transparent-clock-port-ds-list { + key "port-number"; + description + "List of transparentClockPort data sets of the transparent + clock (see IEEE Std 1588-2008 subclause 8.3.3)."; + reference + "IEEE Std 1588-2008: 8.3.3"; + leaf port-number { + type uint16; + description + "Port number. + The data sets (i.e., information model) of IEEE Std + 1588-2008 specify a member + transparentClockPortDS.portIdentity, which uses a typed + struct with members clockIdentity and portNumber. + + In this YANG data model, portIdentity is not modeled in + the transparent-clock-port-ds-list. However, its + members are provided as follows: + portIdentity.portNumber is provided as this leaf member + in transparent-clock-port-ds-list and + portIdentity.clockIdentity is provided as the + clock-identity leaf in transparent-clock-default-ds + (i.e., ../../transparent-clock-default-ds/clock- + identity)."; + } + leaf log-min-pdelay-req-interval { + type int8; + description + "The logarithm to the base 2 of the + minPdelayReqInterval (minimum permitted mean time + interval between successive Pdelay_Req messages)."; + } + leaf faulty-flag { + type boolean; + default "false"; + description + "When set to true, the port is faulty."; + } + leaf peer-mean-path-delay { + type time-interval-type; + default "0"; + + description + "An estimate of the current one-way propagation delay + on the link when the delayMechanism is P2P; otherwise, + it is zero."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-ptp@2019-05-07.yang b/models/ietf/RFC/ietf-ptp@2019-05-07.yang new file mode 100644 index 0000000000000000000000000000000000000000..b9c952e7b3627caf9d3dc885cbd123fc3e62c04c --- /dev/null +++ b/models/ietf/RFC/ietf-ptp@2019-05-07.yang @@ -0,0 +1,575 @@ +module ietf-ptp { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ptp"; + prefix ptp; + + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + organization + "IETF TICTOC Working Group"; + contact + "WG Web: https://datatracker.ietf.org/wg/tictoc/ + WG List: <mailto:tictoc@ietf.org> + Editor: Yuanlong Jiang + <mailto:jiangyuanlong@huawei.com> + Editor: Rodney Cummings + <mailto:rodney.cummings@ni.com>"; + description + "This YANG module defines a data model for the configuration + of IEEE Std 1588-2008 clocks, and also for retrieval of the state + data of IEEE Std 1588-2008 clocks."; + + revision 2019-05-07 { + description + "Initial version"; + reference + "RFC 8575: YANG Data Model for the Precision Time Protocol"; + } + + typedef delay-mechanism-enumeration { + type enumeration { + enum e2e { + value 1; + description + "The port uses the delay request-response mechanism."; + } + enum p2p { + value 2; + description + "The port uses the peer delay mechanism."; + } + enum disabled { + value 254; + description + "The port does not implement any delay mechanism."; + } + } + description + "The propagation-delay measuring option used by the + port. Values for this enumeration are specified + by the IEEE Std 1588 standard exclusively."; + reference + "IEEE Std 1588-2008: 8.2.5.4.4"; + } + + typedef port-state-enumeration { + type enumeration { + enum initializing { + value 1; + description + "The port is initializing its data sets, hardware, and + communication facilities."; + } + enum faulty { + value 2; + description + "The port is in the fault state."; + } + enum disabled { + value 3; + description + "The port is disabled and is not communicating PTP + messages (other than possibly PTP management + messages)."; + } + enum listening { + value 4; + description + "The port is listening for an Announce message."; + } + enum pre-master { + value 5; + description + "The port is in the pre-master state."; + } + enum master { + value 6; + description + "The port is behaving as a master port."; + } + enum passive { + value 7; + description + "The port is in the passive state."; + } + enum uncalibrated { + value 8; + description + "A master port has been selected, but the port is still + in the uncalibrated state."; + } + enum slave { + value 9; + description + "The port is synchronizing to the selected master port."; + } + } + description + "The current state of the protocol engine associated + with the port. Values for this enumeration are specified + by the IEEE Std 1588 standard exclusively."; + reference + "IEEE Std 1588-2008: 8.2.5.3.1, 9.2.5"; + } + + typedef time-interval-type { + type int64; + description + "Derived data type for time interval, represented in units of + nanoseconds and multiplied by 2^16"; + reference + "IEEE Std 1588-2008: 5.3.2"; + } + + typedef clock-identity-type { + type binary { + length "8"; + } + description + "Derived data type to identify a clock"; + reference + "IEEE Std 1588-2008: 5.3.4"; + } + + grouping clock-quality-grouping { + description + "Derived data type for quality of a clock, which contains + clockClass, clockAccuracy, and offsetScaledLogVariance."; + reference + "IEEE Std 1588-2008: 5.3.7"; + leaf clock-class { + type uint8; + default "248"; + description + "The clockClass denotes the traceability of the time + or frequency distributed by the clock."; + } + leaf clock-accuracy { + type uint8; + description + "The clockAccuracy indicates the expected accuracy + of the clock."; + } + leaf offset-scaled-log-variance { + type uint16; + description + "The offsetScaledLogVariance provides an estimate of + the variations of the clock from a linear timescale + when it is not synchronized to another clock + using the protocol."; + } + } + + container ptp { + description + "The PTP struct containing all attributes of PTP data set, + other optional PTP attributes can be augmented as well."; + list instance-list { + key "instance-number"; + description + "List of one or more PTP data sets in the device (see IEEE + Std 1588-2008 subclause 6.3). + Each PTP data set represents a distinct instance of + PTP implementation in the device (i.e., distinct + Ordinary Clock or Boundary Clock)."; + leaf instance-number { + type uint32; + description + "The instance number of the current PTP instance. + This instance number is used for management purposes + only. This instance number does not represent the PTP + domain number and is not used in PTP messages."; + } + container default-ds { + description + "The default data set of the clock (see IEEE Std + 1588-2008 subclause 8.2.1). This data set represents + the configuration/state required for operation + of Precision Time Protocol (PTP) state machines."; + reference + "IEEE Std 1588-2008: 8.2.1"; + leaf two-step-flag { + type boolean; + description + "When set to true, the clock is a two-step clock; + otherwise,the clock is a one-step clock."; + } + leaf clock-identity { + type clock-identity-type; + config false; + description + "The clockIdentity of the local clock."; + } + leaf number-ports { + type uint16; + description + "The number of PTP ports on the instance."; + } + container clock-quality { + description + "The clockQuality of the local clock."; + uses clock-quality-grouping; + } + leaf priority1 { + type uint8; + description + "The priority1 attribute of the local clock."; + } + leaf priority2 { + type uint8; + description + "The priority2 attribute of the local clock."; + } + leaf domain-number { + type uint8; + description + "The domain number of the current syntonization + domain."; + } + leaf slave-only { + type boolean; + description + "When set to true, the clock is a slave-only clock."; + } + } + container current-ds { + description + "The current data set of the clock (see IEEE Std + 1588-2008 subclause 8.2.2). This data set represents + local states learned from the exchange of + Precision Time Protocol (PTP) messages."; + reference + "IEEE Std 1588-2008: 8.2.2"; + leaf steps-removed { + type uint16; + default "0"; + description + "The number of communication paths traversed + between the local clock and the grandmaster clock."; + } + leaf offset-from-master { + type time-interval-type; + description + "The current value of the time difference between + a master and a slave clock as computed by the slave."; + } + leaf mean-path-delay { + type time-interval-type; + description + "The current value of the mean propagation time between + a master and a slave clock as computed by the slave."; + } + } + container parent-ds { + description + "The parent data set of the clock (see IEEE Std 1588-2008 + subclause 8.2.3)."; + reference + "IEEE Std 1588-2008: 8.2.3"; + container parent-port-identity { + description + "The portIdentity of the port on the master, it + contains two members: clockIdentity and portNumber."; + reference + "IEEE Std 1588-2008: 5.3.5"; + leaf clock-identity { + type clock-identity-type; + + description + "Identity of the clock."; + } + leaf port-number { + type uint16; + description + "Port number."; + } + } + leaf parent-stats { + type boolean; + default "false"; + description + "When set to true, the values of + observedParentOffsetScaledLogVariance and + observedParentClockPhaseChangeRate of parentDS + have been measured and are valid."; + } + leaf observed-parent-offset-scaled-log-variance { + type uint16; + default "65535"; + description + "An estimate of the parent clock's PTP variance + as observed by the slave clock."; + } + leaf observed-parent-clock-phase-change-rate { + type int32; + description + "An estimate of the parent clock's phase change rate + as observed by the slave clock."; + } + leaf grandmaster-identity { + type clock-identity-type; + description + "The clockIdentity attribute of the grandmaster clock."; + } + container grandmaster-clock-quality { + description + "The clockQuality of the grandmaster clock."; + uses clock-quality-grouping; + } + leaf grandmaster-priority1 { + type uint8; + description + "The priority1 attribute of the grandmaster clock."; + } + leaf grandmaster-priority2 { + type uint8; + description + "The priority2 attribute of the grandmaster clock."; + } + } + container time-properties-ds { + description + "The timeProperties data set of the clock (see + IEEE Std 1588-2008 subclause 8.2.4)."; + reference + "IEEE Std 1588-2008: 8.2.4"; + leaf current-utc-offset-valid { + type boolean; + description + "When set to true, the current UTC offset is valid."; + } + leaf current-utc-offset { + when "../current-utc-offset-valid='true'"; + type int16; + description + "The offset between TAI and UTC when the epoch of the + PTP system is the PTP epoch in units of seconds, i.e., + when ptp-timescale is TRUE; otherwise, the value has + no meaning."; + } + leaf leap59 { + type boolean; + description + "When set to true, the last minute of the current UTC + day contains 59 seconds."; + } + leaf leap61 { + type boolean; + description + "When set to true, the last minute of the current UTC + day contains 61 seconds."; + } + leaf time-traceable { + type boolean; + description + "When set to true, the timescale and the + currentUtcOffset are traceable to a primary + reference."; + } + leaf frequency-traceable { + type boolean; + description + "When set to true, the frequency determining the + timescale is traceable to a primary reference."; + } + leaf ptp-timescale { + type boolean; + description + "When set to true, the clock timescale of the + grandmaster clock is PTP; otherwise, the timescale is + ARB (arbitrary)."; + } + leaf time-source { + type uint8; + description + "The source of time used by the grandmaster clock."; + } + } + list port-ds-list { + key "port-number"; + description + "List of port data sets of the clock (see IEEE Std + 1588-2008 subclause 8.2.5)."; + reference + "IEEE Std 1588-2008: 8.2.5"; + leaf port-number { + type uint16; + description + "Port number. + The data sets (i.e., information model) of IEEE Std + 1588-2008 specify a member portDS.portIdentity, which + uses a typed struct with members clockIdentity and + portNumber. + + In this YANG data model, portIdentity is not modeled + in the port-ds-list. However, its members are provided + as follows: + portIdentity.portNumber is provided as this + port-number leaf in port-ds-list, and + portIdentity.clockIdentity is provided as the + clock-identity leaf in default-ds of the instance + (i.e., ../../default-ds/clock-identity)."; + } + leaf port-state { + type port-state-enumeration; + default "initializing"; + description + "Current state associated with the port."; + } + leaf underlying-interface { + type if:interface-ref; + + description + "Reference to the configured underlying interface that + is used by this PTP port (see RFC 8343)."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + leaf log-min-delay-req-interval { + type int8; + description + "The base-2 logarithm of the minDelayReqInterval + (the minimum permitted mean time interval between + successive Delay_Req messages)."; + } + leaf peer-mean-path-delay { + type time-interval-type; + default "0"; + description + "An estimate of the current one-way propagation delay + on the link when the delayMechanism is P2P; otherwise, + it is zero."; + } + leaf log-announce-interval { + type int8; + description + "The base-2 logarithm of the mean + announceInterval (mean time interval between + successive Announce messages)."; + } + leaf announce-receipt-timeout { + type uint8; + description + "The number of announceIntervals that have to pass + without receipt of an Announce message before the + occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_ + EXPIRES."; + } + leaf log-sync-interval { + type int8; + description + "The base-2 logarithm of the mean SyncInterval + for multicast messages. The rates for unicast + transmissions are negotiated separately on a per-port + basis and are not constrained by this attribute."; + } + leaf delay-mechanism { + type delay-mechanism-enumeration; + + description + "The propagation delay measuring option used by the + port in computing meanPathDelay."; + } + leaf log-min-pdelay-req-interval { + type int8; + description + "The base-2 logarithm of the + minPdelayReqInterval (minimum permitted mean time + interval between successive Pdelay_Req messages)."; + } + leaf version-number { + type uint8; + description + "The PTP version in use on the port."; + } + } + } + container transparent-clock-default-ds { + description + "The members of the transparentClockDefault data set (see + IEEE Std 1588-2008 subclause 8.3.2)."; + reference + "IEEE Std 1588-2008: 8.3.2"; + leaf clock-identity { + type clock-identity-type; + config false; + description + "The clockIdentity of the transparent clock."; + } + leaf number-ports { + type uint16; + description + "The number of PTP ports on the transparent clock."; + } + leaf delay-mechanism { + type delay-mechanism-enumeration; + description + "The propagation delay measuring option + used by the transparent clock."; + } + leaf primary-domain { + type uint8; + default "0"; + description + "The domainNumber of the primary syntonization domain (see + IEEE Std 1588-2008 subclause 10.1)."; + + reference + "IEEE Std 1588-2008: 10.1"; + } + } + list transparent-clock-port-ds-list { + key "port-number"; + description + "List of transparentClockPort data sets of the transparent + clock (see IEEE Std 1588-2008 subclause 8.3.3)."; + reference + "IEEE Std 1588-2008: 8.3.3"; + leaf port-number { + type uint16; + description + "Port number. + The data sets (i.e., information model) of IEEE Std + 1588-2008 specify a member + transparentClockPortDS.portIdentity, which uses a typed + struct with members clockIdentity and portNumber. + + In this YANG data model, portIdentity is not modeled in + the transparent-clock-port-ds-list. However, its + members are provided as follows: + portIdentity.portNumber is provided as this leaf member + in transparent-clock-port-ds-list and + portIdentity.clockIdentity is provided as the + clock-identity leaf in transparent-clock-default-ds + (i.e., ../../transparent-clock-default-ds/clock- + identity)."; + } + leaf log-min-pdelay-req-interval { + type int8; + description + "The logarithm to the base 2 of the + minPdelayReqInterval (minimum permitted mean time + interval between successive Pdelay_Req messages)."; + } + leaf faulty-flag { + type boolean; + default "false"; + description + "When set to true, the port is faulty."; + } + leaf peer-mean-path-delay { + type time-interval-type; + default "0"; + + description + "An estimate of the current one-way propagation delay + on the link when the delayMechanism is P2P; otherwise, + it is zero."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-restconf-monitoring.yang b/models/ietf/RFC/ietf-restconf-monitoring.yang new file mode 100644 index 0000000000000000000000000000000000000000..e87b00baf55ddd89613426d6890433763ca7a114 --- /dev/null +++ b/models/ietf/RFC/ietf-restconf-monitoring.yang @@ -0,0 +1,150 @@ +module ietf-restconf-monitoring { + namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"; + prefix "rcmon"; + + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net>"; + + description + "This module contains monitoring information for the + RESTCONF protocol. + + Copyright (c) 2017 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8040; see + the RFC itself for full legal notices."; + + revision 2017-01-26 { + description + "Initial revision."; + reference + "RFC 8040: RESTCONF Protocol."; + } + + container restconf-state { + config false; + description + "Contains RESTCONF protocol monitoring information."; + + container capabilities { + description + "Contains a list of protocol capability URIs."; + + leaf-list capability { + type inet:uri; + description + "A RESTCONF protocol capability URI."; + } + } + + container streams { + description + "Container representing the notification event streams + supported by the server."; + reference + "RFC 5277, Section 3.4, <streams> element."; + + list stream { + key name; + description + "Each entry describes an event stream supported by + the server."; + + leaf name { + type string; + description + "The stream name."; + reference + "RFC 5277, Section 3.4, <name> element."; + } + + leaf description { + type string; + description + "Description of stream content."; + reference + "RFC 5277, Section 3.4, <description> element."; + } + + leaf replay-support { + type boolean; + default false; + description + "Indicates if replay buffer is supported for this stream. + If 'true', then the server MUST support the 'start-time' + and 'stop-time' query parameters for this stream."; + reference + "RFC 5277, Section 3.4, <replaySupport> element."; + } + + leaf replay-log-creation-time { + when "../replay-support" { + description + "Only present if notification replay is supported."; + } + type yang:date-and-time; + description + "Indicates the time the replay log for this stream + was created."; + reference + "RFC 5277, Section 3.4, <replayLogCreationTime> + element."; + } + + list access { + key encoding; + min-elements 1; + description + "The server will create an entry in this list for each + encoding format that is supported for this stream. + The media type 'text/event-stream' is expected + for all event streams. This list identifies the + subtypes supported for this stream."; + + leaf encoding { + type string; + description + "This is the secondary encoding format within the + 'text/event-stream' encoding used by all streams. + The type 'xml' is supported for XML encoding. + The type 'json' is supported for JSON encoding."; + } + + leaf location { + type inet:uri; + mandatory true; + description + "Contains a URL that represents the entry point + for establishing notification delivery via + server-sent events."; + } + } + } + } + } + +} diff --git a/models/ietf/RFC/ietf-restconf-monitoring@2017-01-26.yang b/models/ietf/RFC/ietf-restconf-monitoring@2017-01-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..e87b00baf55ddd89613426d6890433763ca7a114 --- /dev/null +++ b/models/ietf/RFC/ietf-restconf-monitoring@2017-01-26.yang @@ -0,0 +1,150 @@ +module ietf-restconf-monitoring { + namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"; + prefix "rcmon"; + + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net>"; + + description + "This module contains monitoring information for the + RESTCONF protocol. + + Copyright (c) 2017 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8040; see + the RFC itself for full legal notices."; + + revision 2017-01-26 { + description + "Initial revision."; + reference + "RFC 8040: RESTCONF Protocol."; + } + + container restconf-state { + config false; + description + "Contains RESTCONF protocol monitoring information."; + + container capabilities { + description + "Contains a list of protocol capability URIs."; + + leaf-list capability { + type inet:uri; + description + "A RESTCONF protocol capability URI."; + } + } + + container streams { + description + "Container representing the notification event streams + supported by the server."; + reference + "RFC 5277, Section 3.4, <streams> element."; + + list stream { + key name; + description + "Each entry describes an event stream supported by + the server."; + + leaf name { + type string; + description + "The stream name."; + reference + "RFC 5277, Section 3.4, <name> element."; + } + + leaf description { + type string; + description + "Description of stream content."; + reference + "RFC 5277, Section 3.4, <description> element."; + } + + leaf replay-support { + type boolean; + default false; + description + "Indicates if replay buffer is supported for this stream. + If 'true', then the server MUST support the 'start-time' + and 'stop-time' query parameters for this stream."; + reference + "RFC 5277, Section 3.4, <replaySupport> element."; + } + + leaf replay-log-creation-time { + when "../replay-support" { + description + "Only present if notification replay is supported."; + } + type yang:date-and-time; + description + "Indicates the time the replay log for this stream + was created."; + reference + "RFC 5277, Section 3.4, <replayLogCreationTime> + element."; + } + + list access { + key encoding; + min-elements 1; + description + "The server will create an entry in this list for each + encoding format that is supported for this stream. + The media type 'text/event-stream' is expected + for all event streams. This list identifies the + subtypes supported for this stream."; + + leaf encoding { + type string; + description + "This is the secondary encoding format within the + 'text/event-stream' encoding used by all streams. + The type 'xml' is supported for XML encoding. + The type 'json' is supported for JSON encoding."; + } + + leaf location { + type inet:uri; + mandatory true; + description + "Contains a URL that represents the entry point + for establishing notification delivery via + server-sent events."; + } + } + } + } + } + +} diff --git a/models/ietf/RFC/ietf-restconf-subscribed-notifications.yang b/models/ietf/RFC/ietf-restconf-subscribed-notifications.yang new file mode 100644 index 0000000000000000000000000000000000000000..1efa6e44769df6cbf590b04116aa6894d8790c62 --- /dev/null +++ b/models/ietf/RFC/ietf-restconf-subscribed-notifications.yang @@ -0,0 +1,85 @@ +module ietf-restconf-subscribed-notifications { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:" + + "ietf-restconf-subscribed-notifications"; + prefix rsn; + + import ietf-subscribed-notifications { + prefix sn; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Editor: Eric Voit + <mailto:evoit@cisco.com> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Reshad Rahman + <mailto:rrahman@cisco.com>"; + description + "Defines RESTCONF as a supported transport for subscribed + event notifications. + + Copyright (c) 2019 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 Simplified 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 8650; see the + RFC itself for full legal notices."; + + revision 2019-11-17 { + description + "Initial version"; + reference + "RFC 8650: Dynamic Subscription to YANG Events and Datastores + over RESTCONF"; + } + + grouping uri { + description + "Provides a reusable description of a URI."; + leaf uri { + type inet:uri; + config false; + description + "Location of a subscription-specific URI on the publisher."; + } + } + + augment "/sn:establish-subscription/sn:output" { + description + "This augmentation allows RESTCONF-specific parameters for a + response to a publisher's subscription request."; + uses uri; + } + + augment "/sn:subscriptions/sn:subscription" { + description + "This augmentation allows RESTCONF-specific parameters to be + exposed for a subscription."; + uses uri; + } + + augment "/sn:subscription-modified" { + description + "This augmentation allows RESTCONF-specific parameters to be + included as part of the notification that a subscription has + been modified."; + uses uri; + } +} diff --git a/models/ietf/RFC/ietf-restconf-subscribed-notifications@2019-11-17.yang b/models/ietf/RFC/ietf-restconf-subscribed-notifications@2019-11-17.yang new file mode 100644 index 0000000000000000000000000000000000000000..1efa6e44769df6cbf590b04116aa6894d8790c62 --- /dev/null +++ b/models/ietf/RFC/ietf-restconf-subscribed-notifications@2019-11-17.yang @@ -0,0 +1,85 @@ +module ietf-restconf-subscribed-notifications { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:" + + "ietf-restconf-subscribed-notifications"; + prefix rsn; + + import ietf-subscribed-notifications { + prefix sn; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Editor: Eric Voit + <mailto:evoit@cisco.com> + + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + + Editor: Reshad Rahman + <mailto:rrahman@cisco.com>"; + description + "Defines RESTCONF as a supported transport for subscribed + event notifications. + + Copyright (c) 2019 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 Simplified 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 8650; see the + RFC itself for full legal notices."; + + revision 2019-11-17 { + description + "Initial version"; + reference + "RFC 8650: Dynamic Subscription to YANG Events and Datastores + over RESTCONF"; + } + + grouping uri { + description + "Provides a reusable description of a URI."; + leaf uri { + type inet:uri; + config false; + description + "Location of a subscription-specific URI on the publisher."; + } + } + + augment "/sn:establish-subscription/sn:output" { + description + "This augmentation allows RESTCONF-specific parameters for a + response to a publisher's subscription request."; + uses uri; + } + + augment "/sn:subscriptions/sn:subscription" { + description + "This augmentation allows RESTCONF-specific parameters to be + exposed for a subscription."; + uses uri; + } + + augment "/sn:subscription-modified" { + description + "This augmentation allows RESTCONF-specific parameters to be + included as part of the notification that a subscription has + been modified."; + uses uri; + } +} diff --git a/models/ietf/RFC/ietf-restconf.yang b/models/ietf/RFC/ietf-restconf.yang new file mode 100644 index 0000000000000000000000000000000000000000..b47455b81644ddf810e7e3241cf69cb4d2f975b3 --- /dev/null +++ b/models/ietf/RFC/ietf-restconf.yang @@ -0,0 +1,278 @@ +module ietf-restconf { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-restconf"; + prefix "rc"; + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net>"; + + description + "This module contains conceptual YANG specifications + for basic RESTCONF media type definitions used in + RESTCONF protocol messages. + + Note that the YANG definitions within this module do not + represent configuration data of any kind. + The 'restconf-media-type' YANG extension statement + provides a normative syntax for XML and JSON + message-encoding purposes. + + Copyright (c) 2017 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8040; see + the RFC itself for full legal notices."; + + revision 2017-01-26 { + description + "Initial revision."; + reference + "RFC 8040: RESTCONF Protocol."; + } + + extension yang-data { + argument name { + yin-element true; + } + description + "This extension is used to specify a YANG data template that + represents conceptual data defined in YANG. It is + intended to describe hierarchical data independent of + protocol context or specific message-encoding format. + Data definition statements within a yang-data extension + specify the generic syntax for the specific YANG data + template, whose name is the argument of the 'yang-data' + extension statement. + + Note that this extension does not define a media type. + A specification using this extension MUST specify the + message-encoding rules, including the content media type. + + The mandatory 'name' parameter value identifies the YANG + data template that is being defined. It contains the + template name. + + This extension is ignored unless it appears as a top-level + statement. It MUST contain data definition statements + that result in exactly one container data node definition. + An instance of a YANG data template can thus be translated + into an XML instance document, whose top-level element + corresponds to the top-level container. + The module name and namespace values for the YANG module using + the extension statement are assigned to instance document data + conforming to the data definition statements within + this extension. + + The substatements of this extension MUST follow the + 'data-def-stmt' rule in the YANG ABNF. + + The XPath document root is the extension statement itself, + such that the child nodes of the document root are + represented by the data-def-stmt substatements within + this extension. This conceptual document is the context + for the following YANG statements: + + - must-stmt + - when-stmt + - path-stmt + - min-elements-stmt + - max-elements-stmt + - mandatory-stmt + - unique-stmt + - ordered-by + - instance-identifier data type + + The following data-def-stmt substatements are constrained + when used within a 'yang-data' extension statement. + + - The list-stmt is not required to have a key-stmt defined. + - The if-feature-stmt is ignored if present. + - The config-stmt is ignored if present. + - The available identity values for any 'identityref' + leaf or leaf-list nodes are limited to the module + containing this extension statement and the modules + imported into that module. + "; + } + + rc:yang-data yang-errors { + uses errors; + } + + rc:yang-data yang-api { + uses restconf; + } + + grouping errors { + description + "A grouping that contains a YANG container + representing the syntax and semantics of a + YANG Patch error report within a response message."; + + container errors { + description + "Represents an error report returned by the server if + a request results in an error."; + + list error { + description + "An entry containing information about one + specific error that occurred while processing + a RESTCONF request."; + reference + "RFC 6241, Section 4.3."; + + leaf error-type { + type enumeration { + enum transport { + description + "The transport layer."; + } + enum rpc { + description + "The rpc or notification layer."; + } + enum protocol { + description + "The protocol operation layer."; + } + enum application { + description + "The server application layer."; + } + } + mandatory true; + description + "The protocol layer where the error occurred."; + } + + leaf error-tag { + type string; + mandatory true; + description + "The enumerated error-tag."; + } + + leaf error-app-tag { + type string; + description + "The application-specific error-tag."; + } + + leaf error-path { + type instance-identifier; + description + "The YANG instance identifier associated + with the error node."; + } + + leaf error-message { + type string; + description + "A message describing the error."; + } + + anydata error-info { + description + "This anydata value MUST represent a container with + zero or more data nodes representing additional + error information."; + } + } + } + } + + grouping restconf { + description + "Conceptual grouping representing the RESTCONF + root resource."; + + container restconf { + description + "Conceptual container representing the RESTCONF + root resource."; + + container data { + description + "Container representing the datastore resource. + Represents the conceptual root of all state data + and configuration data supported by the server. + The child nodes of this container can be any data + resources that are defined as top-level data nodes + from the YANG modules advertised by the server in + the 'ietf-yang-library' module."; + } + + container operations { + description + "Container for all operation resources. + + Each resource is represented as an empty leaf with the + name of the RPC operation from the YANG 'rpc' statement. + + For example, the 'system-restart' RPC operation defined + in the 'ietf-system' module would be represented as + an empty leaf in the 'ietf-system' namespace. This is + a conceptual leaf and will not actually be found in + the module: + + module ietf-system { + leaf system-reset { + type empty; + } + } + + To invoke the 'system-restart' RPC operation: + + POST /restconf/operations/ietf-system:system-restart + + To discover the RPC operations supported by the server: + + GET /restconf/operations + + In XML, the YANG module namespace identifies the module: + + <system-restart + xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/> + + In JSON, the YANG module name identifies the module: + + { 'ietf-system:system-restart' : [null] } + "; + } + leaf yang-library-version { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + config false; + mandatory true; + description + "Identifies the revision date of the 'ietf-yang-library' + module that is implemented by this RESTCONF server. + Indicates the year, month, and day in YYYY-MM-DD + numeric format."; + } + } + } + +} diff --git a/models/ietf/RFC/ietf-restconf@2017-01-26.yang b/models/ietf/RFC/ietf-restconf@2017-01-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..b47455b81644ddf810e7e3241cf69cb4d2f975b3 --- /dev/null +++ b/models/ietf/RFC/ietf-restconf@2017-01-26.yang @@ -0,0 +1,278 @@ +module ietf-restconf { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-restconf"; + prefix "rc"; + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net>"; + + description + "This module contains conceptual YANG specifications + for basic RESTCONF media type definitions used in + RESTCONF protocol messages. + + Note that the YANG definitions within this module do not + represent configuration data of any kind. + The 'restconf-media-type' YANG extension statement + provides a normative syntax for XML and JSON + message-encoding purposes. + + Copyright (c) 2017 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8040; see + the RFC itself for full legal notices."; + + revision 2017-01-26 { + description + "Initial revision."; + reference + "RFC 8040: RESTCONF Protocol."; + } + + extension yang-data { + argument name { + yin-element true; + } + description + "This extension is used to specify a YANG data template that + represents conceptual data defined in YANG. It is + intended to describe hierarchical data independent of + protocol context or specific message-encoding format. + Data definition statements within a yang-data extension + specify the generic syntax for the specific YANG data + template, whose name is the argument of the 'yang-data' + extension statement. + + Note that this extension does not define a media type. + A specification using this extension MUST specify the + message-encoding rules, including the content media type. + + The mandatory 'name' parameter value identifies the YANG + data template that is being defined. It contains the + template name. + + This extension is ignored unless it appears as a top-level + statement. It MUST contain data definition statements + that result in exactly one container data node definition. + An instance of a YANG data template can thus be translated + into an XML instance document, whose top-level element + corresponds to the top-level container. + The module name and namespace values for the YANG module using + the extension statement are assigned to instance document data + conforming to the data definition statements within + this extension. + + The substatements of this extension MUST follow the + 'data-def-stmt' rule in the YANG ABNF. + + The XPath document root is the extension statement itself, + such that the child nodes of the document root are + represented by the data-def-stmt substatements within + this extension. This conceptual document is the context + for the following YANG statements: + + - must-stmt + - when-stmt + - path-stmt + - min-elements-stmt + - max-elements-stmt + - mandatory-stmt + - unique-stmt + - ordered-by + - instance-identifier data type + + The following data-def-stmt substatements are constrained + when used within a 'yang-data' extension statement. + + - The list-stmt is not required to have a key-stmt defined. + - The if-feature-stmt is ignored if present. + - The config-stmt is ignored if present. + - The available identity values for any 'identityref' + leaf or leaf-list nodes are limited to the module + containing this extension statement and the modules + imported into that module. + "; + } + + rc:yang-data yang-errors { + uses errors; + } + + rc:yang-data yang-api { + uses restconf; + } + + grouping errors { + description + "A grouping that contains a YANG container + representing the syntax and semantics of a + YANG Patch error report within a response message."; + + container errors { + description + "Represents an error report returned by the server if + a request results in an error."; + + list error { + description + "An entry containing information about one + specific error that occurred while processing + a RESTCONF request."; + reference + "RFC 6241, Section 4.3."; + + leaf error-type { + type enumeration { + enum transport { + description + "The transport layer."; + } + enum rpc { + description + "The rpc or notification layer."; + } + enum protocol { + description + "The protocol operation layer."; + } + enum application { + description + "The server application layer."; + } + } + mandatory true; + description + "The protocol layer where the error occurred."; + } + + leaf error-tag { + type string; + mandatory true; + description + "The enumerated error-tag."; + } + + leaf error-app-tag { + type string; + description + "The application-specific error-tag."; + } + + leaf error-path { + type instance-identifier; + description + "The YANG instance identifier associated + with the error node."; + } + + leaf error-message { + type string; + description + "A message describing the error."; + } + + anydata error-info { + description + "This anydata value MUST represent a container with + zero or more data nodes representing additional + error information."; + } + } + } + } + + grouping restconf { + description + "Conceptual grouping representing the RESTCONF + root resource."; + + container restconf { + description + "Conceptual container representing the RESTCONF + root resource."; + + container data { + description + "Container representing the datastore resource. + Represents the conceptual root of all state data + and configuration data supported by the server. + The child nodes of this container can be any data + resources that are defined as top-level data nodes + from the YANG modules advertised by the server in + the 'ietf-yang-library' module."; + } + + container operations { + description + "Container for all operation resources. + + Each resource is represented as an empty leaf with the + name of the RPC operation from the YANG 'rpc' statement. + + For example, the 'system-restart' RPC operation defined + in the 'ietf-system' module would be represented as + an empty leaf in the 'ietf-system' namespace. This is + a conceptual leaf and will not actually be found in + the module: + + module ietf-system { + leaf system-reset { + type empty; + } + } + + To invoke the 'system-restart' RPC operation: + + POST /restconf/operations/ietf-system:system-restart + + To discover the RPC operations supported by the server: + + GET /restconf/operations + + In XML, the YANG module namespace identifies the module: + + <system-restart + xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/> + + In JSON, the YANG module name identifies the module: + + { 'ietf-system:system-restart' : [null] } + "; + } + leaf yang-library-version { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + config false; + mandatory true; + description + "Identifies the revision date of the 'ietf-yang-library' + module that is implemented by this RESTCONF server. + Indicates the year, month, and day in YYYY-MM-DD + numeric format."; + } + } + } + +} diff --git a/models/ietf/RFC/ietf-routing-types.yang b/models/ietf/RFC/ietf-routing-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..24319c155fb104e20bee79e5b257317b01323197 --- /dev/null +++ b/models/ietf/RFC/ietf-routing-types.yang @@ -0,0 +1,771 @@ +module ietf-routing-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; + prefix rt-types; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> + WG List: <mailto:rtgwg@ietf.org> + + Editors: Xufeng Liu + <mailto:Xufeng_Liu@jabail.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com> + Acee Lindem + <mailto:acee@cisco.com> + Christian Hopps + <mailto:chopps@chopps.org> + Lou Berger + <mailto:lberger@labn.com>"; + + description + "This module contains a collection of YANG data types + considered generally useful for routing protocols. + + Copyright (c) 2017 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 Simplified 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 8294; see + the RFC itself for full legal notices."; + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 3."; + } + + /*** Identities related to MPLS/GMPLS ***/ + + identity mpls-label-special-purpose-value { + description + "Base identity for deriving identities describing + special-purpose Multiprotocol Label Switching (MPLS) label + values."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + identity ipv4-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv4 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity router-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Router Alert Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity ipv6-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv6 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity implicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Implicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity entropy-label-indicator { + base mpls-label-special-purpose-value; + description + "This identity represents the Entropy Label Indicator."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding. + Sections 3 and 10.1."; + } + + identity gal-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Generic Associated Channel + (G-ACh) Label (GAL)."; + reference + "RFC 5586: MPLS Generic Associated Channel. + Sections 4 and 10."; + } + + identity oam-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the OAM Alert Label."; + reference + "RFC 3429: Assignment of the 'OAM Alert Label' for + Multiprotocol Label Switching Architecture (MPLS) + Operation and Maintenance (OAM) Functions. + Sections 3 and 6."; + } + + identity extension-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Extension Label."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels. Sections 3.1 and 5."; + } + + /*** Collection of types related to routing ***/ + + typedef router-id { + type yang:dotted-quad; + description + "A 32-bit number in the dotted-quad format assigned to each + router. This number uniquely identifies the router within + an Autonomous System."; + } + + /*** Collection of types related to VPNs ***/ + + typedef route-target { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Target is an 8-octet BGP extended community + initially identifying a set of sites in a BGP VPN + (RFC 4364). However, it has since taken on a more general + role in BGP route filtering. A Route Target consists of two + or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + Route Target types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-target { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Target is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet Route Target, except that it only + allows an IPv6 address as the global administrator. + The format is <ipv6-address:2-octet-number>. + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + typedef route-target-type { + type enumeration { + enum import { + value 0; + description + "The Route Target applies to route import."; + } + enum export { + value 1; + description + "The Route Target applies to route export."; + } + + enum both { + value 2; + description + "The Route Target applies to both route import and + route export."; + } + } + description + "Indicates the role a Route Target takes in route filtering."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; + } + + typedef route-distinguisher { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Distinguisher is an 8-octet value used to + distinguish routes from different BGP VPNs (RFC 4364). + A Route Distinguisher will have the same format as a + Route Target as per RFC 4360 and will consist of + two or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + route discriminator types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef route-origin { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A Route Origin is an 8-octet BGP extended community + identifying the set of sites where the BGP route + originated (RFC 4364). A Route Origin will have the same + format as a Route Target as per RFC 4360 and will consist + of two or three fields: a 2-octet Type field, an + administrator field, and, optionally, an assigned number + field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + Additionally, a generic pattern is defined for future + Route Origin types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-origin { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Origin is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet route, except that it only allows + an IPv6 address as the global administrator. The format + is <ipv6-address:2-octet-number>. + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + /*** Collection of types common to multicast ***/ + + typedef ipv4-multicast-group-address { + type inet:ipv4-address { + pattern '(2((2[4-9])|(3[0-9]))\.).*'; + } + description + "This type represents an IPv4 multicast group address, + which is in the range of 224.0.0.0 to 239.255.255.255."; + reference + "RFC 1112: Host Extensions for IP Multicasting."; + } + + typedef ipv6-multicast-group-address { + type inet:ipv6-address { + pattern '(([fF]{2}[0-9a-fA-F]{2}):).*'; + } + description + "This type represents an IPv6 multicast group address, + which is in the range of ff00::/8."; + reference + "RFC 4291: IP Version 6 Addressing Architecture. Section 2.7. + RFC 7346: IPv6 Multicast Address Scopes."; + } + + typedef ip-multicast-group-address { + type union { + type ipv4-multicast-group-address; + type ipv6-multicast-group-address; + } + description + "This type represents a version-neutral IP multicast group + address. The format of the textual representation implies + the IP version."; + } + + typedef ipv4-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IPv4 address type."; + } + + typedef ipv6-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IPv6 address type."; + } + + /*** Collection of types common to protocols ***/ + + typedef bandwidth-ieee-float32 { + type string { + pattern + '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01][0-9]|0?[0-9]?[0-9])?)'; + } + description + "Bandwidth in IEEE 754 floating-point 32-bit binary format: + (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), + where Exponent uses 8 bits and Fraction uses 23 bits. + The units are octets per second. + The encoding format is the external hexadecimal-significant + character sequences specified in IEEE 754 and ISO/IEC C99. + The format is restricted to be normalized, non-negative, and + non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0, + where 'h' and 'H' are hexadecimal digits and 'd' and 'D' are + integers in the range of [0..127]. + When six hexadecimal digits are used for 'hhhhhh' or + 'HHHHHH', the least significant digit must be an even + number. 'x' and 'X' indicate hexadecimal; 'p' and 'P' + indicate a power of two. Some examples are 0x0p0, 0x1p10, + and 0x1.abcde2p+20."; + reference + "IEEE Std 754-2008: IEEE Standard for Floating-Point + Arithmetic. + ISO/IEC C99: Information technology - Programming + Languages - C."; + } + + typedef link-access-type { + type enumeration { + enum broadcast { + description + "Specify broadcast multi-access network."; + } + enum non-broadcast-multiaccess { + description + "Specify Non-Broadcast Multi-Access (NBMA) network."; + } + enum point-to-multipoint { + description + "Specify point-to-multipoint network."; + } + enum point-to-point { + description + "Specify point-to-point network."; + } + } + description + "Link access type."; + } + + typedef timer-multiplier { + type uint8; + description + "The number of timer value intervals that should be + interpreted as a failure."; + } + + typedef timer-value-seconds16 { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (16-bit range)."; + } + + typedef timer-value-seconds32 { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (32-bit range)."; + } + + typedef timer-value-milliseconds { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "milliseconds"; + description + "Timer value type, in milliseconds."; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value."; + } + + typedef timeticks64 { + type uint64; + description + "This type is based on the timeticks type defined in + RFC 6991, but with 64-bit width. It represents the time, + modulo 2^64, in hundredths of a second between two epochs."; + reference + "RFC 6991: Common YANG Data Types."; + } + + typedef uint24 { + type uint32 { + range "0..16777215"; + } + description + "24-bit unsigned integer."; + } + + /*** Collection of types related to MPLS/GMPLS ***/ + + typedef generalized-label { + type binary; + description + "Generalized Label. Nodes sending and receiving the + Generalized Label are aware of the link-specific + label context and type."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description. Section 3.2."; + } + + typedef mpls-label-special-purpose { + type identityref { + base mpls-label-special-purpose-value; + } + description + "This type represents the special-purpose MPLS label values."; + reference + "RFC 3032: MPLS Label Stack Encoding. + RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + typedef mpls-label-general-use { + type uint32 { + range "16..1048575"; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL (Time to Live). + The label range specified by this type is for general use, + with special-purpose MPLS label values excluded."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + typedef mpls-label { + type union { + type mpls-label-special-purpose; + type mpls-label-general-use; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + /*** Groupings **/ + + grouping mpls-label-stack { + description + "This grouping specifies an MPLS label stack. The label + stack is encoded as a list of label stack entries. The + list key is an identifier that indicates the relative + ordering of each entry, with the lowest-value identifier + corresponding to the top of the label stack."; + container mpls-label-stack { + description + "Container for a list of MPLS label stack entries."; + list entry { + key "id"; + description + "List of MPLS label stack entries."; + leaf id { + type uint8; + description + "Identifies the entry in a sequence of MPLS label + stack entries. An entry with a smaller identifier + value precedes an entry with a larger identifier + value in the label stack. The value of this ID has + no semantic meaning other than relative ordering + and referencing the entry."; + } + leaf label { + type rt-types:mpls-label; + description + "Label value."; + } + + leaf ttl { + type uint8; + description + "Time to Live (TTL)."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + leaf traffic-class { + type uint8 { + range "0..7"; + } + description + "Traffic Class (TC)."; + reference + "RFC 5462: Multiprotocol Label Switching (MPLS) Label + Stack Entry: 'EXP' Field Renamed to 'Traffic Class' + Field."; + } + } + } + } + + grouping vpn-route-targets { + description + "A grouping that specifies Route Target import-export rules + used in BGP-enabled VPNs."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs)."; + list vpn-target { + key "route-target"; + description + "List of Route Targets."; + leaf route-target { + type rt-types:route-target; + description + "Route Target value."; + } + leaf route-target-type { + type rt-types:route-target-type; + mandatory true; + description + "Import/export type of the Route Target."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-routing-types@2017-12-04.yang b/models/ietf/RFC/ietf-routing-types@2017-12-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..24319c155fb104e20bee79e5b257317b01323197 --- /dev/null +++ b/models/ietf/RFC/ietf-routing-types@2017-12-04.yang @@ -0,0 +1,771 @@ +module ietf-routing-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; + prefix rt-types; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> + WG List: <mailto:rtgwg@ietf.org> + + Editors: Xufeng Liu + <mailto:Xufeng_Liu@jabail.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com> + Acee Lindem + <mailto:acee@cisco.com> + Christian Hopps + <mailto:chopps@chopps.org> + Lou Berger + <mailto:lberger@labn.com>"; + + description + "This module contains a collection of YANG data types + considered generally useful for routing protocols. + + Copyright (c) 2017 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 Simplified 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 8294; see + the RFC itself for full legal notices."; + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 3."; + } + + /*** Identities related to MPLS/GMPLS ***/ + + identity mpls-label-special-purpose-value { + description + "Base identity for deriving identities describing + special-purpose Multiprotocol Label Switching (MPLS) label + values."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + identity ipv4-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv4 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity router-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Router Alert Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity ipv6-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv6 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity implicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Implicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity entropy-label-indicator { + base mpls-label-special-purpose-value; + description + "This identity represents the Entropy Label Indicator."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding. + Sections 3 and 10.1."; + } + + identity gal-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Generic Associated Channel + (G-ACh) Label (GAL)."; + reference + "RFC 5586: MPLS Generic Associated Channel. + Sections 4 and 10."; + } + + identity oam-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the OAM Alert Label."; + reference + "RFC 3429: Assignment of the 'OAM Alert Label' for + Multiprotocol Label Switching Architecture (MPLS) + Operation and Maintenance (OAM) Functions. + Sections 3 and 6."; + } + + identity extension-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Extension Label."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels. Sections 3.1 and 5."; + } + + /*** Collection of types related to routing ***/ + + typedef router-id { + type yang:dotted-quad; + description + "A 32-bit number in the dotted-quad format assigned to each + router. This number uniquely identifies the router within + an Autonomous System."; + } + + /*** Collection of types related to VPNs ***/ + + typedef route-target { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Target is an 8-octet BGP extended community + initially identifying a set of sites in a BGP VPN + (RFC 4364). However, it has since taken on a more general + role in BGP route filtering. A Route Target consists of two + or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + Route Target types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-target { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Target is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet Route Target, except that it only + allows an IPv6 address as the global administrator. + The format is <ipv6-address:2-octet-number>. + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + typedef route-target-type { + type enumeration { + enum import { + value 0; + description + "The Route Target applies to route import."; + } + enum export { + value 1; + description + "The Route Target applies to route export."; + } + + enum both { + value 2; + description + "The Route Target applies to both route import and + route export."; + } + } + description + "Indicates the role a Route Target takes in route filtering."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; + } + + typedef route-distinguisher { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Distinguisher is an 8-octet value used to + distinguish routes from different BGP VPNs (RFC 4364). + A Route Distinguisher will have the same format as a + Route Target as per RFC 4360 and will consist of + two or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + route discriminator types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef route-origin { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A Route Origin is an 8-octet BGP extended community + identifying the set of sites where the BGP route + originated (RFC 4364). A Route Origin will have the same + format as a Route Target as per RFC 4360 and will consist + of two or three fields: a 2-octet Type field, an + administrator field, and, optionally, an assigned number + field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + Additionally, a generic pattern is defined for future + Route Origin types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-origin { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Origin is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet route, except that it only allows + an IPv6 address as the global administrator. The format + is <ipv6-address:2-octet-number>. + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + /*** Collection of types common to multicast ***/ + + typedef ipv4-multicast-group-address { + type inet:ipv4-address { + pattern '(2((2[4-9])|(3[0-9]))\.).*'; + } + description + "This type represents an IPv4 multicast group address, + which is in the range of 224.0.0.0 to 239.255.255.255."; + reference + "RFC 1112: Host Extensions for IP Multicasting."; + } + + typedef ipv6-multicast-group-address { + type inet:ipv6-address { + pattern '(([fF]{2}[0-9a-fA-F]{2}):).*'; + } + description + "This type represents an IPv6 multicast group address, + which is in the range of ff00::/8."; + reference + "RFC 4291: IP Version 6 Addressing Architecture. Section 2.7. + RFC 7346: IPv6 Multicast Address Scopes."; + } + + typedef ip-multicast-group-address { + type union { + type ipv4-multicast-group-address; + type ipv6-multicast-group-address; + } + description + "This type represents a version-neutral IP multicast group + address. The format of the textual representation implies + the IP version."; + } + + typedef ipv4-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IPv4 address type."; + } + + typedef ipv6-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IPv6 address type."; + } + + /*** Collection of types common to protocols ***/ + + typedef bandwidth-ieee-float32 { + type string { + pattern + '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01][0-9]|0?[0-9]?[0-9])?)'; + } + description + "Bandwidth in IEEE 754 floating-point 32-bit binary format: + (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), + where Exponent uses 8 bits and Fraction uses 23 bits. + The units are octets per second. + The encoding format is the external hexadecimal-significant + character sequences specified in IEEE 754 and ISO/IEC C99. + The format is restricted to be normalized, non-negative, and + non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0, + where 'h' and 'H' are hexadecimal digits and 'd' and 'D' are + integers in the range of [0..127]. + When six hexadecimal digits are used for 'hhhhhh' or + 'HHHHHH', the least significant digit must be an even + number. 'x' and 'X' indicate hexadecimal; 'p' and 'P' + indicate a power of two. Some examples are 0x0p0, 0x1p10, + and 0x1.abcde2p+20."; + reference + "IEEE Std 754-2008: IEEE Standard for Floating-Point + Arithmetic. + ISO/IEC C99: Information technology - Programming + Languages - C."; + } + + typedef link-access-type { + type enumeration { + enum broadcast { + description + "Specify broadcast multi-access network."; + } + enum non-broadcast-multiaccess { + description + "Specify Non-Broadcast Multi-Access (NBMA) network."; + } + enum point-to-multipoint { + description + "Specify point-to-multipoint network."; + } + enum point-to-point { + description + "Specify point-to-point network."; + } + } + description + "Link access type."; + } + + typedef timer-multiplier { + type uint8; + description + "The number of timer value intervals that should be + interpreted as a failure."; + } + + typedef timer-value-seconds16 { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (16-bit range)."; + } + + typedef timer-value-seconds32 { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (32-bit range)."; + } + + typedef timer-value-milliseconds { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "milliseconds"; + description + "Timer value type, in milliseconds."; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value."; + } + + typedef timeticks64 { + type uint64; + description + "This type is based on the timeticks type defined in + RFC 6991, but with 64-bit width. It represents the time, + modulo 2^64, in hundredths of a second between two epochs."; + reference + "RFC 6991: Common YANG Data Types."; + } + + typedef uint24 { + type uint32 { + range "0..16777215"; + } + description + "24-bit unsigned integer."; + } + + /*** Collection of types related to MPLS/GMPLS ***/ + + typedef generalized-label { + type binary; + description + "Generalized Label. Nodes sending and receiving the + Generalized Label are aware of the link-specific + label context and type."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description. Section 3.2."; + } + + typedef mpls-label-special-purpose { + type identityref { + base mpls-label-special-purpose-value; + } + description + "This type represents the special-purpose MPLS label values."; + reference + "RFC 3032: MPLS Label Stack Encoding. + RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + typedef mpls-label-general-use { + type uint32 { + range "16..1048575"; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL (Time to Live). + The label range specified by this type is for general use, + with special-purpose MPLS label values excluded."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + typedef mpls-label { + type union { + type mpls-label-special-purpose; + type mpls-label-general-use; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + /*** Groupings **/ + + grouping mpls-label-stack { + description + "This grouping specifies an MPLS label stack. The label + stack is encoded as a list of label stack entries. The + list key is an identifier that indicates the relative + ordering of each entry, with the lowest-value identifier + corresponding to the top of the label stack."; + container mpls-label-stack { + description + "Container for a list of MPLS label stack entries."; + list entry { + key "id"; + description + "List of MPLS label stack entries."; + leaf id { + type uint8; + description + "Identifies the entry in a sequence of MPLS label + stack entries. An entry with a smaller identifier + value precedes an entry with a larger identifier + value in the label stack. The value of this ID has + no semantic meaning other than relative ordering + and referencing the entry."; + } + leaf label { + type rt-types:mpls-label; + description + "Label value."; + } + + leaf ttl { + type uint8; + description + "Time to Live (TTL)."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + leaf traffic-class { + type uint8 { + range "0..7"; + } + description + "Traffic Class (TC)."; + reference + "RFC 5462: Multiprotocol Label Switching (MPLS) Label + Stack Entry: 'EXP' Field Renamed to 'Traffic Class' + Field."; + } + } + } + } + + grouping vpn-route-targets { + description + "A grouping that specifies Route Target import-export rules + used in BGP-enabled VPNs."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs)."; + list vpn-target { + key "route-target"; + description + "List of Route Targets."; + leaf route-target { + type rt-types:route-target; + description + "Route Target value."; + } + leaf route-target-type { + type rt-types:route-target-type; + mandatory true; + description + "Import/export type of the Route Target."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-routing.yang b/models/ietf/RFC/ietf-routing.yang new file mode 100644 index 0000000000000000000000000000000000000000..9e259f0e6a7ed2648d6a335b9287ee97fceadc4c --- /dev/null +++ b/models/ietf/RFC/ietf-routing.yang @@ -0,0 +1,684 @@ +module ietf-routing { + yang-version "1.1"; + namespace "urn:ietf:params:xml:ns:yang:ietf-routing"; + prefix "rt"; + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-interfaces { + prefix "if"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com>"; + + description + "This YANG module defines essential components for the management + of a routing subsystem. The model fully conforms to the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Features */ + feature multiple-ribs { + description + "This feature indicates that the server supports + user-defined RIBs. + + Servers that do not advertise this feature SHOULD provide + exactly one system-controlled RIB per supported address family + and also make it the default RIB. This RIB then appears as an + entry in the list '/routing/ribs/rib'."; + } + + feature router-id { + description + "This feature indicates that the server supports an explicit + 32-bit router ID that is used by some routing protocols. + + Servers that do not advertise this feature set a router ID + algorithmically, usually to one of the configured IPv4 + addresses. However, this algorithm is implementation + specific."; + } + + /* Identities */ + + identity address-family { + description + "Base identity from which identities describing address + families are derived."; + } + identity ipv4 { + base address-family; + description + "This identity represents an IPv4 address family."; + } + + identity ipv6 { + base address-family; + description + "This identity represents an IPv6 address family."; + } + + identity control-plane-protocol { + description + "Base identity from which control-plane protocol identities are + derived."; + } + + identity routing-protocol { + base control-plane-protocol; + description + "Identity from which Layer 3 routing protocol identities are + derived."; + } + + identity direct { + base routing-protocol; + description + "Routing pseudo-protocol that provides routes to directly + connected networks."; + } + + identity static { + base routing-protocol; + description + "'Static' routing pseudo-protocol."; + } + + /* Type Definitions */ + + typedef route-preference { + type uint32; + description + "This type is used for route preferences."; + } + + /* Groupings */ + + grouping address-family { + description + "This grouping provides a leaf identifying an address + family."; + leaf address-family { + type identityref { + base address-family; + } + mandatory true; + description + "Address family."; + } + } + + grouping router-id { + description + "This grouping provides a router ID."; + leaf router-id { + type yang:dotted-quad; + description + "A 32-bit number in the form of a dotted quad that is used by + some routing protocols identifying a router."; + reference + "RFC 2328: OSPF Version 2"; + } + } + + grouping special-next-hop { + description + "This grouping provides a leaf with an enumeration of special + next hops."; + leaf special-next-hop { + type enumeration { + enum blackhole { + description + "Silently discard the packet."; + } + enum unreachable { + description + "Discard the packet and notify the sender with an error + message indicating that the destination host is + unreachable."; + } + enum prohibit { + description + "Discard the packet and notify the sender with an error + message indicating that the communication is + administratively prohibited."; + } + enum receive { + description + "The packet will be received by the local system."; + } + } + description + "Options for special next hops."; + } + } + + grouping next-hop-content { + description + "Generic parameters of next hops in static routes."; + choice next-hop-options { + mandatory true; + description + "Options for next hops in static routes. + + It is expected that further cases will be added through + augments from other modules."; + case simple-next-hop { + description + "This case represents a simple next hop consisting of the + next-hop address and/or outgoing interface. + + Modules for address families MUST augment this case with a + leaf containing a next-hop address of that address + family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + case special-next-hop { + uses special-next-hop; + } + case next-hop-list { + container next-hop-list { + description + "Container for multiple next hops."; + list next-hop { + key "index"; + description + "An entry in a next-hop list. + + Modules for address families MUST augment this list + with a leaf containing a next-hop address of that + address family."; + leaf index { + type string; + description + "A user-specified identifier utilized to uniquely + reference the next-hop entry in the next-hop list. + The value of this index has no semantic meaning + other than for referencing the entry."; + } + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + } + } + } + } + + grouping next-hop-state-content { + description + "Generic state parameters of next hops."; + choice next-hop-options { + mandatory true; + description + "Options for next hops. + + It is expected that further cases will be added through + augments from other modules, e.g., for recursive + next hops."; + case simple-next-hop { + description + "This case represents a simple next hop consisting of the + next-hop address and/or outgoing interface. + + Modules for address families MUST augment this case with a + leaf containing a next-hop address of that address + family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + case special-next-hop { + uses special-next-hop; + } + case next-hop-list { + container next-hop-list { + description + "Container for multiple next hops."; + list next-hop { + description + "An entry in a next-hop list. + + Modules for address families MUST augment this list + with a leaf containing a next-hop address of that + address family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + } + } + } + } + + grouping route-metadata { + description + "Common route metadata."; + leaf source-protocol { + type identityref { + base routing-protocol; + } + mandatory true; + description + "Type of the routing protocol from which the route + originated."; + } + leaf active { + type empty; + description + "The presence of this leaf indicates that the route is + preferred among all routes in the same RIB that have the + same destination prefix."; + } + leaf last-updated { + type yang:date-and-time; + description + "Timestamp of the last modification of the route. If the + route was never modified, it is the time when the route was + inserted into the RIB."; + } + } + + /* Data nodes */ + + container routing { + description + "Configuration parameters for the routing subsystem."; + uses router-id { + if-feature "router-id"; + description + "Support for the global router ID. Routing protocols + that use a router ID can use this parameter or override it + with another value."; + } + container interfaces { + config false; + description + "Network-layer interfaces used for routing."; + leaf-list interface { + type if:interface-ref; + description + "Each entry is a reference to the name of a configured + network-layer interface."; + } + } + container control-plane-protocols { + description + "Support for control-plane protocol instances."; + list control-plane-protocol { + key "type name"; + description + "Each entry contains a control-plane protocol instance."; + leaf type { + type identityref { + base control-plane-protocol; + } + description + "Type of the control-plane protocol -- an identity + derived from the 'control-plane-protocol' + base identity."; + } + leaf name { + type string; + description + "An arbitrary name of the control-plane protocol + instance."; + } + leaf description { + type string; + description + "Textual description of the control-plane protocol + instance."; + } + container static-routes { + when "derived-from-or-self(../type, 'rt:static')" { + description + "This container is only valid for the 'static' routing + protocol."; + } + description + "Support for the 'static' pseudo-protocol. + + Address-family-specific modules augment this node with + their lists of routes."; + } + } + } + container ribs { + description + "Support for RIBs."; + list rib { + key "name"; + description + "Each entry contains a configuration for a RIB identified + by the 'name' key. + + Entries having the same key as a system-controlled entry + in the list '/routing/ribs/rib' are used for + configuring parameters of that entry. Other entries + define additional user-controlled RIBs."; + leaf name { + type string; + description + "The name of the RIB. + + For system-controlled entries, the value of this leaf + must be the same as the name of the corresponding entry + in the operational state. + + For user-controlled entries, an arbitrary name can be + used."; + } + uses address-family { + description + "The address family of the system-controlled RIB."; + } + + leaf default-rib { + if-feature "multiple-ribs"; + type boolean; + default "true"; + config false; + description + "This flag has the value of 'true' if and only if the RIB + is the default RIB for the given address family. + + By default, control-plane protocols place their routes + in the default RIBs."; + } + container routes { + config false; + description + "Current contents of the RIB."; + list route { + description + "A RIB route entry. This data node MUST be augmented + with information specific to routes of each address + family."; + leaf route-preference { + type route-preference; + description + "This route attribute, also known as 'administrative + distance', allows for selecting the preferred route + among routes with the same destination prefix. A + smaller value indicates a route that is + more preferred."; + } + container next-hop { + description + "Route's next-hop attribute."; + uses next-hop-state-content; + } + uses route-metadata; + } + } + action active-route { + description + "Return the active RIB route that is used for the + destination address. + + Address-family-specific modules MUST augment input + parameters with a leaf named 'destination-address'."; + output { + container route { + description + "The active RIB route for the specified destination. + + If no route exists in the RIB for the destination + address, no output is returned. + + Address-family-specific modules MUST augment this + container with appropriate route contents."; + container next-hop { + description + "Route's next-hop attribute."; + uses next-hop-state-content; + } + uses route-metadata; + } + } + } + leaf description { + type string; + description + "Textual description of the RIB."; + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + container routing-state { + config false; + status obsolete; + description + "State data of the routing subsystem."; + uses router-id { + status obsolete; + description + "Global router ID. + + It may be either configured or assigned algorithmically by + the implementation."; + } + container interfaces { + status obsolete; + description + "Network-layer interfaces used for routing."; + leaf-list interface { + type if:interface-state-ref; + status obsolete; + description + "Each entry is a reference to the name of a configured + network-layer interface."; + } + } + container control-plane-protocols { + status obsolete; + description + "Container for the list of routing protocol instances."; + list control-plane-protocol { + key "type name"; + status obsolete; + description + "State data of a control-plane protocol instance. + + An implementation MUST provide exactly one + system-controlled instance of the 'direct' + pseudo-protocol. Instances of other control-plane + protocols MAY be created by configuration."; + leaf type { + type identityref { + base control-plane-protocol; + } + status obsolete; + description + "Type of the control-plane protocol."; + } + leaf name { + type string; + status obsolete; + description + "The name of the control-plane protocol instance. + + For system-controlled instances, this name is + persistent, i.e., it SHOULD NOT change across + reboots."; + } + } + } + container ribs { + status obsolete; + description + "Container for RIBs."; + list rib { + key "name"; + min-elements 1; + status obsolete; + description + "Each entry represents a RIB identified by the 'name' + key. All routes in a RIB MUST belong to the same address + family. + + An implementation SHOULD provide one system-controlled + default RIB for each supported address family."; + leaf name { + type string; + status obsolete; + description + "The name of the RIB."; + } + uses address-family { + status obsolete; + description + "The address family of the RIB."; + } + leaf default-rib { + if-feature "multiple-ribs"; + type boolean; + default "true"; + status obsolete; + description + "This flag has the value of 'true' if and only if the + RIB is the default RIB for the given address family. + + By default, control-plane protocols place their routes + in the default RIBs."; + } + container routes { + status obsolete; + description + "Current contents of the RIB."; + list route { + status obsolete; + description + "A RIB route entry. This data node MUST be augmented + with information specific to routes of each address + family."; + leaf route-preference { + type route-preference; + status obsolete; + description + "This route attribute, also known as 'administrative + distance', allows for selecting the preferred route + among routes with the same destination prefix. A + smaller value indicates a route that is + more preferred."; + } + container next-hop { + status obsolete; + description + "Route's next-hop attribute."; + uses next-hop-state-content { + status obsolete; + description + "Route's next-hop attribute operational state."; + } + } + uses route-metadata { + status obsolete; + description + "Route metadata."; + } + } + } + action active-route { + status obsolete; + description + "Return the active RIB route that is used for the + destination address. + + Address-family-specific modules MUST augment input + parameters with a leaf named 'destination-address'."; + output { + container route { + status obsolete; + description + "The active RIB route for the specified + destination. + + If no route exists in the RIB for the destination + address, no output is returned. + + Address-family-specific modules MUST augment this + container with appropriate route contents."; + container next-hop { + status obsolete; + description + "Route's next-hop attribute."; + uses next-hop-state-content { + status obsolete; + description + "Active route state data."; + } + } + uses route-metadata { + status obsolete; + description + "Active route metadata."; + } + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-routing@2016-11-04.yang b/models/ietf/RFC/ietf-routing@2016-11-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..c7f061e65c72c7d11e3375cdadda50bc718a6d4c --- /dev/null +++ b/models/ietf/RFC/ietf-routing@2016-11-04.yang @@ -0,0 +1,576 @@ +module ietf-routing { + + yang-version "1.1"; + + namespace "urn:ietf:params:xml:ns:yang:ietf-routing"; + + prefix "rt"; + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-interfaces { + prefix "if"; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Lou Berger + <mailto:lberger@labn.net> + + WG Chair: Kent Watsen + <mailto:kwatsen@juniper.net> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + + Editor: Acee Lindem + <mailto:acee@cisco.com>"; + + description + "This YANG module defines essential components for the management + of a routing subsystem. + + Copyright (c) 2016 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and + 'OPTIONAL' in the module text are to be interpreted as described + in RFC 2119. + + This version of this YANG module is part of RFC 8022; + see the RFC itself for full legal notices."; + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Features */ + + feature multiple-ribs { + description + "This feature indicates that the server supports user-defined + RIBs. + + Servers that do not advertise this feature SHOULD provide + exactly one system-controlled RIB per supported address family + and make it also the default RIB. This RIB then appears as an + entry of the list /routing-state/ribs/rib."; + } + + feature router-id { + description + "This feature indicates that the server supports configuration + of an explicit 32-bit router ID that is used by some routing + protocols. + + Servers that do not advertise this feature set a router ID + algorithmically, usually to one of the configured IPv4 + addresses. However, this algorithm is implementation + specific."; + } + + /* Identities */ + + identity address-family { + description + "Base identity from which identities describing address + families are derived."; + } + + identity ipv4 { + base address-family; + description + "This identity represents IPv4 address family."; + } + + identity ipv6 { + base address-family; + description + "This identity represents IPv6 address family."; + } + + identity control-plane-protocol { + description + "Base identity from which control-plane protocol identities are + derived."; + } + + identity routing-protocol { + base control-plane-protocol; + description + "Identity from which Layer 3 routing protocol identities are + derived."; + } + + identity direct { + base routing-protocol; + description + "Routing pseudo-protocol that provides routes to directly + connected networks."; + } + + identity static { + base routing-protocol; + description + "Static routing pseudo-protocol."; + } + + /* Type Definitions */ + + typedef route-preference { + type uint32; + description + "This type is used for route preferences."; + } + + /* Groupings */ + + grouping address-family { + description + "This grouping provides a leaf identifying an address + family."; + leaf address-family { + type identityref { + base address-family; + } + mandatory "true"; + description + "Address family."; + } + } + + grouping router-id { + description + "This grouping provides router ID."; + leaf router-id { + type yang:dotted-quad; + description + "A 32-bit number in the form of a dotted quad that is used by + some routing protocols identifying a router."; + reference + "RFC 2328: OSPF Version 2."; + } + } + + grouping special-next-hop { + description + "This grouping provides a leaf with an enumeration of special + next hops."; + leaf special-next-hop { + type enumeration { + enum blackhole { + description + "Silently discard the packet."; + } + enum unreachable { + description + "Discard the packet and notify the sender with an error + message indicating that the destination host is + unreachable."; + } + enum prohibit { + description + "Discard the packet and notify the sender with an error + message indicating that the communication is + administratively prohibited."; + } + enum receive { + description + "The packet will be received by the local system."; + } + } + description + "Options for special next hops."; + } + } + + grouping next-hop-content { + description + "Generic parameters of next hops in static routes."; + choice next-hop-options { + mandatory "true"; + description + "Options for next hops in static routes. + + It is expected that further cases will be added through + augments from other modules."; + case simple-next-hop { + description + "This case represents a simple next hop consisting of the + next-hop address and/or outgoing interface. + + Modules for address families MUST augment this case with a + leaf containing a next-hop address of that address + family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + case special-next-hop { + uses special-next-hop; + } + case next-hop-list { + container next-hop-list { + description + "Container for multiple next-hops."; + list next-hop { + key "index"; + description + "An entry of a next-hop list. + + Modules for address families MUST augment this list + with a leaf containing a next-hop address of that + address family."; + leaf index { + type string; + description + "A user-specified identifier utilized to uniquely + reference the next-hop entry in the next-hop list. + The value of this index has no semantic meaning + other than for referencing the entry."; + } + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + } + } + } + } + + grouping next-hop-state-content { + description + "Generic parameters of next hops in state data."; + choice next-hop-options { + mandatory "true"; + description + "Options for next hops in state data. + + It is expected that further cases will be added through + augments from other modules, e.g., for recursive + next hops."; + case simple-next-hop { + description + "This case represents a simple next hop consisting of the + next-hop address and/or outgoing interface. + + Modules for address families MUST augment this case with a + leaf containing a next-hop address of that address + family."; + leaf outgoing-interface { + type if:interface-state-ref; + description + "Name of the outgoing interface."; + } + } + case special-next-hop { + uses special-next-hop; + } + case next-hop-list { + container next-hop-list { + description + "Container for multiple next hops."; + list next-hop { + description + "An entry of a next-hop list. + + Modules for address families MUST augment this list + with a leaf containing a next-hop address of that + address family."; + leaf outgoing-interface { + type if:interface-state-ref; + description + "Name of the outgoing interface."; + } + } + } + } + } + } + + grouping route-metadata { + description + "Common route metadata."; + leaf source-protocol { + type identityref { + base routing-protocol; + } + mandatory "true"; + description + "Type of the routing protocol from which the route + originated."; + } + leaf active { + type empty; + description + "Presence of this leaf indicates that the route is preferred + among all routes in the same RIB that have the same + destination prefix."; + } + leaf last-updated { + type yang:date-and-time; + description + "Time stamp of the last modification of the route. If the + route was never modified, it is the time when the route was + inserted into the RIB."; + } + } + + /* State data */ + + container routing-state { + config "false"; + description + "State data of the routing subsystem."; + uses router-id { + description + "Global router ID. + + It may be either configured or assigned algorithmically by + the implementation."; + } + container interfaces { + description + "Network-layer interfaces used for routing."; + leaf-list interface { + type if:interface-state-ref; + description + "Each entry is a reference to the name of a configured + network-layer interface."; + } + } + container control-plane-protocols { + description + "Container for the list of routing protocol instances."; + list control-plane-protocol { + key "type name"; + description + "State data of a control-plane protocol instance. + + An implementation MUST provide exactly one + system-controlled instance of the 'direct' + pseudo-protocol. Instances of other control-plane + protocols MAY be created by configuration."; + leaf type { + type identityref { + base control-plane-protocol; + } + description + "Type of the control-plane protocol."; + } + leaf name { + type string; + description + "The name of the control-plane protocol instance. + + For system-controlled instances this name is persistent, + i.e., it SHOULD NOT change across reboots."; + } + } + } + container ribs { + description + "Container for RIBs."; + list rib { + key "name"; + min-elements "1"; + description + "Each entry represents a RIB identified by the 'name' key. + All routes in a RIB MUST belong to the same address + family. + + An implementation SHOULD provide one system-controlled + default RIB for each supported address family."; + leaf name { + type string; + description + "The name of the RIB."; + } + uses address-family; + leaf default-rib { + if-feature "multiple-ribs"; + type boolean; + default "true"; + description + "This flag has the value of 'true' if and only if the RIB + is the default RIB for the given address family. + + By default, control-plane protocols place their routes + in the default RIBs."; + } + container routes { + description + "Current content of the RIB."; + list route { + description + "A RIB route entry. This data node MUST be augmented + with information specific for routes of each address + family."; + leaf route-preference { + type route-preference; + description + "This route attribute, also known as administrative + distance, allows for selecting the preferred route + among routes with the same destination prefix. A + smaller value means a more preferred route."; + } + container next-hop { + description + "Route's next-hop attribute."; + uses next-hop-state-content; + } + uses route-metadata; + } + } + action active-route { + description + "Return the active RIB route that is used for the + destination address. + + Address-family-specific modules MUST augment input + parameters with a leaf named 'destination-address'."; + output { + container route { + description + "The active RIB route for the specified destination. + + If no route exists in the RIB for the destination + address, no output is returned. + + Address-family-specific modules MUST augment this + container with appropriate route contents."; + container next-hop { + description + "Route's next-hop attribute."; + uses next-hop-state-content; + } + uses route-metadata; + } + } + } + } + } + } + + /* Configuration Data */ + + container routing { + description + "Configuration parameters for the routing subsystem."; + uses router-id { + if-feature "router-id"; + description + "Configuration of the global router ID. Routing protocols + that use router ID can use this parameter or override it + with another value."; + } + container control-plane-protocols { + description + "Configuration of control-plane protocol instances."; + list control-plane-protocol { + key "type name"; + description + "Each entry contains configuration of a control-plane + protocol instance."; + leaf type { + type identityref { + base control-plane-protocol; + } + description + "Type of the control-plane protocol - an identity derived + from the 'control-plane-protocol' base identity."; + } + leaf name { + type string; + description + "An arbitrary name of the control-plane protocol + instance."; + } + leaf description { + type string; + description + "Textual description of the control-plane protocol + instance."; + } + container static-routes { + when "derived-from-or-self(../type, 'rt:static')" { + description + "This container is only valid for the 'static' routing + protocol."; + } + description + "Configuration of the 'static' pseudo-protocol. + + Address-family-specific modules augment this node with + their lists of routes."; + } + } + } + container ribs { + description + "Configuration of RIBs."; + list rib { + key "name"; + description + "Each entry contains configuration for a RIB identified by + the 'name' key. + + Entries having the same key as a system-controlled entry + of the list /routing-state/ribs/rib are used for + configuring parameters of that entry. Other entries + define additional user-controlled RIBs."; + leaf name { + type string; + description + "The name of the RIB. + + For system-controlled entries, the value of this leaf + must be the same as the name of the corresponding entry + in state data. + + For user-controlled entries, an arbitrary name can be + used."; + } + uses address-family { + description + "Address family of the RIB. + + It is mandatory for user-controlled RIBs. For + system-controlled RIBs it can be omitted; otherwise, it + must match the address family of the corresponding state + entry."; + refine "address-family" { + mandatory "false"; + } + } + leaf description { + type string; + description + "Textual description of the RIB."; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-routing@2018-03-13.yang b/models/ietf/RFC/ietf-routing@2018-03-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..9e259f0e6a7ed2648d6a335b9287ee97fceadc4c --- /dev/null +++ b/models/ietf/RFC/ietf-routing@2018-03-13.yang @@ -0,0 +1,684 @@ +module ietf-routing { + yang-version "1.1"; + namespace "urn:ietf:params:xml:ns:yang:ietf-routing"; + prefix "rt"; + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-interfaces { + prefix "if"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz> + Acee Lindem + <mailto:acee@cisco.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com>"; + + description + "This YANG module defines essential components for the management + of a routing subsystem. The model fully conforms to the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 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 Simplified 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 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Features */ + feature multiple-ribs { + description + "This feature indicates that the server supports + user-defined RIBs. + + Servers that do not advertise this feature SHOULD provide + exactly one system-controlled RIB per supported address family + and also make it the default RIB. This RIB then appears as an + entry in the list '/routing/ribs/rib'."; + } + + feature router-id { + description + "This feature indicates that the server supports an explicit + 32-bit router ID that is used by some routing protocols. + + Servers that do not advertise this feature set a router ID + algorithmically, usually to one of the configured IPv4 + addresses. However, this algorithm is implementation + specific."; + } + + /* Identities */ + + identity address-family { + description + "Base identity from which identities describing address + families are derived."; + } + identity ipv4 { + base address-family; + description + "This identity represents an IPv4 address family."; + } + + identity ipv6 { + base address-family; + description + "This identity represents an IPv6 address family."; + } + + identity control-plane-protocol { + description + "Base identity from which control-plane protocol identities are + derived."; + } + + identity routing-protocol { + base control-plane-protocol; + description + "Identity from which Layer 3 routing protocol identities are + derived."; + } + + identity direct { + base routing-protocol; + description + "Routing pseudo-protocol that provides routes to directly + connected networks."; + } + + identity static { + base routing-protocol; + description + "'Static' routing pseudo-protocol."; + } + + /* Type Definitions */ + + typedef route-preference { + type uint32; + description + "This type is used for route preferences."; + } + + /* Groupings */ + + grouping address-family { + description + "This grouping provides a leaf identifying an address + family."; + leaf address-family { + type identityref { + base address-family; + } + mandatory true; + description + "Address family."; + } + } + + grouping router-id { + description + "This grouping provides a router ID."; + leaf router-id { + type yang:dotted-quad; + description + "A 32-bit number in the form of a dotted quad that is used by + some routing protocols identifying a router."; + reference + "RFC 2328: OSPF Version 2"; + } + } + + grouping special-next-hop { + description + "This grouping provides a leaf with an enumeration of special + next hops."; + leaf special-next-hop { + type enumeration { + enum blackhole { + description + "Silently discard the packet."; + } + enum unreachable { + description + "Discard the packet and notify the sender with an error + message indicating that the destination host is + unreachable."; + } + enum prohibit { + description + "Discard the packet and notify the sender with an error + message indicating that the communication is + administratively prohibited."; + } + enum receive { + description + "The packet will be received by the local system."; + } + } + description + "Options for special next hops."; + } + } + + grouping next-hop-content { + description + "Generic parameters of next hops in static routes."; + choice next-hop-options { + mandatory true; + description + "Options for next hops in static routes. + + It is expected that further cases will be added through + augments from other modules."; + case simple-next-hop { + description + "This case represents a simple next hop consisting of the + next-hop address and/or outgoing interface. + + Modules for address families MUST augment this case with a + leaf containing a next-hop address of that address + family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + case special-next-hop { + uses special-next-hop; + } + case next-hop-list { + container next-hop-list { + description + "Container for multiple next hops."; + list next-hop { + key "index"; + description + "An entry in a next-hop list. + + Modules for address families MUST augment this list + with a leaf containing a next-hop address of that + address family."; + leaf index { + type string; + description + "A user-specified identifier utilized to uniquely + reference the next-hop entry in the next-hop list. + The value of this index has no semantic meaning + other than for referencing the entry."; + } + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + } + } + } + } + + grouping next-hop-state-content { + description + "Generic state parameters of next hops."; + choice next-hop-options { + mandatory true; + description + "Options for next hops. + + It is expected that further cases will be added through + augments from other modules, e.g., for recursive + next hops."; + case simple-next-hop { + description + "This case represents a simple next hop consisting of the + next-hop address and/or outgoing interface. + + Modules for address families MUST augment this case with a + leaf containing a next-hop address of that address + family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + case special-next-hop { + uses special-next-hop; + } + case next-hop-list { + container next-hop-list { + description + "Container for multiple next hops."; + list next-hop { + description + "An entry in a next-hop list. + + Modules for address families MUST augment this list + with a leaf containing a next-hop address of that + address family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + } + } + } + } + + grouping route-metadata { + description + "Common route metadata."; + leaf source-protocol { + type identityref { + base routing-protocol; + } + mandatory true; + description + "Type of the routing protocol from which the route + originated."; + } + leaf active { + type empty; + description + "The presence of this leaf indicates that the route is + preferred among all routes in the same RIB that have the + same destination prefix."; + } + leaf last-updated { + type yang:date-and-time; + description + "Timestamp of the last modification of the route. If the + route was never modified, it is the time when the route was + inserted into the RIB."; + } + } + + /* Data nodes */ + + container routing { + description + "Configuration parameters for the routing subsystem."; + uses router-id { + if-feature "router-id"; + description + "Support for the global router ID. Routing protocols + that use a router ID can use this parameter or override it + with another value."; + } + container interfaces { + config false; + description + "Network-layer interfaces used for routing."; + leaf-list interface { + type if:interface-ref; + description + "Each entry is a reference to the name of a configured + network-layer interface."; + } + } + container control-plane-protocols { + description + "Support for control-plane protocol instances."; + list control-plane-protocol { + key "type name"; + description + "Each entry contains a control-plane protocol instance."; + leaf type { + type identityref { + base control-plane-protocol; + } + description + "Type of the control-plane protocol -- an identity + derived from the 'control-plane-protocol' + base identity."; + } + leaf name { + type string; + description + "An arbitrary name of the control-plane protocol + instance."; + } + leaf description { + type string; + description + "Textual description of the control-plane protocol + instance."; + } + container static-routes { + when "derived-from-or-self(../type, 'rt:static')" { + description + "This container is only valid for the 'static' routing + protocol."; + } + description + "Support for the 'static' pseudo-protocol. + + Address-family-specific modules augment this node with + their lists of routes."; + } + } + } + container ribs { + description + "Support for RIBs."; + list rib { + key "name"; + description + "Each entry contains a configuration for a RIB identified + by the 'name' key. + + Entries having the same key as a system-controlled entry + in the list '/routing/ribs/rib' are used for + configuring parameters of that entry. Other entries + define additional user-controlled RIBs."; + leaf name { + type string; + description + "The name of the RIB. + + For system-controlled entries, the value of this leaf + must be the same as the name of the corresponding entry + in the operational state. + + For user-controlled entries, an arbitrary name can be + used."; + } + uses address-family { + description + "The address family of the system-controlled RIB."; + } + + leaf default-rib { + if-feature "multiple-ribs"; + type boolean; + default "true"; + config false; + description + "This flag has the value of 'true' if and only if the RIB + is the default RIB for the given address family. + + By default, control-plane protocols place their routes + in the default RIBs."; + } + container routes { + config false; + description + "Current contents of the RIB."; + list route { + description + "A RIB route entry. This data node MUST be augmented + with information specific to routes of each address + family."; + leaf route-preference { + type route-preference; + description + "This route attribute, also known as 'administrative + distance', allows for selecting the preferred route + among routes with the same destination prefix. A + smaller value indicates a route that is + more preferred."; + } + container next-hop { + description + "Route's next-hop attribute."; + uses next-hop-state-content; + } + uses route-metadata; + } + } + action active-route { + description + "Return the active RIB route that is used for the + destination address. + + Address-family-specific modules MUST augment input + parameters with a leaf named 'destination-address'."; + output { + container route { + description + "The active RIB route for the specified destination. + + If no route exists in the RIB for the destination + address, no output is returned. + + Address-family-specific modules MUST augment this + container with appropriate route contents."; + container next-hop { + description + "Route's next-hop attribute."; + uses next-hop-state-content; + } + uses route-metadata; + } + } + } + leaf description { + type string; + description + "Textual description of the RIB."; + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + container routing-state { + config false; + status obsolete; + description + "State data of the routing subsystem."; + uses router-id { + status obsolete; + description + "Global router ID. + + It may be either configured or assigned algorithmically by + the implementation."; + } + container interfaces { + status obsolete; + description + "Network-layer interfaces used for routing."; + leaf-list interface { + type if:interface-state-ref; + status obsolete; + description + "Each entry is a reference to the name of a configured + network-layer interface."; + } + } + container control-plane-protocols { + status obsolete; + description + "Container for the list of routing protocol instances."; + list control-plane-protocol { + key "type name"; + status obsolete; + description + "State data of a control-plane protocol instance. + + An implementation MUST provide exactly one + system-controlled instance of the 'direct' + pseudo-protocol. Instances of other control-plane + protocols MAY be created by configuration."; + leaf type { + type identityref { + base control-plane-protocol; + } + status obsolete; + description + "Type of the control-plane protocol."; + } + leaf name { + type string; + status obsolete; + description + "The name of the control-plane protocol instance. + + For system-controlled instances, this name is + persistent, i.e., it SHOULD NOT change across + reboots."; + } + } + } + container ribs { + status obsolete; + description + "Container for RIBs."; + list rib { + key "name"; + min-elements 1; + status obsolete; + description + "Each entry represents a RIB identified by the 'name' + key. All routes in a RIB MUST belong to the same address + family. + + An implementation SHOULD provide one system-controlled + default RIB for each supported address family."; + leaf name { + type string; + status obsolete; + description + "The name of the RIB."; + } + uses address-family { + status obsolete; + description + "The address family of the RIB."; + } + leaf default-rib { + if-feature "multiple-ribs"; + type boolean; + default "true"; + status obsolete; + description + "This flag has the value of 'true' if and only if the + RIB is the default RIB for the given address family. + + By default, control-plane protocols place their routes + in the default RIBs."; + } + container routes { + status obsolete; + description + "Current contents of the RIB."; + list route { + status obsolete; + description + "A RIB route entry. This data node MUST be augmented + with information specific to routes of each address + family."; + leaf route-preference { + type route-preference; + status obsolete; + description + "This route attribute, also known as 'administrative + distance', allows for selecting the preferred route + among routes with the same destination prefix. A + smaller value indicates a route that is + more preferred."; + } + container next-hop { + status obsolete; + description + "Route's next-hop attribute."; + uses next-hop-state-content { + status obsolete; + description + "Route's next-hop attribute operational state."; + } + } + uses route-metadata { + status obsolete; + description + "Route metadata."; + } + } + } + action active-route { + status obsolete; + description + "Return the active RIB route that is used for the + destination address. + + Address-family-specific modules MUST augment input + parameters with a leaf named 'destination-address'."; + output { + container route { + status obsolete; + description + "The active RIB route for the specified + destination. + + If no route exists in the RIB for the destination + address, no output is returned. + + Address-family-specific modules MUST augment this + container with appropriate route contents."; + container next-hop { + status obsolete; + description + "Route's next-hop attribute."; + uses next-hop-state-content { + status obsolete; + description + "Active route state data."; + } + } + uses route-metadata { + status obsolete; + description + "Active route metadata."; + } + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-segment-routing-common.yang b/models/ietf/RFC/ietf-segment-routing-common.yang new file mode 100644 index 0000000000000000000000000000000000000000..84b778450669b42150fabaf3dbd613205c07e1cf --- /dev/null +++ b/models/ietf/RFC/ietf-segment-routing-common.yang @@ -0,0 +1,242 @@ +module ietf-segment-routing-common { + yang-version 1.1; + namespace + "urn:ietf:params:xml:ns:yang:ietf-segment-routing-common"; + prefix sr-cmn; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF SPRING - SPRING Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/spring/> + WG List: <mailto:spring@ietf.org> + + Author: Stephane Litkowski + <mailto:slitkows.ietf@gmail.com> + Author: Yingzhen Qu + <mailto:yingzhen.qu@futurewei.com> + Author: Acee Lindem + <mailto:acee@cisco.com> + Author: Pushpasis Sarkar + <mailto:pushpasis.ietf@gmail.com> + Author: Jeff Tantsura + <jefftant.ietf@gmail.com> + + "; + description + "This YANG module defines a collection of generic types and + groupings for Segment Routing (SR), as described in RFC 8402. + + This YANG module conforms to the Network Management + Datastore Architecture (NMDA), as described in RFC 8242. + + 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. + + Copyright (c) 2021 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 Simplified 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 9020; + see the RFC itself for full legal notices."; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + + revision 2021-05-26 { + description + "Initial version"; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + } + + feature sid-last-hop-behavior { + description + "Configurable last-hop behavior."; + reference + "RFC 8660: Segment Routing with the MPLS Data Plane"; + } + + identity prefix-sid-algorithm { + description + "Base identity for prefix-sid algorithm."; + reference + "RFC 8402: Segment Routing Architecture"; + } + + identity prefix-sid-algorithm-shortest-path { + base prefix-sid-algorithm; + description + "Shortest Path First (SPF) Prefix-SID algorithm. This + is the default algorithm."; + } + + identity prefix-sid-algorithm-strict-spf { + base prefix-sid-algorithm; + description + "This algorithm mandates that the packet is forwarded + according to the ECMP-aware SPF algorithm."; + } + + grouping srlr { + description + "Grouping for SR Label Range configuration."; + leaf lower-bound { + type uint32; + description + "Lower value in the label range."; + } + leaf upper-bound { + type uint32; + must '../lower-bound < ../upper-bound' { + error-message + "The upper-bound must be greater than the lower-bound."; + description + "The value must be greater than lower-bound."; + } + description + "Upper value in the label range."; + } + } + + grouping srgb { + description + "Grouping for SR Global Label Range."; + list srgb { + key "lower-bound upper-bound"; + ordered-by user; + description + "List of global blocks to be advertised."; + uses srlr; + } + } + + grouping srlb { + description + "Grouping for SR Local Block Range."; + list srlb { + key "lower-bound upper-bound"; + ordered-by user; + description + "List of SRLBs."; + uses srlr; + } + } + + grouping sid-value-type { + description + "Defines how the SID value is expressed."; + leaf value-type { + type enumeration { + enum index { + description + "The value will be interpreted as an index."; + } + enum absolute { + description + "The value will become interpreted as an absolute + value."; + } + } + default "index"; + description + "This leaf defines how the value must be interpreted."; + } + } + + grouping prefix-sid { + description + "This grouping defines configuration of a Prefix-SID."; + leaf prefix { + type inet:ip-prefix; + description + "Connected Prefix-SID."; + } + uses prefix-sid-attributes; + } + + grouping ipv4-sid { + description + "Grouping for an IPv4 Prefix-SID."; + leaf prefix { + type inet:ipv4-prefix; + description + "Connected IPv4 Prefix-SID."; + } + uses prefix-sid-attributes; + } + + grouping ipv6-sid { + description + "Grouping for an IPv6 Prefix-SID."; + leaf prefix { + type inet:ipv6-prefix; + description + "Connected IPv6 Prefix-SID."; + } + uses prefix-sid-attributes; + } + + grouping last-hop-behavior { + description + "Defines last-hop behavior."; + leaf last-hop-behavior { + if-feature "sid-last-hop-behavior"; + type enumeration { + enum explicit-null { + description + "Use explicit-null for the SID."; + } + enum no-php { + description + "Do not use MPLS Penultimate Hop Popping (PHP) + for the SID."; + } + enum php { + description + "Use MPLS PHP for the SID."; + } + } + description + "Configure last-hop behavior."; + } + } + + grouping prefix-sid-attributes { + description + "Grouping for Segment Routing (SR) prefix attributes."; + uses sid-value-type; + leaf start-sid { + type uint32; + mandatory true; + description + "Value associated with prefix. The value must be + interpreted in the context of sid-value-type."; + } + leaf range { + type uint32; + description + "Indicates how many SIDs can be allocated."; + } + leaf algorithm { + type identityref { + base prefix-sid-algorithm; + } + description + "Prefix-SID algorithm."; + } + } +} diff --git a/models/ietf/RFC/ietf-segment-routing-common@2021-05-26.yang b/models/ietf/RFC/ietf-segment-routing-common@2021-05-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..84b778450669b42150fabaf3dbd613205c07e1cf --- /dev/null +++ b/models/ietf/RFC/ietf-segment-routing-common@2021-05-26.yang @@ -0,0 +1,242 @@ +module ietf-segment-routing-common { + yang-version 1.1; + namespace + "urn:ietf:params:xml:ns:yang:ietf-segment-routing-common"; + prefix sr-cmn; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF SPRING - SPRING Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/spring/> + WG List: <mailto:spring@ietf.org> + + Author: Stephane Litkowski + <mailto:slitkows.ietf@gmail.com> + Author: Yingzhen Qu + <mailto:yingzhen.qu@futurewei.com> + Author: Acee Lindem + <mailto:acee@cisco.com> + Author: Pushpasis Sarkar + <mailto:pushpasis.ietf@gmail.com> + Author: Jeff Tantsura + <jefftant.ietf@gmail.com> + + "; + description + "This YANG module defines a collection of generic types and + groupings for Segment Routing (SR), as described in RFC 8402. + + This YANG module conforms to the Network Management + Datastore Architecture (NMDA), as described in RFC 8242. + + 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. + + Copyright (c) 2021 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 Simplified 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 9020; + see the RFC itself for full legal notices."; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + + revision 2021-05-26 { + description + "Initial version"; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + } + + feature sid-last-hop-behavior { + description + "Configurable last-hop behavior."; + reference + "RFC 8660: Segment Routing with the MPLS Data Plane"; + } + + identity prefix-sid-algorithm { + description + "Base identity for prefix-sid algorithm."; + reference + "RFC 8402: Segment Routing Architecture"; + } + + identity prefix-sid-algorithm-shortest-path { + base prefix-sid-algorithm; + description + "Shortest Path First (SPF) Prefix-SID algorithm. This + is the default algorithm."; + } + + identity prefix-sid-algorithm-strict-spf { + base prefix-sid-algorithm; + description + "This algorithm mandates that the packet is forwarded + according to the ECMP-aware SPF algorithm."; + } + + grouping srlr { + description + "Grouping for SR Label Range configuration."; + leaf lower-bound { + type uint32; + description + "Lower value in the label range."; + } + leaf upper-bound { + type uint32; + must '../lower-bound < ../upper-bound' { + error-message + "The upper-bound must be greater than the lower-bound."; + description + "The value must be greater than lower-bound."; + } + description + "Upper value in the label range."; + } + } + + grouping srgb { + description + "Grouping for SR Global Label Range."; + list srgb { + key "lower-bound upper-bound"; + ordered-by user; + description + "List of global blocks to be advertised."; + uses srlr; + } + } + + grouping srlb { + description + "Grouping for SR Local Block Range."; + list srlb { + key "lower-bound upper-bound"; + ordered-by user; + description + "List of SRLBs."; + uses srlr; + } + } + + grouping sid-value-type { + description + "Defines how the SID value is expressed."; + leaf value-type { + type enumeration { + enum index { + description + "The value will be interpreted as an index."; + } + enum absolute { + description + "The value will become interpreted as an absolute + value."; + } + } + default "index"; + description + "This leaf defines how the value must be interpreted."; + } + } + + grouping prefix-sid { + description + "This grouping defines configuration of a Prefix-SID."; + leaf prefix { + type inet:ip-prefix; + description + "Connected Prefix-SID."; + } + uses prefix-sid-attributes; + } + + grouping ipv4-sid { + description + "Grouping for an IPv4 Prefix-SID."; + leaf prefix { + type inet:ipv4-prefix; + description + "Connected IPv4 Prefix-SID."; + } + uses prefix-sid-attributes; + } + + grouping ipv6-sid { + description + "Grouping for an IPv6 Prefix-SID."; + leaf prefix { + type inet:ipv6-prefix; + description + "Connected IPv6 Prefix-SID."; + } + uses prefix-sid-attributes; + } + + grouping last-hop-behavior { + description + "Defines last-hop behavior."; + leaf last-hop-behavior { + if-feature "sid-last-hop-behavior"; + type enumeration { + enum explicit-null { + description + "Use explicit-null for the SID."; + } + enum no-php { + description + "Do not use MPLS Penultimate Hop Popping (PHP) + for the SID."; + } + enum php { + description + "Use MPLS PHP for the SID."; + } + } + description + "Configure last-hop behavior."; + } + } + + grouping prefix-sid-attributes { + description + "Grouping for Segment Routing (SR) prefix attributes."; + uses sid-value-type; + leaf start-sid { + type uint32; + mandatory true; + description + "Value associated with prefix. The value must be + interpreted in the context of sid-value-type."; + } + leaf range { + type uint32; + description + "Indicates how many SIDs can be allocated."; + } + leaf algorithm { + type identityref { + base prefix-sid-algorithm; + } + description + "Prefix-SID algorithm."; + } + } +} diff --git a/models/ietf/RFC/ietf-segment-routing-mpls.yang b/models/ietf/RFC/ietf-segment-routing-mpls.yang new file mode 100644 index 0000000000000000000000000000000000000000..fa9826e6281bd4da8ad4ab3817932c02749df250 --- /dev/null +++ b/models/ietf/RFC/ietf-segment-routing-mpls.yang @@ -0,0 +1,554 @@ +module ietf-segment-routing-mpls { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls"; + prefix sr-mpls; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing { + prefix rt; + reference + "RFC 8349: A YANG Data Model for Routing + Management (NMDA Version)"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the + Routing Area"; + } + import ietf-segment-routing { + prefix sr; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + } + import ietf-segment-routing-common { + prefix sr-cmn; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + } + + organization + "IETF SPRING - SPRING Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/spring/> + WG List: <mailto:spring@ietf.org> + + Author: Stephane Litkowski + <mailto:slitkows.ietf@gmail.com> + Author: Yingzhen Qu + <mailto:yingzhen.qu@futurewei.com> + Author: Acee Lindem + <mailto:acee@cisco.com> + Author: Pushpasis Sarkar + <mailto:pushpasis.ietf@gmail.com> + Author: Jeff Tantsura + <jefftant.ietf@gmail.com> + + "; + description + "This YANG module defines a generic configuration model for + the Segment Routing MPLS data plane. + + This YANG module conforms to the Network Management + Datastore Architecture (NMDA), as described in RFC 8242. + + 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. + + Copyright (c) 2021 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 Simplified 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 9020; + see the RFC itself for full legal notices."; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + + revision 2021-05-26 { + description + "Initial version"; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + } + + feature mapping-server { + description + "Support for Segment Routing Mapping Server (SRMS)."; + reference + "RFC 8661: Segment Routing MPLS Interworking + with LDP"; + } + + feature protocol-srgb { + description + "Support for per-protocol Segment Routing Global Block + (SRGB) configuration."; + reference + "RFC 8660: Segment Routing with the MPLS + Data Plane"; + } + + typedef system-id { + type string { + pattern '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}'; + } + description + "This type defines an IS-IS system-id using a pattern. + An example system-id is 0143.0438.AEF0."; + } + + typedef router-or-system-id { + type union { + type rt-types:router-id; + type system-id; + } + description + "OSPF/BGP router-id or IS-IS system ID."; + } + + grouping sr-control-plane { + description + "Defines protocol configuration."; + container segment-routing { + description + "Segment Routing global configuration."; + leaf enabled { + type boolean; + default "false"; + description + "Enables Segment Routing control-plane protocol + extensions."; + } + container bindings { + if-feature "mapping-server"; + description + "Control of binding advertisement and reception."; + container advertise { + description + "Control advertisement of local mappings + in binding TLVs."; + leaf-list policies { + type leafref { + path "/rt:routing/sr:segment-routing/sr-mpls:sr-mpls" + + "/sr-mpls:bindings/sr-mpls:mapping-server" + + "/sr-mpls:policy/sr-mpls:name"; + } + description + "List of binding advertisement policies."; + } + } + leaf receive { + type boolean; + default "true"; + description + "Allow the reception and usage of binding TLVs."; + } + } + } + } + + grouping igp-interface { + description + "Grouping for IGP interface configuration."; + container segment-routing { + description + "Container for SR interface configuration."; + container adjacency-sid { + description + "Adjacency SID (Adj-SID) configuration."; + reference + "RFC 8660: Segment Routing with the MPLS + Data Plane"; + list adj-sids { + key "value"; + uses sr-cmn:sid-value-type; + leaf value { + type uint32; + description + "Value of the Adj-SID."; + } + leaf protected { + type boolean; + default "false"; + description + "It is used to protect the Adj-SID, e.g., using + IP Fast Reroute (IPFRR) or MPLS-FRR."; + } + leaf weight { + type uint8; + description + "The load-balancing factor over parallel adjacencies."; + reference + "RFC 8402: Segment Routing Architecture + RFC 8665: OSPF Extensions for Segment Routing + RFC 8667: IS-IS Extensions for Segment + Routing"; + } + description + "List of Adj-SIDs and their configuration."; + } + list advertise-adj-group-sid { + key "group-id"; + description + "Control advertisement of S-flag or G-flag. Enable + advertisement of a common Adj-SID for parallel + links."; + reference + "RFC 8665: OSPF Extensions for Segment Routing, + Section 6.1 + RFC 8667: IS-IS Extensions for Segment + Routing, Section 2.2.1"; + leaf group-id { + type uint32; + description + "The value is an internal value to identify a + group-ID. Interfaces with the same group-ID + will be bundled together."; + } + } + leaf advertise-protection { + type enumeration { + enum single { + description + "A single Adj-SID is associated with the + adjacency and reflects the protection + configuration."; + } + enum dual { + description + "Two Adj-SIDs will be associated with the adjacency + if the interface is protected. In this case, one + Adj-SID will be advertised with the backup-flag + set and the other with the backup-flag clear. In + the case where protection is not configured, a + single Adj-SID will be advertised with the + backup-flag clear."; + } + } + description + "If set, the Adj-SID refers to a protected adjacency."; + reference + "RFC 8665: OSPF Extensions for Segment Routing, + Section 6.1 + RFC 8667: IS-IS Extensions for Segment + Routing, Section 2.2.1"; + } + } + } + } + + augment "/rt:routing/sr:segment-routing" { + description + "This augments the routing data model (RFC 8349) + with Segment Routing (SR) using the MPLS data plane."; + container sr-mpls { + description + "Segment Routing global configuration and + operational state."; + container bindings { + description + "List of bindings."; + container mapping-server { + if-feature "mapping-server"; + description + "Configuration of mapping-server local entries."; + list policy { + key "name"; + description + "List mapping-server policies."; + leaf name { + type string; + description + "Name of the mapping policy."; + } + container entries { + description + "IPv4/IPv6 mapping entries."; + list mapping-entry { + key "prefix algorithm"; + description + "Mapping entries."; + uses sr-cmn:prefix-sid; + } + } + } + } + container connected-prefix-sid-map { + description + "Prefix-SID configuration."; + list connected-prefix-sid { + key "prefix algorithm"; + description + "List of mappings of Prefix-SIDs to IPv4/IPv6 + local prefixes."; + uses sr-cmn:prefix-sid; + uses sr-cmn:last-hop-behavior; + } + } + container local-prefix-sid { + description + "Local SID configuration."; + list local-prefix-sid { + key "prefix algorithm"; + description + "List of local IPv4/IPv6 Prefix-SIDs."; + uses sr-cmn:prefix-sid; + } + } + } + container srgb { + description + "Global SRGB configuration."; + uses sr-cmn:srgb; + } + container srlb { + description + "Segment Routing Local Block (SRLB) configuration."; + uses sr-cmn:srlb; + } + list label-blocks { + config false; + description + "List of label blocks currently in use."; + leaf lower-bound { + type uint32; + description + "Lower bound of the label block."; + } + leaf upper-bound { + type uint32; + description + "Upper bound of the label block."; + } + leaf size { + type uint32; + description + "Number of indexes in the block."; + } + leaf free { + type uint32; + description + "Number of free indexes in the block."; + } + leaf used { + type uint32; + description + "Number of indexes in use in the block."; + } + leaf scope { + type enumeration { + enum global { + description + "Global SID."; + } + enum local { + description + "Local SID."; + } + } + description + "Scope of this label block."; + } + } + container sid-db { + config false; + description + "List of prefix and SID associations."; + list sid { + key "target sid source source-protocol binding-type"; + ordered-by system; + description + "SID binding."; + leaf target { + type string; + description + "Defines the target of the binding. It can be a + prefix or something else."; + } + leaf sid { + type uint32; + description + "Index associated with the prefix."; + } + leaf algorithm { + type uint8; + description + "Algorithm to be used for the Prefix-SID."; + reference + "RFC 8665: OSPF Extensions for Segment Routing + RFC 8667: IS-IS Extensions for Segment + Routing + RFC 8669: Segment Routing Prefix Segment + Identifier Extensions to BGP"; + } + leaf source { + type inet:ip-address; + description + "IP address of the router that owns the binding."; + } + leaf used { + type boolean; + description + "Indicates if the binding is installed in the + forwarding plane."; + } + leaf source-protocol { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Routing protocol that owns the binding."; + } + leaf binding-type { + type enumeration { + enum prefix-sid { + description + "Binding is learned from a Prefix-SID."; + } + enum binding-tlv { + description + "Binding is learned from a binding TLV."; + } + } + description + "Type of binding."; + } + leaf scope { + type enumeration { + enum global { + description + "Global SID."; + } + enum local { + description + "Local SID."; + } + } + description + "SID scoping."; + } + } + } + } + } + + notification segment-routing-srgb-collision { + description + "This notification is sent when SRGB blocks received from + different routers collide."; + list srgb-collisions { + description + "List of SRGB blocks that collide."; + leaf lower-bound { + type uint32; + description + "Lower value in the block."; + } + leaf upper-bound { + type uint32; + description + "Upper value in the block."; + } + leaf routing-protocol { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Routing protocol reference for SRGB collision."; + } + leaf originating-rtr-id { + type router-or-system-id; + description + "Originating router ID of this SRGB block."; + } + } + } + + notification segment-routing-global-sid-collision { + description + "This notification is sent when a new mapping is learned + containing a mapping where the SID is already used. + The notification generation must be throttled with at least + a 5-second gap between notifications."; + leaf received-target { + type string; + description + "Target received in the router advertisement that caused + the SID collision."; + } + leaf new-sid-rtr-id { + type router-or-system-id; + description + "Router ID that advertised the colliding SID."; + } + leaf original-target { + type string; + description + "Target already available in the database with the same SID + as the received target."; + } + leaf original-sid-rtr-id { + type router-or-system-id; + description + "Router ID for the router that originally advertised the + colliding SID, i.e., the instance in the database."; + } + leaf index { + type uint32; + description + "Value of the index used by two different prefixes."; + } + leaf routing-protocol { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Routing protocol reference for colliding SID."; + } + } + + notification segment-routing-index-out-of-range { + description + "This notification is sent when a binding is received + containing a segment index that is out of the local + configured ranges. The notification generation must be + throttled with at least a 5-second gap between + notifications."; + leaf received-target { + type string; + description + "A human-readable string representing the target + received in the protocol-specific advertisement + corresponding to the out-of-range index."; + } + leaf received-index { + type uint32; + description + "Value of the index received."; + } + leaf routing-protocol { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Routing protocol reference for out-of-range indexed."; + } + } +} diff --git a/models/ietf/RFC/ietf-segment-routing-mpls@2021-05-26.yang b/models/ietf/RFC/ietf-segment-routing-mpls@2021-05-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..fa9826e6281bd4da8ad4ab3817932c02749df250 --- /dev/null +++ b/models/ietf/RFC/ietf-segment-routing-mpls@2021-05-26.yang @@ -0,0 +1,554 @@ +module ietf-segment-routing-mpls { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls"; + prefix sr-mpls; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing { + prefix rt; + reference + "RFC 8349: A YANG Data Model for Routing + Management (NMDA Version)"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the + Routing Area"; + } + import ietf-segment-routing { + prefix sr; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + } + import ietf-segment-routing-common { + prefix sr-cmn; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + } + + organization + "IETF SPRING - SPRING Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/spring/> + WG List: <mailto:spring@ietf.org> + + Author: Stephane Litkowski + <mailto:slitkows.ietf@gmail.com> + Author: Yingzhen Qu + <mailto:yingzhen.qu@futurewei.com> + Author: Acee Lindem + <mailto:acee@cisco.com> + Author: Pushpasis Sarkar + <mailto:pushpasis.ietf@gmail.com> + Author: Jeff Tantsura + <jefftant.ietf@gmail.com> + + "; + description + "This YANG module defines a generic configuration model for + the Segment Routing MPLS data plane. + + This YANG module conforms to the Network Management + Datastore Architecture (NMDA), as described in RFC 8242. + + 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. + + Copyright (c) 2021 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 Simplified 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 9020; + see the RFC itself for full legal notices."; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + + revision 2021-05-26 { + description + "Initial version"; + reference + "RFC 9020: YANG Data Model for Segment Routing"; + } + + feature mapping-server { + description + "Support for Segment Routing Mapping Server (SRMS)."; + reference + "RFC 8661: Segment Routing MPLS Interworking + with LDP"; + } + + feature protocol-srgb { + description + "Support for per-protocol Segment Routing Global Block + (SRGB) configuration."; + reference + "RFC 8660: Segment Routing with the MPLS + Data Plane"; + } + + typedef system-id { + type string { + pattern '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}'; + } + description + "This type defines an IS-IS system-id using a pattern. + An example system-id is 0143.0438.AEF0."; + } + + typedef router-or-system-id { + type union { + type rt-types:router-id; + type system-id; + } + description + "OSPF/BGP router-id or IS-IS system ID."; + } + + grouping sr-control-plane { + description + "Defines protocol configuration."; + container segment-routing { + description + "Segment Routing global configuration."; + leaf enabled { + type boolean; + default "false"; + description + "Enables Segment Routing control-plane protocol + extensions."; + } + container bindings { + if-feature "mapping-server"; + description + "Control of binding advertisement and reception."; + container advertise { + description + "Control advertisement of local mappings + in binding TLVs."; + leaf-list policies { + type leafref { + path "/rt:routing/sr:segment-routing/sr-mpls:sr-mpls" + + "/sr-mpls:bindings/sr-mpls:mapping-server" + + "/sr-mpls:policy/sr-mpls:name"; + } + description + "List of binding advertisement policies."; + } + } + leaf receive { + type boolean; + default "true"; + description + "Allow the reception and usage of binding TLVs."; + } + } + } + } + + grouping igp-interface { + description + "Grouping for IGP interface configuration."; + container segment-routing { + description + "Container for SR interface configuration."; + container adjacency-sid { + description + "Adjacency SID (Adj-SID) configuration."; + reference + "RFC 8660: Segment Routing with the MPLS + Data Plane"; + list adj-sids { + key "value"; + uses sr-cmn:sid-value-type; + leaf value { + type uint32; + description + "Value of the Adj-SID."; + } + leaf protected { + type boolean; + default "false"; + description + "It is used to protect the Adj-SID, e.g., using + IP Fast Reroute (IPFRR) or MPLS-FRR."; + } + leaf weight { + type uint8; + description + "The load-balancing factor over parallel adjacencies."; + reference + "RFC 8402: Segment Routing Architecture + RFC 8665: OSPF Extensions for Segment Routing + RFC 8667: IS-IS Extensions for Segment + Routing"; + } + description + "List of Adj-SIDs and their configuration."; + } + list advertise-adj-group-sid { + key "group-id"; + description + "Control advertisement of S-flag or G-flag. Enable + advertisement of a common Adj-SID for parallel + links."; + reference + "RFC 8665: OSPF Extensions for Segment Routing, + Section 6.1 + RFC 8667: IS-IS Extensions for Segment + Routing, Section 2.2.1"; + leaf group-id { + type uint32; + description + "The value is an internal value to identify a + group-ID. Interfaces with the same group-ID + will be bundled together."; + } + } + leaf advertise-protection { + type enumeration { + enum single { + description + "A single Adj-SID is associated with the + adjacency and reflects the protection + configuration."; + } + enum dual { + description + "Two Adj-SIDs will be associated with the adjacency + if the interface is protected. In this case, one + Adj-SID will be advertised with the backup-flag + set and the other with the backup-flag clear. In + the case where protection is not configured, a + single Adj-SID will be advertised with the + backup-flag clear."; + } + } + description + "If set, the Adj-SID refers to a protected adjacency."; + reference + "RFC 8665: OSPF Extensions for Segment Routing, + Section 6.1 + RFC 8667: IS-IS Extensions for Segment + Routing, Section 2.2.1"; + } + } + } + } + + augment "/rt:routing/sr:segment-routing" { + description + "This augments the routing data model (RFC 8349) + with Segment Routing (SR) using the MPLS data plane."; + container sr-mpls { + description + "Segment Routing global configuration and + operational state."; + container bindings { + description + "List of bindings."; + container mapping-server { + if-feature "mapping-server"; + description + "Configuration of mapping-server local entries."; + list policy { + key "name"; + description + "List mapping-server policies."; + leaf name { + type string; + description + "Name of the mapping policy."; + } + container entries { + description + "IPv4/IPv6 mapping entries."; + list mapping-entry { + key "prefix algorithm"; + description + "Mapping entries."; + uses sr-cmn:prefix-sid; + } + } + } + } + container connected-prefix-sid-map { + description + "Prefix-SID configuration."; + list connected-prefix-sid { + key "prefix algorithm"; + description + "List of mappings of Prefix-SIDs to IPv4/IPv6 + local prefixes."; + uses sr-cmn:prefix-sid; + uses sr-cmn:last-hop-behavior; + } + } + container local-prefix-sid { + description + "Local SID configuration."; + list local-prefix-sid { + key "prefix algorithm"; + description + "List of local IPv4/IPv6 Prefix-SIDs."; + uses sr-cmn:prefix-sid; + } + } + } + container srgb { + description + "Global SRGB configuration."; + uses sr-cmn:srgb; + } + container srlb { + description + "Segment Routing Local Block (SRLB) configuration."; + uses sr-cmn:srlb; + } + list label-blocks { + config false; + description + "List of label blocks currently in use."; + leaf lower-bound { + type uint32; + description + "Lower bound of the label block."; + } + leaf upper-bound { + type uint32; + description + "Upper bound of the label block."; + } + leaf size { + type uint32; + description + "Number of indexes in the block."; + } + leaf free { + type uint32; + description + "Number of free indexes in the block."; + } + leaf used { + type uint32; + description + "Number of indexes in use in the block."; + } + leaf scope { + type enumeration { + enum global { + description + "Global SID."; + } + enum local { + description + "Local SID."; + } + } + description + "Scope of this label block."; + } + } + container sid-db { + config false; + description + "List of prefix and SID associations."; + list sid { + key "target sid source source-protocol binding-type"; + ordered-by system; + description + "SID binding."; + leaf target { + type string; + description + "Defines the target of the binding. It can be a + prefix or something else."; + } + leaf sid { + type uint32; + description + "Index associated with the prefix."; + } + leaf algorithm { + type uint8; + description + "Algorithm to be used for the Prefix-SID."; + reference + "RFC 8665: OSPF Extensions for Segment Routing + RFC 8667: IS-IS Extensions for Segment + Routing + RFC 8669: Segment Routing Prefix Segment + Identifier Extensions to BGP"; + } + leaf source { + type inet:ip-address; + description + "IP address of the router that owns the binding."; + } + leaf used { + type boolean; + description + "Indicates if the binding is installed in the + forwarding plane."; + } + leaf source-protocol { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Routing protocol that owns the binding."; + } + leaf binding-type { + type enumeration { + enum prefix-sid { + description + "Binding is learned from a Prefix-SID."; + } + enum binding-tlv { + description + "Binding is learned from a binding TLV."; + } + } + description + "Type of binding."; + } + leaf scope { + type enumeration { + enum global { + description + "Global SID."; + } + enum local { + description + "Local SID."; + } + } + description + "SID scoping."; + } + } + } + } + } + + notification segment-routing-srgb-collision { + description + "This notification is sent when SRGB blocks received from + different routers collide."; + list srgb-collisions { + description + "List of SRGB blocks that collide."; + leaf lower-bound { + type uint32; + description + "Lower value in the block."; + } + leaf upper-bound { + type uint32; + description + "Upper value in the block."; + } + leaf routing-protocol { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Routing protocol reference for SRGB collision."; + } + leaf originating-rtr-id { + type router-or-system-id; + description + "Originating router ID of this SRGB block."; + } + } + } + + notification segment-routing-global-sid-collision { + description + "This notification is sent when a new mapping is learned + containing a mapping where the SID is already used. + The notification generation must be throttled with at least + a 5-second gap between notifications."; + leaf received-target { + type string; + description + "Target received in the router advertisement that caused + the SID collision."; + } + leaf new-sid-rtr-id { + type router-or-system-id; + description + "Router ID that advertised the colliding SID."; + } + leaf original-target { + type string; + description + "Target already available in the database with the same SID + as the received target."; + } + leaf original-sid-rtr-id { + type router-or-system-id; + description + "Router ID for the router that originally advertised the + colliding SID, i.e., the instance in the database."; + } + leaf index { + type uint32; + description + "Value of the index used by two different prefixes."; + } + leaf routing-protocol { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Routing protocol reference for colliding SID."; + } + } + + notification segment-routing-index-out-of-range { + description + "This notification is sent when a binding is received + containing a segment index that is out of the local + configured ranges. The notification generation must be + throttled with at least a 5-second gap between + notifications."; + leaf received-target { + type string; + description + "A human-readable string representing the target + received in the protocol-specific advertisement + corresponding to the out-of-range index."; + } + leaf received-index { + type uint32; + description + "Value of the index received."; + } + leaf routing-protocol { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Routing protocol reference for out-of-range indexed."; + } + } +} diff --git a/models/ietf/RFC/ietf-segment-routing.yang b/models/ietf/RFC/ietf-segment-routing.yang new file mode 100644 index 0000000000000000000000000000000000000000..ac82cfab85eb7f09de61b58c788dca51d81569fa --- /dev/null +++ b/models/ietf/RFC/ietf-segment-routing.yang @@ -0,0 +1,80 @@ +module ietf-segment-routing { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing"; + prefix sr; + + import ietf-routing { + prefix rt; + reference "RFC 8349: A YANG Data Model for Routing + Management (NMDA Version)"; + } + + organization + "IETF SPRING - SPRING Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/spring/> + WG List: <mailto:spring@ietf.org> + + Author: Stephane Litkowski + <mailto:slitkows.ietf@gmail.com> + Author: Yingzhen Qu + <mailto:yingzhen.qu@futurewei.com> + Author: Acee Lindem + <mailto:acee@cisco.com> + Author: Pushpasis Sarkar + <mailto:pushpasis.ietf@gmail.com> + Author: Jeff Tantsura + <jefftant.ietf@gmail.com> + + "; + description + "This YANG module defines a generic framework for Segment + Routing (SR). It is to be augmented by models for different + SR data planes. + + This YANG module conforms to the Network Management + Datastore Architecture (NMDA), as described in RFC 8242. + + 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. + + Copyright (c) 2021 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 Simplified 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 9020; + see the RFC itself for full legal notices."; + + reference + "RFC 9020: YANG Data Model for Segment Routing."; + + revision 2021-05-26 { + description + "Initial version"; + reference + "RFC 9020: YANG Data Model for Segment Routing."; + } + + augment "/rt:routing" { + description + "This module augments the routing data model (RFC 8349) + with Segment Routing (SR)."; + container segment-routing { + description + "Segment Routing configuration. This container + is to be augmented by models for different SR + data planes."; + reference + "RFC 8402: Segment Routing Architecture."; + } + } +} diff --git a/models/ietf/RFC/ietf-segment-routing@2021-05-26.yang b/models/ietf/RFC/ietf-segment-routing@2021-05-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..ac82cfab85eb7f09de61b58c788dca51d81569fa --- /dev/null +++ b/models/ietf/RFC/ietf-segment-routing@2021-05-26.yang @@ -0,0 +1,80 @@ +module ietf-segment-routing { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing"; + prefix sr; + + import ietf-routing { + prefix rt; + reference "RFC 8349: A YANG Data Model for Routing + Management (NMDA Version)"; + } + + organization + "IETF SPRING - SPRING Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/spring/> + WG List: <mailto:spring@ietf.org> + + Author: Stephane Litkowski + <mailto:slitkows.ietf@gmail.com> + Author: Yingzhen Qu + <mailto:yingzhen.qu@futurewei.com> + Author: Acee Lindem + <mailto:acee@cisco.com> + Author: Pushpasis Sarkar + <mailto:pushpasis.ietf@gmail.com> + Author: Jeff Tantsura + <jefftant.ietf@gmail.com> + + "; + description + "This YANG module defines a generic framework for Segment + Routing (SR). It is to be augmented by models for different + SR data planes. + + This YANG module conforms to the Network Management + Datastore Architecture (NMDA), as described in RFC 8242. + + 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. + + Copyright (c) 2021 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 Simplified 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 9020; + see the RFC itself for full legal notices."; + + reference + "RFC 9020: YANG Data Model for Segment Routing."; + + revision 2021-05-26 { + description + "Initial version"; + reference + "RFC 9020: YANG Data Model for Segment Routing."; + } + + augment "/rt:routing" { + description + "This module augments the routing data model (RFC 8349) + with Segment Routing (SR)."; + container segment-routing { + description + "Segment Routing configuration. This container + is to be augmented by models for different SR + data planes."; + reference + "RFC 8402: Segment Routing Architecture."; + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-common.yang b/models/ietf/RFC/ietf-snmp-common.yang new file mode 100644 index 0000000000000000000000000000000000000000..a7d27c29397a50ae01ebc901bfc29016a55f7e21 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-common.yang @@ -0,0 +1,184 @@ +submodule ietf-snmp-common { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of common YANG definitions + for configuring SNMP engines. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + /* Collection of SNMP-specific data types */ + + typedef admin-string { + type string { + length "0..255"; + } + description + "Represents SnmpAdminString as defined in RFC 3411. + + Note that the size of an SnmpAdminString is measured in + octets, not characters."; + + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks. + SNMP-FRAMEWORK-MIB.SnmpAdminString"; + } + + typedef identifier { + type admin-string { + length "1..32"; + } + description + "Identifiers are used to name items in the SNMP configuration + datastore."; + } + + typedef context-name { + type admin-string { + length "0..32"; + } + description + "The context type represents an SNMP context name."; + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef security-name { + type admin-string { + length "1..32"; + } + description + "The security-name type represents an SNMP security name."; + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef security-model { + type union { + type enumeration { + enum v1 { value 1; } + enum v2c { value 2; } + enum usm { value 3; } + enum tsm { value 4; } + } + type int32 { + range "1..2147483647"; + } + } + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef security-model-or-any { + type union { + type enumeration { + enum any { value 0; } + } + type security-model; + } + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef security-level { + type enumeration { + enum no-auth-no-priv { value 1; } + enum auth-no-priv { value 2; } + enum auth-priv { value 3; } + } + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef engine-id { + type yang:hex-string { + pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){4,31}'; + } + description + "The engine ID specified as a list of colon-specified + hexadecimal octets, e.g., '80:00:02:b8:04:61:62:63'."; + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef wildcard-object-identifier { + type string; + description + "The wildcard-object-identifier type represents an SNMP object + identifier where subidentifiers can be given either as a label, + in numeric form, or a wildcard, represented by an asterisk + ('*')."; + } + + typedef tag-value { + type string { + length "0..255"; + } + description + "Represents SnmpTagValue as defined in RFC 3413. + + Note that the size of an SnmpTagValue is measured in + octets, not characters."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications. + SNMP-TARGET-MIB.SnmpTagValue"; + } + + container snmp { + description + "Top-level container for SNMP-related configuration and + status objects."; + } + +} diff --git a/models/ietf/RFC/ietf-snmp-common@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-common@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..a7d27c29397a50ae01ebc901bfc29016a55f7e21 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-common@2014-12-10.yang @@ -0,0 +1,184 @@ +submodule ietf-snmp-common { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of common YANG definitions + for configuring SNMP engines. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + /* Collection of SNMP-specific data types */ + + typedef admin-string { + type string { + length "0..255"; + } + description + "Represents SnmpAdminString as defined in RFC 3411. + + Note that the size of an SnmpAdminString is measured in + octets, not characters."; + + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks. + SNMP-FRAMEWORK-MIB.SnmpAdminString"; + } + + typedef identifier { + type admin-string { + length "1..32"; + } + description + "Identifiers are used to name items in the SNMP configuration + datastore."; + } + + typedef context-name { + type admin-string { + length "0..32"; + } + description + "The context type represents an SNMP context name."; + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef security-name { + type admin-string { + length "1..32"; + } + description + "The security-name type represents an SNMP security name."; + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef security-model { + type union { + type enumeration { + enum v1 { value 1; } + enum v2c { value 2; } + enum usm { value 3; } + enum tsm { value 4; } + } + type int32 { + range "1..2147483647"; + } + } + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef security-model-or-any { + type union { + type enumeration { + enum any { value 0; } + } + type security-model; + } + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef security-level { + type enumeration { + enum no-auth-no-priv { value 1; } + enum auth-no-priv { value 2; } + enum auth-priv { value 3; } + } + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef engine-id { + type yang:hex-string { + pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){4,31}'; + } + description + "The engine ID specified as a list of colon-specified + hexadecimal octets, e.g., '80:00:02:b8:04:61:62:63'."; + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management Frameworks"; + } + + typedef wildcard-object-identifier { + type string; + description + "The wildcard-object-identifier type represents an SNMP object + identifier where subidentifiers can be given either as a label, + in numeric form, or a wildcard, represented by an asterisk + ('*')."; + } + + typedef tag-value { + type string { + length "0..255"; + } + description + "Represents SnmpTagValue as defined in RFC 3413. + + Note that the size of an SnmpTagValue is measured in + octets, not characters."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications. + SNMP-TARGET-MIB.SnmpTagValue"; + } + + container snmp { + description + "Top-level container for SNMP-related configuration and + status objects."; + } + +} diff --git a/models/ietf/RFC/ietf-snmp-community.yang b/models/ietf/RFC/ietf-snmp-community.yang new file mode 100644 index 0000000000000000000000000000000000000000..6bddf1a28d94ab951d00c51b5981bbf0a1f07669 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-community.yang @@ -0,0 +1,241 @@ +submodule ietf-snmp-community { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-netconf-acm { + prefix nacm; + } + + include ietf-snmp-common; + include ietf-snmp-target; + include ietf-snmp-proxy; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring community-based SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3584: Coexistence between Version 1, Version 2, and + Version 3 of the Internet-standard Network + Management Framework"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + augment /snmp:snmp { + + list community { + key index; + + description + "List of communities."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityTable"; + + leaf index { + type snmp:identifier; + description + "Index into the community list."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityIndex"; + } + choice name { + nacm:default-deny-all; + description + "The community name, specified as either a string or + a binary value. The binary name is used when the + community name contains characters that are not legal + in a string. + + If not set, the value of 'security-name' is operationally + used as the snmpCommunityName."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityName"; + leaf text-name { + type string; + description + "A community name that can be represented as a + YANG string."; + } + leaf binary-name { + type binary; + description + "A community name represented as a binary value."; + } + } + leaf security-name { + type snmp:security-name; + mandatory true; + nacm:default-deny-all; + description + "The snmpCommunitySecurityName of this entry."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunitySecurityName"; + } + leaf engine-id { + if-feature snmp:proxy; + type snmp:engine-id; + description + "If not set, the value of the local SNMP engine is + operationally used by the device."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityContextEngineID"; + } + leaf context { + type snmp:context-name; + default ""; + description + "The context in which management information is accessed + when using the community string specified by this entry."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityContextName"; + } + leaf target-tag { + type snmp:tag-value; + description + "Used to limit access for this community to the specified + targets. + + Implementations MAY restrict the values of this leaf + to be one of the available values of /snmp/target/tag in + a valid configuration."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityTransportTag"; + } + } + } + + grouping v1-target-params { + container v1 { + description + "SNMPv1 parameters type. + Represents snmpTargetParamsMPModel '0', + snmpTargetParamsSecurityModel '1', and + snmpTargetParamsSecurityLevel 'noAuthNoPriv'."; + leaf security-name { + type snmp:security-name; + mandatory true; + description + "Implementations MAY restrict the values of this leaf + to be one of the available values of + /snmp/community/security-name in a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityName"; + } + } + } + + grouping v2c-target-params { + container v2c { + description + "SNMPv2 community parameters type. + Represents snmpTargetParamsMPModel '1', + snmpTargetParamsSecurityModel '2', and + snmpTargetParamsSecurityLevel 'noAuthNoPriv'."; + leaf security-name { + type snmp:security-name; + mandatory true; + description + "Implementations MAY restrict the values of this leaf + to be one of the available values of + /snmp/community/security-name in a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityName"; + } + } + } + + augment /snmp:snmp/snmp:target-params/snmp:params { + case v1 { + uses v1-target-params; + } + case v2c { + uses v2c-target-params; + } + } + + augment /snmp:snmp/snmp:target { + when "snmp:v1 or snmp:v2c"; + leaf mms { + type union { + type enumeration { + enum "unknown" { value 0; } + } + type int32 { + range "484..max"; + } + } + default "484"; + description + "The maximum message size."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpTargetAddrMMS"; + } + } + +} diff --git a/models/ietf/RFC/ietf-snmp-community@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-community@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..6bddf1a28d94ab951d00c51b5981bbf0a1f07669 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-community@2014-12-10.yang @@ -0,0 +1,241 @@ +submodule ietf-snmp-community { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-netconf-acm { + prefix nacm; + } + + include ietf-snmp-common; + include ietf-snmp-target; + include ietf-snmp-proxy; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring community-based SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3584: Coexistence between Version 1, Version 2, and + Version 3 of the Internet-standard Network + Management Framework"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + augment /snmp:snmp { + + list community { + key index; + + description + "List of communities."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityTable"; + + leaf index { + type snmp:identifier; + description + "Index into the community list."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityIndex"; + } + choice name { + nacm:default-deny-all; + description + "The community name, specified as either a string or + a binary value. The binary name is used when the + community name contains characters that are not legal + in a string. + + If not set, the value of 'security-name' is operationally + used as the snmpCommunityName."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityName"; + leaf text-name { + type string; + description + "A community name that can be represented as a + YANG string."; + } + leaf binary-name { + type binary; + description + "A community name represented as a binary value."; + } + } + leaf security-name { + type snmp:security-name; + mandatory true; + nacm:default-deny-all; + description + "The snmpCommunitySecurityName of this entry."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunitySecurityName"; + } + leaf engine-id { + if-feature snmp:proxy; + type snmp:engine-id; + description + "If not set, the value of the local SNMP engine is + operationally used by the device."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityContextEngineID"; + } + leaf context { + type snmp:context-name; + default ""; + description + "The context in which management information is accessed + when using the community string specified by this entry."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityContextName"; + } + leaf target-tag { + type snmp:tag-value; + description + "Used to limit access for this community to the specified + targets. + + Implementations MAY restrict the values of this leaf + to be one of the available values of /snmp/target/tag in + a valid configuration."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpCommunityTransportTag"; + } + } + } + + grouping v1-target-params { + container v1 { + description + "SNMPv1 parameters type. + Represents snmpTargetParamsMPModel '0', + snmpTargetParamsSecurityModel '1', and + snmpTargetParamsSecurityLevel 'noAuthNoPriv'."; + leaf security-name { + type snmp:security-name; + mandatory true; + description + "Implementations MAY restrict the values of this leaf + to be one of the available values of + /snmp/community/security-name in a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityName"; + } + } + } + + grouping v2c-target-params { + container v2c { + description + "SNMPv2 community parameters type. + Represents snmpTargetParamsMPModel '1', + snmpTargetParamsSecurityModel '2', and + snmpTargetParamsSecurityLevel 'noAuthNoPriv'."; + leaf security-name { + type snmp:security-name; + mandatory true; + description + "Implementations MAY restrict the values of this leaf + to be one of the available values of + /snmp/community/security-name in a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityName"; + } + } + } + + augment /snmp:snmp/snmp:target-params/snmp:params { + case v1 { + uses v1-target-params; + } + case v2c { + uses v2c-target-params; + } + } + + augment /snmp:snmp/snmp:target { + when "snmp:v1 or snmp:v2c"; + leaf mms { + type union { + type enumeration { + enum "unknown" { value 0; } + } + type int32 { + range "484..max"; + } + } + default "484"; + description + "The maximum message size."; + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpTargetAddrMMS"; + } + } + +} diff --git a/models/ietf/RFC/ietf-snmp-engine.yang b/models/ietf/RFC/ietf-snmp-engine.yang new file mode 100644 index 0000000000000000000000000000000000000000..4b412aebe25b3a6206c522bc48e787ebb4879155 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-engine.yang @@ -0,0 +1,155 @@ +submodule ietf-snmp-engine { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-inet-types { + prefix inet; + } + + include ietf-snmp-common; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring SNMP engines. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + augment /snmp:snmp { + + container engine { + + description + "Configuration of the SNMP engine."; + + leaf enabled { + type boolean; + default "false"; + description + "Enables the SNMP engine."; + } + + list listen { + key "name"; + description + "Configuration of the transport endpoints on which the + engine listens."; + + leaf name { + type snmp:identifier; + description + "An arbitrary name for the list entry."; + } + + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + endpoint. Submodules providing configuration for + additional transports are expected to augment this + choice."; + case udp { + container udp { + leaf ip { + type inet:ip-address; + mandatory true; + description + "The IPv4 or IPv6 address on which the engine + listens."; + } + leaf port { + type inet:port-number; + description + "The UDP port on which the engine listens. + + If the port is not configured, an engine that + acts as a Command Responder uses port 161, and + an engine that acts as a Notification Receiver + uses port 162."; + } + } + } + } + } + + container version { + description + "SNMP version used by the engine."; + leaf v1 { + type empty; + } + leaf v2c { + type empty; + } + leaf v3 { + type empty; + } + } + + leaf engine-id { + type snmp:engine-id; + description + "The local SNMP engine's administratively assigned unique + identifier. + + If this leaf is not set, the device automatically + calculates an engine ID, as described in RFC 3411. A + server MAY initialize this leaf with the automatically + created value."; + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management + Frameworks. + SNMP-FRAMEWORK-MIB.snmpEngineID"; + } + + leaf enable-authen-traps { + type boolean; + description + "Indicates whether the SNMP entity is permitted to + generate authenticationFailure traps."; + reference + "RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.snmpEnableAuthenTraps"; + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-engine@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-engine@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..4b412aebe25b3a6206c522bc48e787ebb4879155 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-engine@2014-12-10.yang @@ -0,0 +1,155 @@ +submodule ietf-snmp-engine { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-inet-types { + prefix inet; + } + + include ietf-snmp-common; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring SNMP engines. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + augment /snmp:snmp { + + container engine { + + description + "Configuration of the SNMP engine."; + + leaf enabled { + type boolean; + default "false"; + description + "Enables the SNMP engine."; + } + + list listen { + key "name"; + description + "Configuration of the transport endpoints on which the + engine listens."; + + leaf name { + type snmp:identifier; + description + "An arbitrary name for the list entry."; + } + + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + endpoint. Submodules providing configuration for + additional transports are expected to augment this + choice."; + case udp { + container udp { + leaf ip { + type inet:ip-address; + mandatory true; + description + "The IPv4 or IPv6 address on which the engine + listens."; + } + leaf port { + type inet:port-number; + description + "The UDP port on which the engine listens. + + If the port is not configured, an engine that + acts as a Command Responder uses port 161, and + an engine that acts as a Notification Receiver + uses port 162."; + } + } + } + } + } + + container version { + description + "SNMP version used by the engine."; + leaf v1 { + type empty; + } + leaf v2c { + type empty; + } + leaf v3 { + type empty; + } + } + + leaf engine-id { + type snmp:engine-id; + description + "The local SNMP engine's administratively assigned unique + identifier. + + If this leaf is not set, the device automatically + calculates an engine ID, as described in RFC 3411. A + server MAY initialize this leaf with the automatically + created value."; + reference + "RFC 3411: An Architecture for Describing Simple Network + Management Protocol (SNMP) Management + Frameworks. + SNMP-FRAMEWORK-MIB.snmpEngineID"; + } + + leaf enable-authen-traps { + type boolean; + description + "Indicates whether the SNMP entity is permitted to + generate authenticationFailure traps."; + reference + "RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.snmpEnableAuthenTraps"; + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-notification.yang b/models/ietf/RFC/ietf-snmp-notification.yang new file mode 100644 index 0000000000000000000000000000000000000000..ea4a86cf1b5afd20d1ae82e67a40958a3c25f4cf --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-notification.yang @@ -0,0 +1,204 @@ +submodule ietf-snmp-notification { + + belongs-to ietf-snmp { + prefix snmp; + } + + include ietf-snmp-common; + include ietf-snmp-target; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring SNMP notifications. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature notification-filter { + description + "A server implements this feature if it supports SNMP + notification filtering."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + } + + augment /snmp:snmp { + + list notify { + key name; + description + "Targets that will receive notifications. + + Entries in this list are mapped 1-1 to entries in + snmpNotifyTable, except that if an entry in snmpNotifyTable + has an snmpNotifyTag for which no snmpTargetAddrEntry + exists, then the snmpNotifyTable entry is not mapped to an + entry in this list."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyTable"; + + leaf name { + type snmp:identifier; + description + "An arbitrary name for the list entry."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyName"; + } + leaf tag { + type snmp:tag-value; + mandatory true; + description + "Target tag, selects a set of notification targets. + + Implementations MAY restrict the values of this leaf + to be one of the available values of /snmp/target/tag in + a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyTag"; + } + leaf type { + type enumeration { + enum trap { value 1; } + enum inform { value 2; } + } + default trap; + description + "Defines the notification type to be generated."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyType"; + } + } + + list notify-filter-profile { + if-feature snmp:notification-filter; + key name; + + description + "Notification filter profiles. + + The leaf /snmp/target/notify-filter-profile is used + to associate a filter profile with a target. + + If an entry in this list is referred to by one or more + /snmp/target/notify-filter-profile items, each such + notify-filter-profile is represented by one + snmpNotifyFilterProfileEntry. + + If an entry in this list is not referred to by any + /snmp/target/notify-filter-profile, the entry is not mapped + to snmpNotifyFilterProfileTable."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileTable + SNMP-NOTIFICATION-MIB.snmpNotifyFilterTable"; + + leaf name { + type snmp:identifier; + description + "Name of the filter profile."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileName"; + } + + leaf-list include { + type snmp:wildcard-object-identifier; + description + "A family of subtrees included in this filter."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterSubtree + SNMP-NOTIFICATION-MIB.snmpNotifyFilterMask + SNMP-NOTIFICATION-MIB.snmpNotifyFilterType"; + } + + leaf-list exclude { + type snmp:wildcard-object-identifier; + description + "A family of subtrees excluded from this filter."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterSubtree + SNMP-NOTIFICATION-MIB.snmpNotifyFilterMask + SNMP-NOTIFICATION-MIB.snmpNotifyFilterType"; + } + } + + } + + augment /snmp:snmp/snmp:target-params { + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileTable"; + leaf notify-filter-profile { + if-feature snmp:notification-filter; + type leafref { + path "/snmp/notify-filter-profile/name"; + } + description + "This leafref leaf is used to represent the sparse + relationship between the /snmp/target-params list and the + /snmp/notify-filter-profile list."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileName"; + } + } + +} diff --git a/models/ietf/RFC/ietf-snmp-notification@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-notification@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..ea4a86cf1b5afd20d1ae82e67a40958a3c25f4cf --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-notification@2014-12-10.yang @@ -0,0 +1,204 @@ +submodule ietf-snmp-notification { + + belongs-to ietf-snmp { + prefix snmp; + } + + include ietf-snmp-common; + include ietf-snmp-target; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring SNMP notifications. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature notification-filter { + description + "A server implements this feature if it supports SNMP + notification filtering."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + } + + augment /snmp:snmp { + + list notify { + key name; + description + "Targets that will receive notifications. + + Entries in this list are mapped 1-1 to entries in + snmpNotifyTable, except that if an entry in snmpNotifyTable + has an snmpNotifyTag for which no snmpTargetAddrEntry + exists, then the snmpNotifyTable entry is not mapped to an + entry in this list."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyTable"; + + leaf name { + type snmp:identifier; + description + "An arbitrary name for the list entry."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyName"; + } + leaf tag { + type snmp:tag-value; + mandatory true; + description + "Target tag, selects a set of notification targets. + + Implementations MAY restrict the values of this leaf + to be one of the available values of /snmp/target/tag in + a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyTag"; + } + leaf type { + type enumeration { + enum trap { value 1; } + enum inform { value 2; } + } + default trap; + description + "Defines the notification type to be generated."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyType"; + } + } + + list notify-filter-profile { + if-feature snmp:notification-filter; + key name; + + description + "Notification filter profiles. + + The leaf /snmp/target/notify-filter-profile is used + to associate a filter profile with a target. + + If an entry in this list is referred to by one or more + /snmp/target/notify-filter-profile items, each such + notify-filter-profile is represented by one + snmpNotifyFilterProfileEntry. + + If an entry in this list is not referred to by any + /snmp/target/notify-filter-profile, the entry is not mapped + to snmpNotifyFilterProfileTable."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileTable + SNMP-NOTIFICATION-MIB.snmpNotifyFilterTable"; + + leaf name { + type snmp:identifier; + description + "Name of the filter profile."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileName"; + } + + leaf-list include { + type snmp:wildcard-object-identifier; + description + "A family of subtrees included in this filter."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterSubtree + SNMP-NOTIFICATION-MIB.snmpNotifyFilterMask + SNMP-NOTIFICATION-MIB.snmpNotifyFilterType"; + } + + leaf-list exclude { + type snmp:wildcard-object-identifier; + description + "A family of subtrees excluded from this filter."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterSubtree + SNMP-NOTIFICATION-MIB.snmpNotifyFilterMask + SNMP-NOTIFICATION-MIB.snmpNotifyFilterType"; + } + } + + } + + augment /snmp:snmp/snmp:target-params { + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileTable"; + leaf notify-filter-profile { + if-feature snmp:notification-filter; + type leafref { + path "/snmp/notify-filter-profile/name"; + } + description + "This leafref leaf is used to represent the sparse + relationship between the /snmp/target-params list and the + /snmp/notify-filter-profile list."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileName"; + } + } + +} diff --git a/models/ietf/RFC/ietf-snmp-proxy.yang b/models/ietf/RFC/ietf-snmp-proxy.yang new file mode 100644 index 0000000000000000000000000000000000000000..a28ff5c3bf498931e854ce0dc7adc6a1cf263921 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-proxy.yang @@ -0,0 +1,155 @@ +submodule ietf-snmp-proxy { + + belongs-to ietf-snmp { + prefix snmp; + } + + include ietf-snmp-common; + include ietf-snmp-target; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring SNMP proxies. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature proxy { + description + "A server implements this feature if it can act as an + SNMP proxy."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + } + + augment /snmp:snmp { + if-feature snmp:proxy; + + list proxy { + key name; + + description + "List of proxy parameters."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyTable"; + + leaf name { + type snmp:identifier; + description + "Identifies the proxy parameter entry."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyName"; + } + leaf type { + type enumeration { + enum read { value 1; } + enum write { value 2; } + enum trap { value 3; } + enum inform { value 4; } + } + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyType"; + } + leaf context-engine-id { + type snmp:engine-id; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyContextEngineID"; + } + leaf context-name { + type snmp:context-name; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyContextName"; + } + leaf target-params-in { + type snmp:identifier; + description + "The name of a target parameters list entry. + + Implementations MAY restrict the values of this + leaf to be one of the available values of + /snmp/target-params/name in a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyTargetParamsIn"; + } + leaf single-target-out { + when "../type = 'read' or ../type = 'write'"; + type snmp:identifier; + description + "Implementations MAY restrict the values of this leaf + to be one of the available values of /snmp/target/name in + a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxySingleTargetOut"; + } + + leaf multiple-target-out { + when "../type = 'trap' or ../type = 'inform'"; + type snmp:tag-value; + description + "Implementations MAY restrict the values of this leaf + to be one of the available values of /snmp/target/tag in + a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyMultipleTargetOut"; + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-proxy@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-proxy@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..a28ff5c3bf498931e854ce0dc7adc6a1cf263921 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-proxy@2014-12-10.yang @@ -0,0 +1,155 @@ +submodule ietf-snmp-proxy { + + belongs-to ietf-snmp { + prefix snmp; + } + + include ietf-snmp-common; + include ietf-snmp-target; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring SNMP proxies. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature proxy { + description + "A server implements this feature if it can act as an + SNMP proxy."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + } + + augment /snmp:snmp { + if-feature snmp:proxy; + + list proxy { + key name; + + description + "List of proxy parameters."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyTable"; + + leaf name { + type snmp:identifier; + description + "Identifies the proxy parameter entry."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyName"; + } + leaf type { + type enumeration { + enum read { value 1; } + enum write { value 2; } + enum trap { value 3; } + enum inform { value 4; } + } + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyType"; + } + leaf context-engine-id { + type snmp:engine-id; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyContextEngineID"; + } + leaf context-name { + type snmp:context-name; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyContextName"; + } + leaf target-params-in { + type snmp:identifier; + description + "The name of a target parameters list entry. + + Implementations MAY restrict the values of this + leaf to be one of the available values of + /snmp/target-params/name in a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyTargetParamsIn"; + } + leaf single-target-out { + when "../type = 'read' or ../type = 'write'"; + type snmp:identifier; + description + "Implementations MAY restrict the values of this leaf + to be one of the available values of /snmp/target/name in + a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxySingleTargetOut"; + } + + leaf multiple-target-out { + when "../type = 'trap' or ../type = 'inform'"; + type snmp:tag-value; + description + "Implementations MAY restrict the values of this leaf + to be one of the available values of /snmp/target/tag in + a valid configuration."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-PROXY-MIB.snmpProxyMultipleTargetOut"; + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-ssh.yang b/models/ietf/RFC/ietf-snmp-ssh.yang new file mode 100644 index 0000000000000000000000000000000000000000..e7a5eac1e12b77911702ea1b43a6ce393104681a --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-ssh.yang @@ -0,0 +1,145 @@ +submodule ietf-snmp-ssh { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-inet-types { + prefix inet; + } + + include ietf-snmp-common; + include ietf-snmp-engine; + include ietf-snmp-target; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions for + configuring the Secure Shell Transport Model (SSHTM) + of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature sshtm { + description + "A server implements this feature if it supports the + Secure Shell Transport Model for SNMP."; + reference + "RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP)"; + } + + augment /snmp:snmp/snmp:engine/snmp:listen/snmp:transport { + if-feature sshtm; + case ssh { + container ssh { + description + "The IPv4 or IPv6 address and port to which the + engine listens for SNMP messages over SSH."; + + leaf ip { + type inet:ip-address; + mandatory true; + description + "The IPv4 or IPv6 address on which the engine listens + for SNMP messages over SSH."; + } + leaf port { + type inet:port-number; + description + "The TCP port on which the engine listens for SNMP + messages over SSH. + + If the port is not configured, an engine that + acts as a Command Responder uses port 5161, and + an engine that acts as a Notification Receiver + uses port 5162."; + } + } + } + } + + augment /snmp:snmp/snmp:target/snmp:transport { + if-feature sshtm; + case ssh { + reference + "RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP). + SNMP-SSH-TM-MIB.snmpSSHDomain"; + container ssh { + leaf ip { + type inet:host; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP). + SNMP-SSH-TM-MIB.SnmpSSHAddress"; + } + leaf port { + type inet:port-number; + default 5161; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP). + SNMP-SSH-TM-MIB.SnmpSSHAddress"; + } + leaf username { + type string; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP). + SNMP-SSH-TM-MIB.SnmpSSHAddress"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-ssh@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-ssh@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..e7a5eac1e12b77911702ea1b43a6ce393104681a --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-ssh@2014-12-10.yang @@ -0,0 +1,145 @@ +submodule ietf-snmp-ssh { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-inet-types { + prefix inet; + } + + include ietf-snmp-common; + include ietf-snmp-engine; + include ietf-snmp-target; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions for + configuring the Secure Shell Transport Model (SSHTM) + of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature sshtm { + description + "A server implements this feature if it supports the + Secure Shell Transport Model for SNMP."; + reference + "RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP)"; + } + + augment /snmp:snmp/snmp:engine/snmp:listen/snmp:transport { + if-feature sshtm; + case ssh { + container ssh { + description + "The IPv4 or IPv6 address and port to which the + engine listens for SNMP messages over SSH."; + + leaf ip { + type inet:ip-address; + mandatory true; + description + "The IPv4 or IPv6 address on which the engine listens + for SNMP messages over SSH."; + } + leaf port { + type inet:port-number; + description + "The TCP port on which the engine listens for SNMP + messages over SSH. + + If the port is not configured, an engine that + acts as a Command Responder uses port 5161, and + an engine that acts as a Notification Receiver + uses port 5162."; + } + } + } + } + + augment /snmp:snmp/snmp:target/snmp:transport { + if-feature sshtm; + case ssh { + reference + "RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP). + SNMP-SSH-TM-MIB.snmpSSHDomain"; + container ssh { + leaf ip { + type inet:host; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP). + SNMP-SSH-TM-MIB.SnmpSSHAddress"; + } + leaf port { + type inet:port-number; + default 5161; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP). + SNMP-SSH-TM-MIB.SnmpSSHAddress"; + } + leaf username { + type string; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 5592: Secure Shell Transport Model for the + Simple Network Management Protocol (SNMP). + SNMP-SSH-TM-MIB.SnmpSSHAddress"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-target.yang b/models/ietf/RFC/ietf-snmp-target.yang new file mode 100644 index 0000000000000000000000000000000000000000..9b1d6d14567260625186ab317c26c07f89dce45a --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-target.yang @@ -0,0 +1,207 @@ +submodule ietf-snmp-target { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-inet-types { + prefix inet; + } + + include ietf-snmp-common; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring SNMP targets. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + augment /snmp:snmp { + + list target { + key name; + description + "List of targets."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTable"; + + leaf name { + type snmp:identifier; + description + "Identifies the target."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications. + SNMP-TARGET-MIB.snmpTargetAddrName"; + } + choice transport { + mandatory true; + description + "Transport address of the target. + + The snmpTargetAddrTDomain and snmpTargetAddrTAddress + objects are mapped to transport-specific YANG nodes. Each + transport is configured as a separate case in this + choice. Submodules providing configuration for additional + transports are expected to augment this choice."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTDomain + SNMP-TARGET-MIB.snmpTargetAddrTAddress"; + case udp { + reference + "RFC 3417: Transport Mappings for the Simple Network + Management Protocol (SNMP). + SNMPv2-TM.snmpUDPDomain + RFC 3419: Textual Conventions for Transport Addresses. + TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv4 + TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv4z + TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv6 + TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv6z"; + container udp { + leaf ip { + type inet:ip-address; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + SNMP-TARGET-MIB.snmpTargetAddrTAddress"; + } + leaf port { + type inet:port-number; + default 162; + description + "UDP port number."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + SNMP-TARGET-MIB.snmpTargetAddrTAddress"; + } + leaf prefix-length { + type uint8; + description + "The value of this leaf must match the value of + ../snmp:ip. If ../snmp:ip contains an IPv4 address, + this leaf must be less than or equal to 32. If it + contains an IPv6 address, it must be less than or + equal to 128. + + Note that the prefix-length is currently only used + by the Community-based Security Model to filter + incoming messages. Furthermore, the prefix-length + filtering does not cover all possible filters + supported by the corresponding MIB object."; + + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpTargetAddrTMask"; + } + } + } + } + leaf-list tag { + type snmp:tag-value; + description + "List of tag values used to select target addresses."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTagList"; + } + leaf timeout { + type uint32; + units "0.01 seconds"; + default 1500; + description + "Needed only if this target can receive + InformRequest-PDUs."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTimeout"; + } + leaf retries { + type uint8; + default 3; + description + "Needed only if this target can receive + InformRequest-PDUs."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrRetryCount"; + } + leaf target-params { + type snmp:identifier; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrParams"; + } + } + + list target-params { + key name; + description + "List of target parameters."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsTable"; + + leaf name { + type snmp:identifier; + } + choice params { + description + "This choice is augmented with case nodes containing + configuration parameters specific to the security model."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-target@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-target@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..9b1d6d14567260625186ab317c26c07f89dce45a --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-target@2014-12-10.yang @@ -0,0 +1,207 @@ +submodule ietf-snmp-target { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-inet-types { + prefix inet; + } + + include ietf-snmp-common; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring SNMP targets. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + augment /snmp:snmp { + + list target { + key name; + description + "List of targets."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTable"; + + leaf name { + type snmp:identifier; + description + "Identifies the target."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications. + SNMP-TARGET-MIB.snmpTargetAddrName"; + } + choice transport { + mandatory true; + description + "Transport address of the target. + + The snmpTargetAddrTDomain and snmpTargetAddrTAddress + objects are mapped to transport-specific YANG nodes. Each + transport is configured as a separate case in this + choice. Submodules providing configuration for additional + transports are expected to augment this choice."; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP) + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTDomain + SNMP-TARGET-MIB.snmpTargetAddrTAddress"; + case udp { + reference + "RFC 3417: Transport Mappings for the Simple Network + Management Protocol (SNMP). + SNMPv2-TM.snmpUDPDomain + RFC 3419: Textual Conventions for Transport Addresses. + TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv4 + TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv4z + TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv6 + TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv6z"; + container udp { + leaf ip { + type inet:ip-address; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + SNMP-TARGET-MIB.snmpTargetAddrTAddress"; + } + leaf port { + type inet:port-number; + default 162; + description + "UDP port number."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + SNMP-TARGET-MIB.snmpTargetAddrTAddress"; + } + leaf prefix-length { + type uint8; + description + "The value of this leaf must match the value of + ../snmp:ip. If ../snmp:ip contains an IPv4 address, + this leaf must be less than or equal to 32. If it + contains an IPv6 address, it must be less than or + equal to 128. + + Note that the prefix-length is currently only used + by the Community-based Security Model to filter + incoming messages. Furthermore, the prefix-length + filtering does not cover all possible filters + supported by the corresponding MIB object."; + + reference + "RFC 3584: Coexistence between Version 1, Version 2, + and Version 3 of the Internet-standard + Network Management Framework. + SNMP-COMMUNITY-MIB.snmpTargetAddrTMask"; + } + } + } + } + leaf-list tag { + type snmp:tag-value; + description + "List of tag values used to select target addresses."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTagList"; + } + leaf timeout { + type uint32; + units "0.01 seconds"; + default 1500; + description + "Needed only if this target can receive + InformRequest-PDUs."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTimeout"; + } + leaf retries { + type uint8; + default 3; + description + "Needed only if this target can receive + InformRequest-PDUs."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrRetryCount"; + } + leaf target-params { + type snmp:identifier; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrParams"; + } + } + + list target-params { + key name; + description + "List of target parameters."; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsTable"; + + leaf name { + type snmp:identifier; + } + choice params { + description + "This choice is augmented with case nodes containing + configuration parameters specific to the security model."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-tls.yang b/models/ietf/RFC/ietf-snmp-tls.yang new file mode 100644 index 0000000000000000000000000000000000000000..e8ed5f7032ce6e4a140fba8eea5343c99531eb52 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-tls.yang @@ -0,0 +1,222 @@ +submodule ietf-snmp-tls { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-inet-types { + prefix inet; + } + import ietf-x509-cert-to-name { + prefix x509c2n; + } + + include ietf-snmp-common; + include ietf-snmp-engine; + include ietf-snmp-target; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions for + configuring the Transport Layer Security Transport Model (TLSTM) + of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model for + the Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature tlstm { + description + "A server implements this feature if it supports the + Transport Layer Security Transport Model for SNMP."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model for + the Simple Network Management Protocol (SNMP)"; + } + + augment /snmp:snmp/snmp:engine/snmp:listen/snmp:transport { + if-feature tlstm; + case tls { + container tls { + description + "A list of IPv4 and IPv6 addresses and ports to which the + engine listens for SNMP messages over TLS."; + + leaf ip { + type inet:ip-address; + mandatory true; + description + "The IPv4 or IPv6 address on which the engine listens + for SNMP messages over TLS."; + } + leaf port { + type inet:port-number; + description + "The TCP port on which the engine listens for SNMP + messages over TLS. + + If the port is not configured, an engine that + acts as a Command Responder uses port 10161, and + an engine that acts as a Notification Receiver + uses port 10162."; + } + } + } + case dtls { + container dtls { + description + "A list of IPv4 and IPv6 addresses and ports to which the + engine listens for SNMP messages over DTLS."; + + leaf ip { + type inet:ip-address; + mandatory true; + description + "The IPv4 or IPv6 address on which the engine listens + for SNMP messages over DTLS."; + } + leaf port { + type inet:port-number; + description + "The UDP port on which the engine listens for SNMP + messages over DTLS. + + If the port is not configured, an engine that + acts as a Command Responder uses port 10161, and + an engine that acts as a Notification Receiver + uses port 10162."; + } + } + } + } + + augment /snmp:snmp { + if-feature tlstm; + container tlstm { + uses x509c2n:cert-to-name { + description + "Defines how certificates are mapped to names. The + resulting name is used as a security name."; + refine cert-to-name/map-type { + description + "Mappings that use the snmpTlstmCertToTSNData column + need to augment the cert-to-name list with + additional configuration objects corresponding + to the snmpTlstmCertToTSNData value. Such objects + should use the 'when' statement to make them + conditional based on the map-type."; + } + } + } + } + + grouping tls-transport { + leaf ip { + type inet:host; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.SnmpTLSAddress"; + } + leaf port { + type inet:port-number; + default 10161; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.SnmpTLSAddress"; + } + leaf client-fingerprint { + type x509c2n:tls-fingerprint; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmParamsClientFingerprint"; + } + leaf server-fingerprint { + type x509c2n:tls-fingerprint; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmAddrServerFingerprint"; + } + leaf server-identity { + type snmp:admin-string; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmAddrServerIdentity"; + } + } + + augment /snmp:snmp/snmp:target/snmp:transport { + if-feature tlstm; + case tls { + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTLSTCPDomain"; + container tls { + uses tls-transport; + } + } + } + + augment /snmp:snmp/snmp:target/snmp:transport { + if-feature tlstm; + case dtls { + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpDTLSUDPDomain"; + container dtls { + uses tls-transport; + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-tls@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-tls@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..e8ed5f7032ce6e4a140fba8eea5343c99531eb52 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-tls@2014-12-10.yang @@ -0,0 +1,222 @@ +submodule ietf-snmp-tls { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-inet-types { + prefix inet; + } + import ietf-x509-cert-to-name { + prefix x509c2n; + } + + include ietf-snmp-common; + include ietf-snmp-engine; + include ietf-snmp-target; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions for + configuring the Transport Layer Security Transport Model (TLSTM) + of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model for + the Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature tlstm { + description + "A server implements this feature if it supports the + Transport Layer Security Transport Model for SNMP."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model for + the Simple Network Management Protocol (SNMP)"; + } + + augment /snmp:snmp/snmp:engine/snmp:listen/snmp:transport { + if-feature tlstm; + case tls { + container tls { + description + "A list of IPv4 and IPv6 addresses and ports to which the + engine listens for SNMP messages over TLS."; + + leaf ip { + type inet:ip-address; + mandatory true; + description + "The IPv4 or IPv6 address on which the engine listens + for SNMP messages over TLS."; + } + leaf port { + type inet:port-number; + description + "The TCP port on which the engine listens for SNMP + messages over TLS. + + If the port is not configured, an engine that + acts as a Command Responder uses port 10161, and + an engine that acts as a Notification Receiver + uses port 10162."; + } + } + } + case dtls { + container dtls { + description + "A list of IPv4 and IPv6 addresses and ports to which the + engine listens for SNMP messages over DTLS."; + + leaf ip { + type inet:ip-address; + mandatory true; + description + "The IPv4 or IPv6 address on which the engine listens + for SNMP messages over DTLS."; + } + leaf port { + type inet:port-number; + description + "The UDP port on which the engine listens for SNMP + messages over DTLS. + + If the port is not configured, an engine that + acts as a Command Responder uses port 10161, and + an engine that acts as a Notification Receiver + uses port 10162."; + } + } + } + } + + augment /snmp:snmp { + if-feature tlstm; + container tlstm { + uses x509c2n:cert-to-name { + description + "Defines how certificates are mapped to names. The + resulting name is used as a security name."; + refine cert-to-name/map-type { + description + "Mappings that use the snmpTlstmCertToTSNData column + need to augment the cert-to-name list with + additional configuration objects corresponding + to the snmpTlstmCertToTSNData value. Such objects + should use the 'when' statement to make them + conditional based on the map-type."; + } + } + } + } + + grouping tls-transport { + leaf ip { + type inet:host; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.SnmpTLSAddress"; + } + leaf port { + type inet:port-number; + default 10161; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetAddrTAddress + RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.SnmpTLSAddress"; + } + leaf client-fingerprint { + type x509c2n:tls-fingerprint; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmParamsClientFingerprint"; + } + leaf server-fingerprint { + type x509c2n:tls-fingerprint; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmAddrServerFingerprint"; + } + leaf server-identity { + type snmp:admin-string; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmAddrServerIdentity"; + } + } + + augment /snmp:snmp/snmp:target/snmp:transport { + if-feature tlstm; + case tls { + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTLSTCPDomain"; + container tls { + uses tls-transport; + } + } + } + + augment /snmp:snmp/snmp:target/snmp:transport { + if-feature tlstm; + case dtls { + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpDTLSUDPDomain"; + container dtls { + uses tls-transport; + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-tsm.yang b/models/ietf/RFC/ietf-snmp-tsm.yang new file mode 100644 index 0000000000000000000000000000000000000000..3bf9699c404e0ecf87f9150a8b884fae6b177f61 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-tsm.yang @@ -0,0 +1,116 @@ +submodule ietf-snmp-tsm { + + belongs-to ietf-snmp { + prefix snmp; + } + + include ietf-snmp-common; + include ietf-snmp-target; + include ietf-snmp-proxy; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions for + configuring the Transport Security Model (TSM) of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 5591: Transport Security Model for the + Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature tsm { + description + "A server implements this feature if it supports the + Transport Security Model for SNMP."; + reference + "RFC 5591: Transport Security Model for the + Simple Network Management Protocol (SNMP)"; + } + augment /snmp:snmp { + if-feature tsm; + container tsm { + description + "Configuration of the Transport Security Model."; + + leaf use-prefix { + type boolean; + default false; + reference + "RFC 5591: Transport Security Model for the Simple + Network Management Protocol (SNMP). + SNMP-TSM-MIB.snmpTsmConfigurationUsePrefix"; + } + } + } + + grouping tsm-target-params { + container tsm { + description + "Transport-based security SNMPv3 parameters type. + + Represents snmpTargetParamsMPModel '3' and + snmpTargetParamsSecurityModel '4'."; + leaf security-name { + type snmp:security-name; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityName"; + } + leaf security-level { + type snmp:security-level; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityLevel"; + } + } + } + + augment /snmp:snmp/snmp:target-params/snmp:params { + if-feature tsm; + case tsm { + uses tsm-target-params; + } + } + +} diff --git a/models/ietf/RFC/ietf-snmp-tsm@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-tsm@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..3bf9699c404e0ecf87f9150a8b884fae6b177f61 --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-tsm@2014-12-10.yang @@ -0,0 +1,116 @@ +submodule ietf-snmp-tsm { + + belongs-to ietf-snmp { + prefix snmp; + } + + include ietf-snmp-common; + include ietf-snmp-target; + include ietf-snmp-proxy; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions for + configuring the Transport Security Model (TSM) of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 5591: Transport Security Model for the + Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + feature tsm { + description + "A server implements this feature if it supports the + Transport Security Model for SNMP."; + reference + "RFC 5591: Transport Security Model for the + Simple Network Management Protocol (SNMP)"; + } + augment /snmp:snmp { + if-feature tsm; + container tsm { + description + "Configuration of the Transport Security Model."; + + leaf use-prefix { + type boolean; + default false; + reference + "RFC 5591: Transport Security Model for the Simple + Network Management Protocol (SNMP). + SNMP-TSM-MIB.snmpTsmConfigurationUsePrefix"; + } + } + } + + grouping tsm-target-params { + container tsm { + description + "Transport-based security SNMPv3 parameters type. + + Represents snmpTargetParamsMPModel '3' and + snmpTargetParamsSecurityModel '4'."; + leaf security-name { + type snmp:security-name; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityName"; + } + leaf security-level { + type snmp:security-level; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityLevel"; + } + } + } + + augment /snmp:snmp/snmp:target-params/snmp:params { + if-feature tsm; + case tsm { + uses tsm-target-params; + } + } + +} diff --git a/models/ietf/RFC/ietf-snmp-usm.yang b/models/ietf/RFC/ietf-snmp-usm.yang new file mode 100644 index 0000000000000000000000000000000000000000..17024a3839845bdf6bfb628a0345f1ca0151445b --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-usm.yang @@ -0,0 +1,216 @@ +submodule ietf-snmp-usm { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + + include ietf-snmp-common; + include ietf-snmp-target; + include ietf-snmp-proxy; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions for + configuring the User-based Security Model (USM) of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3414: User-based Security Model (USM) for version 3 of the + Simple Network Management Protocol (SNMPv3)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + grouping key { + leaf key { + type yang:hex-string; + mandatory true; + nacm:default-deny-all; + description + "Localized key specified as a list of colon-specified + hexadecimal octets."; + } + } + + grouping user-list { + list user { + key "name"; + + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserTable"; + + leaf name { + type snmp:identifier; + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserName"; + } + container auth { + presence "enables authentication"; + description + "Enables authentication of the user."; + choice protocol { + mandatory true; + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserAuthProtocol"; + container md5 { + uses key; + reference + "RFC 3414: User-based Security Model (USM) for + version 3 of the Simple Network Management Protocol + (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmHMACMD5AuthProtocol"; + } + container sha { + uses key; + reference + "RFC 3414: User-based Security Model (USM) for + version 3 of the Simple Network Management Protocol + (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmHMACSHAAuthProtocol"; + } + } + } + container priv { + must "../auth" { + error-message + "when privacy (confidentiality) is used, " + + "authentication must also be used"; + } + presence "enables encryption"; + description + "Enables encryption of SNMP messages."; + + choice protocol { + mandatory true; + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserPrivProtocol"; + container des { + uses key; + reference + "RFC 3414: User-based Security Model (USM) for + version 3 of the Simple Network Management Protocol + (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmDESPrivProtocol"; + } + container aes { + uses key; + + reference + "RFC 3826: The Advanced Encryption Standard (AES) + Cipher Algorithm in the SNMP User-based Security + Model. + SNMP-USM-AES-MIB.usmAesCfb128Protocol"; + } + } + } + } + } + + augment /snmp:snmp { + + container usm { + description + "Configuration of the User-based Security Model."; + container local { + uses user-list; + } + + list remote { + key "engine-id"; + + leaf engine-id { + type snmp:engine-id; + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserEngineID"; + } + + uses user-list; + } + } + } + + grouping usm-target-params { + container usm { + description + "User-based SNMPv3 parameters type. + + Represents snmpTargetParamsMPModel '3' and + snmpTargetParamsSecurityModel '3'."; + leaf user-name { + type snmp:security-name; + mandatory true; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityName"; + } + leaf security-level { + type snmp:security-level; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityLevel"; + } + } + } + + augment /snmp:snmp/snmp:target-params/snmp:params { + case usm { + uses usm-target-params; + } + } + +} diff --git a/models/ietf/RFC/ietf-snmp-usm@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-usm@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..17024a3839845bdf6bfb628a0345f1ca0151445b --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-usm@2014-12-10.yang @@ -0,0 +1,216 @@ +submodule ietf-snmp-usm { + + belongs-to ietf-snmp { + prefix snmp; + } + + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + + include ietf-snmp-common; + include ietf-snmp-target; + include ietf-snmp-proxy; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions for + configuring the User-based Security Model (USM) of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3414: User-based Security Model (USM) for version 3 of the + Simple Network Management Protocol (SNMPv3)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + grouping key { + leaf key { + type yang:hex-string; + mandatory true; + nacm:default-deny-all; + description + "Localized key specified as a list of colon-specified + hexadecimal octets."; + } + } + + grouping user-list { + list user { + key "name"; + + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserTable"; + + leaf name { + type snmp:identifier; + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserName"; + } + container auth { + presence "enables authentication"; + description + "Enables authentication of the user."; + choice protocol { + mandatory true; + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserAuthProtocol"; + container md5 { + uses key; + reference + "RFC 3414: User-based Security Model (USM) for + version 3 of the Simple Network Management Protocol + (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmHMACMD5AuthProtocol"; + } + container sha { + uses key; + reference + "RFC 3414: User-based Security Model (USM) for + version 3 of the Simple Network Management Protocol + (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmHMACSHAAuthProtocol"; + } + } + } + container priv { + must "../auth" { + error-message + "when privacy (confidentiality) is used, " + + "authentication must also be used"; + } + presence "enables encryption"; + description + "Enables encryption of SNMP messages."; + + choice protocol { + mandatory true; + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserPrivProtocol"; + container des { + uses key; + reference + "RFC 3414: User-based Security Model (USM) for + version 3 of the Simple Network Management Protocol + (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmDESPrivProtocol"; + } + container aes { + uses key; + + reference + "RFC 3826: The Advanced Encryption Standard (AES) + Cipher Algorithm in the SNMP User-based Security + Model. + SNMP-USM-AES-MIB.usmAesCfb128Protocol"; + } + } + } + } + } + + augment /snmp:snmp { + + container usm { + description + "Configuration of the User-based Security Model."; + container local { + uses user-list; + } + + list remote { + key "engine-id"; + + leaf engine-id { + type snmp:engine-id; + reference + "RFC 3414: User-based Security Model (USM) for version 3 + of the Simple Network Management Protocol (SNMPv3). + SNMP-USER-BASED-SM-MIB.usmUserEngineID"; + } + + uses user-list; + } + } + } + + grouping usm-target-params { + container usm { + description + "User-based SNMPv3 parameters type. + + Represents snmpTargetParamsMPModel '3' and + snmpTargetParamsSecurityModel '3'."; + leaf user-name { + type snmp:security-name; + mandatory true; + + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityName"; + } + leaf security-level { + type snmp:security-level; + mandatory true; + reference + "RFC 3413: Simple Network Management Protocol (SNMP). + Applications. + SNMP-TARGET-MIB.snmpTargetParamsSecurityLevel"; + } + } + } + + augment /snmp:snmp/snmp:target-params/snmp:params { + case usm { + uses usm-target-params; + } + } + +} diff --git a/models/ietf/RFC/ietf-snmp-vacm.yang b/models/ietf/RFC/ietf-snmp-vacm.yang new file mode 100644 index 0000000000000000000000000000000000000000..c3e659ca86669a84aa184b9032f55d191bf3d31d --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-vacm.yang @@ -0,0 +1,291 @@ +submodule ietf-snmp-vacm { + + belongs-to ietf-snmp { + prefix snmp; + } + + include ietf-snmp-common; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring the View-based Access Control Model (VACM) + of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3415: View-based Access Control Model (VACM) for the + Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + typedef view-name { + type snmp:identifier; + description + "The view-name type represents an SNMP VACM view name."; + } + + typedef group-name { + type snmp:identifier; + description + "The group-name type represents an SNMP VACM group name."; + } + + augment /snmp:snmp { + + container vacm { + description + "Configuration of the View-based Access Control Model."; + + list group { + key name; + description + "VACM groups. + + This data model has a different structure than the MIB. + Groups are explicitly defined in this list, and group + members are defined in the 'member' list (mapped to + vacmSecurityToGroupTable), and access for the group is + defined in the 'access' list (mapped to + vacmAccessTable)."; + reference + "RFC 3415: View-based Access Control Model (VACM) for the + Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmSecurityToGroupTable + SNMP-VIEW-BASED-ACM-MIB.vacmAccessTable"; + + leaf name { + type group-name; + description + "The name of this VACM group."; + reference + "RFC 3415: View-based Access Control Model (VACM) for the + Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmGroupName"; + } + + list member { + key "security-name"; + description + "A member of this VACM group. + + A specific combination of security-name and + security-model MUST NOT be present in more than + one group."; + reference + "RFC 3415: View-based Access Control Model (VACM) for the + Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmSecurityToGroupTable"; + + leaf security-name { + type snmp:security-name; + description + "The securityName of a group member."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmSecurityName"; + } + + leaf-list security-model { + type snmp:security-model; + min-elements 1; + description + "The security models under which this security-name + is a member of this group."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmSecurityModel"; + } + } + + list access { + key "context security-model security-level"; + description + "Definition of access right for groups."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessTable"; + + leaf context { + type snmp:context-name; + description + "The context (prefix) under which the access rights + apply."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessContextPrefix"; + } + + leaf context-match { + type enumeration { + enum exact { value 1; } + enum prefix { value 2; } + } + default exact; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessContextMatch"; + } + + leaf security-model { + type snmp:security-model-or-any; + description + "The security model under which the access rights + apply."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessSecurityModel"; + } + + leaf security-level { + type snmp:security-level; + description + "The minimum security level under which the access + rights apply."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessSecurityLevel"; + } + + leaf read-view { + type view-name; + description + "The name of the MIB view of the SNMP context + authorizing read access. If this leaf does not + exist in a configuration, it maps to a zero-length + vacmAccessReadViewName. + + Implementations MAY restrict the values of this + leaf to be one of the available values of + /snmp/vacm/view/name in a valid configuration."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessReadViewName"; + } + + leaf write-view { + type view-name; + description + "The name of the MIB view of the SNMP context + authorizing write access. If this leaf does not + exist in a configuration, it maps to a zero-length + vacmAccessWriteViewName. + + Implementations MAY restrict the values of this + leaf to be one of the available values of + /snmp/vacm/view/name in a valid configuration."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessWriteViewName"; + } + + leaf notify-view { + type view-name; + description + "The name of the MIB view of the SNMP context + authorizing notify access. If this leaf does not + exist in a configuration, it maps to a zero-length + vacmAccessNotifyViewName. + + Implementations MAY restrict the values of this + leaf to be one of the available values of + /snmp/vacm/view/name in a valid configuration."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessNotifyViewName"; + } + } + } + + list view { + key name; + description + "Definition of MIB views."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyTable"; + + leaf name { + type view-name; + description + "The name of this VACM MIB view."; + + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyName"; + } + + leaf-list include { + type snmp:wildcard-object-identifier; + description + "A family of subtrees included in this MIB view."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilySubtree + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyMask + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyType"; + } + + leaf-list exclude { + type snmp:wildcard-object-identifier; + description + "A family of subtrees excluded from this MIB view."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilySubtree + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyMask + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyType"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp-vacm@2014-12-10.yang b/models/ietf/RFC/ietf-snmp-vacm@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..c3e659ca86669a84aa184b9032f55d191bf3d31d --- /dev/null +++ b/models/ietf/RFC/ietf-snmp-vacm@2014-12-10.yang @@ -0,0 +1,291 @@ +submodule ietf-snmp-vacm { + + belongs-to ietf-snmp { + prefix snmp; + } + + include ietf-snmp-common; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This submodule contains a collection of YANG definitions + for configuring the View-based Access Control Model (VACM) + of SNMP. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 3415: View-based Access Control Model (VACM) for the + Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + typedef view-name { + type snmp:identifier; + description + "The view-name type represents an SNMP VACM view name."; + } + + typedef group-name { + type snmp:identifier; + description + "The group-name type represents an SNMP VACM group name."; + } + + augment /snmp:snmp { + + container vacm { + description + "Configuration of the View-based Access Control Model."; + + list group { + key name; + description + "VACM groups. + + This data model has a different structure than the MIB. + Groups are explicitly defined in this list, and group + members are defined in the 'member' list (mapped to + vacmSecurityToGroupTable), and access for the group is + defined in the 'access' list (mapped to + vacmAccessTable)."; + reference + "RFC 3415: View-based Access Control Model (VACM) for the + Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmSecurityToGroupTable + SNMP-VIEW-BASED-ACM-MIB.vacmAccessTable"; + + leaf name { + type group-name; + description + "The name of this VACM group."; + reference + "RFC 3415: View-based Access Control Model (VACM) for the + Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmGroupName"; + } + + list member { + key "security-name"; + description + "A member of this VACM group. + + A specific combination of security-name and + security-model MUST NOT be present in more than + one group."; + reference + "RFC 3415: View-based Access Control Model (VACM) for the + Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmSecurityToGroupTable"; + + leaf security-name { + type snmp:security-name; + description + "The securityName of a group member."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmSecurityName"; + } + + leaf-list security-model { + type snmp:security-model; + min-elements 1; + description + "The security models under which this security-name + is a member of this group."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmSecurityModel"; + } + } + + list access { + key "context security-model security-level"; + description + "Definition of access right for groups."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessTable"; + + leaf context { + type snmp:context-name; + description + "The context (prefix) under which the access rights + apply."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessContextPrefix"; + } + + leaf context-match { + type enumeration { + enum exact { value 1; } + enum prefix { value 2; } + } + default exact; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessContextMatch"; + } + + leaf security-model { + type snmp:security-model-or-any; + description + "The security model under which the access rights + apply."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessSecurityModel"; + } + + leaf security-level { + type snmp:security-level; + description + "The minimum security level under which the access + rights apply."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessSecurityLevel"; + } + + leaf read-view { + type view-name; + description + "The name of the MIB view of the SNMP context + authorizing read access. If this leaf does not + exist in a configuration, it maps to a zero-length + vacmAccessReadViewName. + + Implementations MAY restrict the values of this + leaf to be one of the available values of + /snmp/vacm/view/name in a valid configuration."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessReadViewName"; + } + + leaf write-view { + type view-name; + description + "The name of the MIB view of the SNMP context + authorizing write access. If this leaf does not + exist in a configuration, it maps to a zero-length + vacmAccessWriteViewName. + + Implementations MAY restrict the values of this + leaf to be one of the available values of + /snmp/vacm/view/name in a valid configuration."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessWriteViewName"; + } + + leaf notify-view { + type view-name; + description + "The name of the MIB view of the SNMP context + authorizing notify access. If this leaf does not + exist in a configuration, it maps to a zero-length + vacmAccessNotifyViewName. + + Implementations MAY restrict the values of this + leaf to be one of the available values of + /snmp/vacm/view/name in a valid configuration."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmAccessNotifyViewName"; + } + } + } + + list view { + key name; + description + "Definition of MIB views."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyTable"; + + leaf name { + type view-name; + description + "The name of this VACM MIB view."; + + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyName"; + } + + leaf-list include { + type snmp:wildcard-object-identifier; + description + "A family of subtrees included in this MIB view."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilySubtree + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyMask + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyType"; + } + + leaf-list exclude { + type snmp:wildcard-object-identifier; + description + "A family of subtrees excluded from this MIB view."; + reference + "RFC 3415: View-based Access Control Model (VACM) for + the Simple Network Management Protocol (SNMP). + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilySubtree + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyMask + SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyType"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-snmp.yang b/models/ietf/RFC/ietf-snmp.yang new file mode 100644 index 0000000000000000000000000000000000000000..60237a6267652316d16c0b875a8dec2c896e337d --- /dev/null +++ b/models/ietf/RFC/ietf-snmp.yang @@ -0,0 +1,82 @@ +module ietf-snmp { + + namespace "urn:ietf:params:xml:ns:yang:ietf-snmp"; + prefix snmp; + + include ietf-snmp-common { + revision-date 2014-12-10; + } + include ietf-snmp-engine { + revision-date 2014-12-10; + } + include ietf-snmp-target { + revision-date 2014-12-10; + } + include ietf-snmp-notification { + revision-date 2014-12-10; + } + include ietf-snmp-proxy { + revision-date 2014-12-10; + } + include ietf-snmp-community { + revision-date 2014-12-10; + } + include ietf-snmp-usm { + revision-date 2014-12-10; + } + include ietf-snmp-tsm { + revision-date 2014-12-10; + } + include ietf-snmp-vacm { + revision-date 2014-12-10; + } + include ietf-snmp-tls { + revision-date 2014-12-10; + } + include ietf-snmp-ssh { + revision-date 2014-12-10; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + description + "This module contains a collection of YANG definitions for + configuring SNMP engines. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + +} diff --git a/models/ietf/RFC/ietf-snmp@2014-12-10.yang b/models/ietf/RFC/ietf-snmp@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..60237a6267652316d16c0b875a8dec2c896e337d --- /dev/null +++ b/models/ietf/RFC/ietf-snmp@2014-12-10.yang @@ -0,0 +1,82 @@ +module ietf-snmp { + + namespace "urn:ietf:params:xml:ns:yang:ietf-snmp"; + prefix snmp; + + include ietf-snmp-common { + revision-date 2014-12-10; + } + include ietf-snmp-engine { + revision-date 2014-12-10; + } + include ietf-snmp-target { + revision-date 2014-12-10; + } + include ietf-snmp-notification { + revision-date 2014-12-10; + } + include ietf-snmp-proxy { + revision-date 2014-12-10; + } + include ietf-snmp-community { + revision-date 2014-12-10; + } + include ietf-snmp-usm { + revision-date 2014-12-10; + } + include ietf-snmp-tsm { + revision-date 2014-12-10; + } + include ietf-snmp-vacm { + revision-date 2014-12-10; + } + include ietf-snmp-tls { + revision-date 2014-12-10; + } + include ietf-snmp-ssh { + revision-date 2014-12-10; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + description + "This module contains a collection of YANG definitions for + configuring SNMP engines. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + +} diff --git a/models/ietf/RFC/ietf-softwire-br.yang b/models/ietf/RFC/ietf-softwire-br.yang new file mode 100644 index 0000000000000000000000000000000000000000..708ad44b1d1943635949f58f92ff9fb059edcb89 --- /dev/null +++ b/models/ietf/RFC/ietf-softwire-br.yang @@ -0,0 +1,597 @@ +module ietf-softwire-br { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-br"; + prefix softwire-br; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types, Section 4"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types, Section 3"; + } + import ietf-softwire-common { + prefix softwire-common; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + (A+P) Softwires"; + } + + organization + "IETF Softwire Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/softwire/> + WG List: <mailto:softwire@ietf.org> + + Author: Qi Sun + <mailto:sunqi.ietf@gmail.com> + + Author: Linhui Sun + <mailto:lh.sunlinh@gmail.com> + + Author: Yong Cui + <mailto:yong@csnet1.cs.tsinghua.edu.cn> + + Editor: Ian Farrer + <mailto:ian.farrer@telekom.de> + + Author: Sladjana Zoric + <mailto:sladjana.zoric@telekom.de> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Rajiv Asati + <mailto:rajiva@cisco.com>"; + + description + "This document defines a YANG module for the configuration and + management of A+P Softwire Border Routers. It covers + Lightweight 4over6, MAP-E, and MAP-T mechanisms. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8676; see + the RFC itself for full legal notices."; + + revision 2019-11-16 { + description + "Initial revision."; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + (A+P) Softwires"; + } + + /* + * Groupings + */ + + grouping port-set { + description + "Describes a set of Layer 4 port numbers. + + This may be a simple port range, or use the Port Set + Identifier (PSID) algorithm to represent a range of transport + layer ports that will be used by a NAPT."; + leaf psid-offset { + type uint8 { + range "0..16"; + } + description + "The number of offset bits. In Lightweight 4over6, + the default value is 0 for assigning one contiguous + port range. In MAP-E/T, the default value is 6, + which means the system ports (0-1023) are excluded by + default and the assigned port ranges are distributed across + the entire port space, depending on either psid-len or the + number of contiguous ports."; + } + leaf psid-len { + type uint8 { + range "0..15"; + } + mandatory true; + description + "The length of PSID, representing the sharing + ratio for an IPv4 address. This, along with ea-len, can + be used to calculate the number of contiguous ports per + port range"; + } + leaf psid { + type uint16; + mandatory true; + description + "Port Set Identifier (PSID) value, which + identifies a set of ports algorithmically."; + } + } + + grouping binding-entry { + description + "The binding BR maintains an address binding table that + contains the binding between the CE's IPv6 address, + the allocated IPv4 address and restricted port-set."; + leaf binding-ipv6info { + type union { + type inet:ipv6-address; + type inet:ipv6-prefix; + } + description + "The IPv6 information for a CE binding entry. + When the IPv6 prefix type is used, + the IPv6 source address of the CE is constructed + according to the description in RFC 7596; + if the IPv6 address type is used, the CE can use + any valid /128 address from a prefix assigned to + the CE."; + reference + "RFC 7596: Lightweight 4over6: An Extension to the Dual-Stack + Lite Architecture"; + } + leaf binding-ipv4-addr { + type inet:ipv4-address; + description + "The IPv4 address assigned to the binding CE, + which is used as the IPv4 external address + for binding CE local NAPT44."; + } + container port-set { + description + "For Lightweight 4over6, the default value + for offset should be 0, to configure one contiguous + port range."; + uses port-set { + refine "psid-offset" { + default "0"; + } + } + } + leaf br-ipv6-addr { + type inet:ipv6-address; + description + "The IPv6 address for binding BR."; + } + } + + /* + * Features + */ + + feature binding-mode { + description + "Binding is used for configuring the Lightweight 4over6 + mechanism. + + Binding-based softwire mechanisms are IPv4-over-IPv6 tunneling + transition mechanisms specifically intended for complete + independence between the IPv6 subnet prefix (and IPv6 address) + and IPv4 address, with or without IPv4 address sharing. + + This is accomplished by maintaining state for each softwire + (per-subscriber state) in the central Border Relay (BR) and + using a hub-and-spoke forwarding architecture. In order to + delegate the NAPT function and achieve IPv4 address sharing, + port-restricted IPv4 addresses needs to be allocated to CEs. + + This feature indicates that the network element can function + as one or more binding-based softwire instances."; + reference + "RFC 7596: Lightweight 4over6: An Extension to the Dual-Stack + Lite Architecture + RFC 7597: Mapping of Address and Port with Encapsulation + (MAP-E) + RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + feature map-e { + description + "MAP-E is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP encapsulation. MAP-E + allows for a reduction of the amount of centralized state + using rules to express IPv4/IPv6 address mappings. This + introduces an algorithmic relationship between the IPv6 subnet + and IPv4 address. + + This feature indicates that the network element can function + as one or more MAP-E softwire instances."; + reference + "RFC 7597: Mapping of Address and Port with Encapsulation + (MAP-E)"; + } + + feature map-t { + description + "MAP-T is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP translation. It + leverages a double stateless NAT64-based solution as well + as the stateless algorithmic address and transport layer + port mapping algorithm defined for MAP-E. + + This feature indicates that the network element can function + as one or more MAP-T softwire instances."; + reference + "RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + container br-instances { + description + "BR instances enabled in a network element."; + choice br-type { + description + "Select binding or algorithmic BR functionality."; + case binding { + if-feature "binding-mode"; + container binding { + description + "binding mechanism (binding table) configuration."; + list bind-instance { + key "name"; + description + "A set of binding instances to be configured."; + leaf name { + type string; + mandatory true; + description + "The name for the binding BR. It is used to uniquely + distinguish a binding instance by its name."; + } + container binding-table-versioning { + description + "binding table's version"; + leaf version { + type uint64; + description + "Version number for this binding table."; + } + leaf date { + type yang:date-and-time; + description + "Timestamp when the binding table was activated. + + A binding instance may be provided with binding + entries that may change in time (e.g., increase + the size of the port set). When a party who is + the victim of abuse presents an external IP + address/port, the version of the binding table + is important because, depending on the version, + a distinct customer may be identified. + + The timestamp is used as a key to find the + appropriate binding table that was put into effect + when an abuse occurred."; + reference + "RFC 7422: Deterministic Address Mapping to Reduce + Logging in Carrier-Grade NAT Deployments"; + } + } + leaf softwire-num-max { + type uint32 { + range "1..max"; + } + mandatory true; + description + "The maximum number of softwires that can be created + on the binding BR."; + } + leaf softwire-payload-mtu { + type uint16; + units "bytes"; + mandatory true; + description + "The payload IPv4 MTU for binding softwire."; + } + leaf softwire-path-mru { + type uint16; + units "bytes"; + mandatory true; + description + "The path MRU for binding softwire"; + reference + "RFC 4213: Basic Transition Mechanisms for IPv6 Hosts + and Routers"; + } + leaf enable-hairpinning { + type boolean; + default "true"; + description + "Enables/disables support for locally forwarding + (hairpinning) traffic between two CEs"; + reference + "RFC 7596: Lightweight 4over6: An Extension to + the Dual-Stack Lite Architecture, Section 6.2"; + } + container binding-table { + description + "binding table"; + list binding-entry { + key "binding-ipv6info"; + description + "binding entry"; + uses binding-entry; + } + } + container icmp-policy { + description + "The binding BR can be configured to process or drop + incoming ICMP messages and to generate outgoing ICMP + error messages."; + container icmpv4-errors { + description + "ICMPv4 error processing configuration"; + leaf allow-incoming-icmpv4 { + type boolean; + default "true"; + description + "Enables the processing of incoming ICMPv4 + packets."; + reference + "RFC 7596: Lightweight 4over6: An Extension to + the Dual-Stack Lite Architecture"; + } + leaf icmpv4-rate { + type uint32; + description + "Rate limit threshold in messages per second + for processing incoming ICMPv4 errors messages"; + } + leaf generate-icmpv4-errors { + type boolean; + default "true"; + description + "Enables the generation of outgoing ICMPv4 error + messages on receipt of an inbound IPv4 packet + with no matching binding table entry."; + reference + "RFC 7596: Lightweight 4over6: + An Extension to the Dual-Stack Lite + Architecture, Section 5.2"; + } + } + container icmpv6-errors { + description + "ICMPv6 error processing configuration"; + leaf generate-icmpv6-errors { + type boolean; + default "true"; + description + "Enables the generation of ICMPv6 error messages + if no matching binding table entry is found for + a received packet."; + reference + "RFC 7596: Lightweight 4over6: + An Extension to the Dual-Stack Lite + Architecture, Section 6.2"; + } + leaf icmpv6-rate { + type uint32; + description + "Rate limit threshold in messages per second + for sending ICMPv6 errors messages"; + reference + "RFC 7596: Lightweight 4over6: An Extension + to the Dual-Stack Lite Architecture, Section 9"; + } + } + } + container traffic-stat { + config false; + description + "Traffic statistics information for the BR."; + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time of the most recent occasion on which the + BR instance suffered a discontinuity. This must + be initialized when the BR instance is configured + or rebooted."; + } + uses softwire-common:traffic-stat; + leaf dropped-icmpv4-packets { + type yang:zero-based-counter64; + description + "ICMPv4 packets that are dropped as a result + of the ICMP policy. Typically, this can be any + incoming ICMPv4 packets if ICMPv4 processing is + disabled or incoming ICMPv4 packets that exceed + the ICMPv4 rate-limit threshold. + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + leaf dropped-icmpv4-bytes { + type yang:zero-based-counter64; + description + "ICMPv4 messages, in bytes, that are dropped as + a result of the ICMP policy. Typically, it + can be any incoming ICMPv4 packets if ICMPv4 + processing is disabled or incoming ICMPv4 + packets that exceed the ICMPv4 rate-limit + threshold. + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + leaf hairpin-ipv4-packets { + type yang:zero-based-counter64; + description + "IPv4 packets locally routed between two CEs + (hairpinned). + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + leaf hairpin-ipv4-bytes { + type yang:zero-based-counter64; + description + "IPv4 bytes locally routed between two CEs + (hairpinned). + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + leaf active-softwire-num { + type uint32; + config false; + description + "The number of currently active softwires on the + binding instance. + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + } + } + } + } + case algo { + if-feature "map-e or map-t"; + container algorithm { + description + "A set of parameters used for MAP-E/MAP-T"; + list algo-instance { + key "name"; + description + "Instances of algorithm"; + leaf name { + type string; + mandatory true; + description + "The name is used to uniquely identify an algorithm + instance. + + This name can be automatically assigned + or explicitly configured."; + } + uses softwire-common:algorithm-instance; + container port-set { + description + "Indicates a set of ports."; + uses port-set; + } + container traffic-stat { + config false; + description + "Traffic statistics information for the BR."; + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time of the most recent occasion on which the + BR instance suffered a discontinuity. This must + be reset to the current date-and-time when the BR + instance is configured or rebooted."; + } + uses softwire-common:traffic-stat; + } + } + } + } + } + } + + /* + * Notifications + */ + + notification softwire-binding-instance-event { + if-feature "binding-mode"; + description + "Notifications for the binding instance when an entry is + added, modified, or is not valid anymore."; + leaf bind-name { + type leafref { + path "/br-instances/binding/bind-instance/name"; + } + description + "The name of the binding-instance that + generated the notification."; + } + leaf-list invalid-entry { + type leafref { + path "/br-instances/binding/" + + "bind-instance[name=current()/../bind-name]/" + + "binding-table/binding-entry/binding-ipv6info"; + } + description + "Notify the client that a specific binding entry has + expired or is invalid. The binding-ipv6info identifies + an entry."; + } + leaf-list added-entry { + type inet:ipv6-address; + description + "Notify the client that a binding entry has been added. + The IPv6 address of that entry is the index. The client + gets other information from the binding BR about the entry + indexed by that ipv6 address."; + } + leaf-list modified-entry { + type leafref { + path "/br-instances/binding/" + + "bind-instance[name=current()/../bind-name]/" + + "binding-table/binding-entry/binding-ipv6info"; + } + description + "The binding table entry that has been modified."; + } + } + notification softwire-algorithm-instance-event { + if-feature "map-e or map-t"; + description + "Notifications for an algorithm instance when an entry is + added, modified, or is not valid anymore."; + leaf algo-name { + type leafref { + path "/br-instances/algorithm/algo-instance/name"; + } + mandatory true; + description + "Algorithmic instance event."; + } + leaf-list invalid-entry { + type leafref { + path "/br-instances/algorithm/algo-instance/name"; + } + description + "Invalid entry."; + } + leaf-list added-entry { + type leafref { + path "/br-instances/algorithm/algo-instance/name"; + } + description + "Added entry."; + } + leaf-list modified-entry { + type leafref { + path "/br-instances/algorithm/algo-instance/name"; + } + description + "Modified entry."; + } + } +} diff --git a/models/ietf/RFC/ietf-softwire-br@2019-11-16.yang b/models/ietf/RFC/ietf-softwire-br@2019-11-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..708ad44b1d1943635949f58f92ff9fb059edcb89 --- /dev/null +++ b/models/ietf/RFC/ietf-softwire-br@2019-11-16.yang @@ -0,0 +1,597 @@ +module ietf-softwire-br { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-br"; + prefix softwire-br; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types, Section 4"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types, Section 3"; + } + import ietf-softwire-common { + prefix softwire-common; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + (A+P) Softwires"; + } + + organization + "IETF Softwire Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/softwire/> + WG List: <mailto:softwire@ietf.org> + + Author: Qi Sun + <mailto:sunqi.ietf@gmail.com> + + Author: Linhui Sun + <mailto:lh.sunlinh@gmail.com> + + Author: Yong Cui + <mailto:yong@csnet1.cs.tsinghua.edu.cn> + + Editor: Ian Farrer + <mailto:ian.farrer@telekom.de> + + Author: Sladjana Zoric + <mailto:sladjana.zoric@telekom.de> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Rajiv Asati + <mailto:rajiva@cisco.com>"; + + description + "This document defines a YANG module for the configuration and + management of A+P Softwire Border Routers. It covers + Lightweight 4over6, MAP-E, and MAP-T mechanisms. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8676; see + the RFC itself for full legal notices."; + + revision 2019-11-16 { + description + "Initial revision."; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + (A+P) Softwires"; + } + + /* + * Groupings + */ + + grouping port-set { + description + "Describes a set of Layer 4 port numbers. + + This may be a simple port range, or use the Port Set + Identifier (PSID) algorithm to represent a range of transport + layer ports that will be used by a NAPT."; + leaf psid-offset { + type uint8 { + range "0..16"; + } + description + "The number of offset bits. In Lightweight 4over6, + the default value is 0 for assigning one contiguous + port range. In MAP-E/T, the default value is 6, + which means the system ports (0-1023) are excluded by + default and the assigned port ranges are distributed across + the entire port space, depending on either psid-len or the + number of contiguous ports."; + } + leaf psid-len { + type uint8 { + range "0..15"; + } + mandatory true; + description + "The length of PSID, representing the sharing + ratio for an IPv4 address. This, along with ea-len, can + be used to calculate the number of contiguous ports per + port range"; + } + leaf psid { + type uint16; + mandatory true; + description + "Port Set Identifier (PSID) value, which + identifies a set of ports algorithmically."; + } + } + + grouping binding-entry { + description + "The binding BR maintains an address binding table that + contains the binding between the CE's IPv6 address, + the allocated IPv4 address and restricted port-set."; + leaf binding-ipv6info { + type union { + type inet:ipv6-address; + type inet:ipv6-prefix; + } + description + "The IPv6 information for a CE binding entry. + When the IPv6 prefix type is used, + the IPv6 source address of the CE is constructed + according to the description in RFC 7596; + if the IPv6 address type is used, the CE can use + any valid /128 address from a prefix assigned to + the CE."; + reference + "RFC 7596: Lightweight 4over6: An Extension to the Dual-Stack + Lite Architecture"; + } + leaf binding-ipv4-addr { + type inet:ipv4-address; + description + "The IPv4 address assigned to the binding CE, + which is used as the IPv4 external address + for binding CE local NAPT44."; + } + container port-set { + description + "For Lightweight 4over6, the default value + for offset should be 0, to configure one contiguous + port range."; + uses port-set { + refine "psid-offset" { + default "0"; + } + } + } + leaf br-ipv6-addr { + type inet:ipv6-address; + description + "The IPv6 address for binding BR."; + } + } + + /* + * Features + */ + + feature binding-mode { + description + "Binding is used for configuring the Lightweight 4over6 + mechanism. + + Binding-based softwire mechanisms are IPv4-over-IPv6 tunneling + transition mechanisms specifically intended for complete + independence between the IPv6 subnet prefix (and IPv6 address) + and IPv4 address, with or without IPv4 address sharing. + + This is accomplished by maintaining state for each softwire + (per-subscriber state) in the central Border Relay (BR) and + using a hub-and-spoke forwarding architecture. In order to + delegate the NAPT function and achieve IPv4 address sharing, + port-restricted IPv4 addresses needs to be allocated to CEs. + + This feature indicates that the network element can function + as one or more binding-based softwire instances."; + reference + "RFC 7596: Lightweight 4over6: An Extension to the Dual-Stack + Lite Architecture + RFC 7597: Mapping of Address and Port with Encapsulation + (MAP-E) + RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + feature map-e { + description + "MAP-E is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP encapsulation. MAP-E + allows for a reduction of the amount of centralized state + using rules to express IPv4/IPv6 address mappings. This + introduces an algorithmic relationship between the IPv6 subnet + and IPv4 address. + + This feature indicates that the network element can function + as one or more MAP-E softwire instances."; + reference + "RFC 7597: Mapping of Address and Port with Encapsulation + (MAP-E)"; + } + + feature map-t { + description + "MAP-T is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP translation. It + leverages a double stateless NAT64-based solution as well + as the stateless algorithmic address and transport layer + port mapping algorithm defined for MAP-E. + + This feature indicates that the network element can function + as one or more MAP-T softwire instances."; + reference + "RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + container br-instances { + description + "BR instances enabled in a network element."; + choice br-type { + description + "Select binding or algorithmic BR functionality."; + case binding { + if-feature "binding-mode"; + container binding { + description + "binding mechanism (binding table) configuration."; + list bind-instance { + key "name"; + description + "A set of binding instances to be configured."; + leaf name { + type string; + mandatory true; + description + "The name for the binding BR. It is used to uniquely + distinguish a binding instance by its name."; + } + container binding-table-versioning { + description + "binding table's version"; + leaf version { + type uint64; + description + "Version number for this binding table."; + } + leaf date { + type yang:date-and-time; + description + "Timestamp when the binding table was activated. + + A binding instance may be provided with binding + entries that may change in time (e.g., increase + the size of the port set). When a party who is + the victim of abuse presents an external IP + address/port, the version of the binding table + is important because, depending on the version, + a distinct customer may be identified. + + The timestamp is used as a key to find the + appropriate binding table that was put into effect + when an abuse occurred."; + reference + "RFC 7422: Deterministic Address Mapping to Reduce + Logging in Carrier-Grade NAT Deployments"; + } + } + leaf softwire-num-max { + type uint32 { + range "1..max"; + } + mandatory true; + description + "The maximum number of softwires that can be created + on the binding BR."; + } + leaf softwire-payload-mtu { + type uint16; + units "bytes"; + mandatory true; + description + "The payload IPv4 MTU for binding softwire."; + } + leaf softwire-path-mru { + type uint16; + units "bytes"; + mandatory true; + description + "The path MRU for binding softwire"; + reference + "RFC 4213: Basic Transition Mechanisms for IPv6 Hosts + and Routers"; + } + leaf enable-hairpinning { + type boolean; + default "true"; + description + "Enables/disables support for locally forwarding + (hairpinning) traffic between two CEs"; + reference + "RFC 7596: Lightweight 4over6: An Extension to + the Dual-Stack Lite Architecture, Section 6.2"; + } + container binding-table { + description + "binding table"; + list binding-entry { + key "binding-ipv6info"; + description + "binding entry"; + uses binding-entry; + } + } + container icmp-policy { + description + "The binding BR can be configured to process or drop + incoming ICMP messages and to generate outgoing ICMP + error messages."; + container icmpv4-errors { + description + "ICMPv4 error processing configuration"; + leaf allow-incoming-icmpv4 { + type boolean; + default "true"; + description + "Enables the processing of incoming ICMPv4 + packets."; + reference + "RFC 7596: Lightweight 4over6: An Extension to + the Dual-Stack Lite Architecture"; + } + leaf icmpv4-rate { + type uint32; + description + "Rate limit threshold in messages per second + for processing incoming ICMPv4 errors messages"; + } + leaf generate-icmpv4-errors { + type boolean; + default "true"; + description + "Enables the generation of outgoing ICMPv4 error + messages on receipt of an inbound IPv4 packet + with no matching binding table entry."; + reference + "RFC 7596: Lightweight 4over6: + An Extension to the Dual-Stack Lite + Architecture, Section 5.2"; + } + } + container icmpv6-errors { + description + "ICMPv6 error processing configuration"; + leaf generate-icmpv6-errors { + type boolean; + default "true"; + description + "Enables the generation of ICMPv6 error messages + if no matching binding table entry is found for + a received packet."; + reference + "RFC 7596: Lightweight 4over6: + An Extension to the Dual-Stack Lite + Architecture, Section 6.2"; + } + leaf icmpv6-rate { + type uint32; + description + "Rate limit threshold in messages per second + for sending ICMPv6 errors messages"; + reference + "RFC 7596: Lightweight 4over6: An Extension + to the Dual-Stack Lite Architecture, Section 9"; + } + } + } + container traffic-stat { + config false; + description + "Traffic statistics information for the BR."; + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time of the most recent occasion on which the + BR instance suffered a discontinuity. This must + be initialized when the BR instance is configured + or rebooted."; + } + uses softwire-common:traffic-stat; + leaf dropped-icmpv4-packets { + type yang:zero-based-counter64; + description + "ICMPv4 packets that are dropped as a result + of the ICMP policy. Typically, this can be any + incoming ICMPv4 packets if ICMPv4 processing is + disabled or incoming ICMPv4 packets that exceed + the ICMPv4 rate-limit threshold. + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + leaf dropped-icmpv4-bytes { + type yang:zero-based-counter64; + description + "ICMPv4 messages, in bytes, that are dropped as + a result of the ICMP policy. Typically, it + can be any incoming ICMPv4 packets if ICMPv4 + processing is disabled or incoming ICMPv4 + packets that exceed the ICMPv4 rate-limit + threshold. + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + leaf hairpin-ipv4-packets { + type yang:zero-based-counter64; + description + "IPv4 packets locally routed between two CEs + (hairpinned). + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + leaf hairpin-ipv4-bytes { + type yang:zero-based-counter64; + description + "IPv4 bytes locally routed between two CEs + (hairpinned). + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + leaf active-softwire-num { + type uint32; + config false; + description + "The number of currently active softwires on the + binding instance. + + Discontinuities in the value of this counter can + occur at re-initialization of the management + system and at other times as indicated by + the value of 'discontinuity-time'."; + } + } + } + } + } + case algo { + if-feature "map-e or map-t"; + container algorithm { + description + "A set of parameters used for MAP-E/MAP-T"; + list algo-instance { + key "name"; + description + "Instances of algorithm"; + leaf name { + type string; + mandatory true; + description + "The name is used to uniquely identify an algorithm + instance. + + This name can be automatically assigned + or explicitly configured."; + } + uses softwire-common:algorithm-instance; + container port-set { + description + "Indicates a set of ports."; + uses port-set; + } + container traffic-stat { + config false; + description + "Traffic statistics information for the BR."; + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time of the most recent occasion on which the + BR instance suffered a discontinuity. This must + be reset to the current date-and-time when the BR + instance is configured or rebooted."; + } + uses softwire-common:traffic-stat; + } + } + } + } + } + } + + /* + * Notifications + */ + + notification softwire-binding-instance-event { + if-feature "binding-mode"; + description + "Notifications for the binding instance when an entry is + added, modified, or is not valid anymore."; + leaf bind-name { + type leafref { + path "/br-instances/binding/bind-instance/name"; + } + description + "The name of the binding-instance that + generated the notification."; + } + leaf-list invalid-entry { + type leafref { + path "/br-instances/binding/" + + "bind-instance[name=current()/../bind-name]/" + + "binding-table/binding-entry/binding-ipv6info"; + } + description + "Notify the client that a specific binding entry has + expired or is invalid. The binding-ipv6info identifies + an entry."; + } + leaf-list added-entry { + type inet:ipv6-address; + description + "Notify the client that a binding entry has been added. + The IPv6 address of that entry is the index. The client + gets other information from the binding BR about the entry + indexed by that ipv6 address."; + } + leaf-list modified-entry { + type leafref { + path "/br-instances/binding/" + + "bind-instance[name=current()/../bind-name]/" + + "binding-table/binding-entry/binding-ipv6info"; + } + description + "The binding table entry that has been modified."; + } + } + notification softwire-algorithm-instance-event { + if-feature "map-e or map-t"; + description + "Notifications for an algorithm instance when an entry is + added, modified, or is not valid anymore."; + leaf algo-name { + type leafref { + path "/br-instances/algorithm/algo-instance/name"; + } + mandatory true; + description + "Algorithmic instance event."; + } + leaf-list invalid-entry { + type leafref { + path "/br-instances/algorithm/algo-instance/name"; + } + description + "Invalid entry."; + } + leaf-list added-entry { + type leafref { + path "/br-instances/algorithm/algo-instance/name"; + } + description + "Added entry."; + } + leaf-list modified-entry { + type leafref { + path "/br-instances/algorithm/algo-instance/name"; + } + description + "Modified entry."; + } + } +} diff --git a/models/ietf/RFC/ietf-softwire-ce.yang b/models/ietf/RFC/ietf-softwire-ce.yang new file mode 100644 index 0000000000000000000000000000000000000000..b41857033c0ef4edd694861ed67f08a2c2965b70 --- /dev/null +++ b/models/ietf/RFC/ietf-softwire-ce.yang @@ -0,0 +1,259 @@ +module ietf-softwire-ce { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-ce"; + prefix softwire-ce; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types, Section 4"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-softwire-common { + prefix softwire-common; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + Softwires"; + } + import iana-tunnel-type { + prefix iana-tunnel-type; + reference + "RFC 8675: A YANG Data Model for Tunnel Interface Types"; + } + + organization + "IETF Softwire Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/softwire/> + WG List: <mailto:softwire@ietf.org> + + Author: Qi Sun + <mailto:sunqi.ietf@gmail.com> + + Author: Linhui Sun + <mailto:lh.sunlinh@gmail.com> + + Author: Yong Cui + <mailto:yong@csnet1.cs.tsinghua.edu.cn> + + Editor: Ian Farrer + <mailto:ian.farrer@telekom.de> + + Author: Sladjana Zoric + <mailto:sladjana.zoric@telekom.de> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Rajiv Asati + <mailto:rajiva@cisco.com>"; + description + "This document defines a YANG module for the configuration and + management of A+P Softwire Customer Premises Equipment (CEs). + It covers Lightweight 4over6, MAP-E, and MAP-T mechanisms. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8676; see + the RFC itself for full legal notices."; + + revision 2019-11-16 { + description + "Initial revision."; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + (A+P) Softwires"; + } + + /* + * Features + */ + + feature binding-mode { + description + "Binding is used for configuring the Lightweight 4over6 + mechanism. + + Binding-based softwire mechanisms are IPv4-over-IPv6 tunneling + transition mechanisms specifically intended for complete + independence between the IPv6 subnet prefix (and IPv6 address) + and IPv4 address, with or without IPv4 address sharing. + + This is accomplished by maintaining state for each softwire + (per-subscriber state) in the central Border Relay (BR) and + using a hub-and-spoke forwarding architecture. In order to + delegate the NAPT function and achieve IPv4 address sharing, + port-restricted IPv4 addresses needs to be allocated to CEs. + + This feature indicates that the network element can function + as one or more binding-based softwire instances."; + reference + "RFC 7596: Lightweight 4over6: An Extension to the Dual-Stack + Lite Architecture + RFC 7597: Mapping of Address and Port with Encapsulation + (MAP-E) + RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + feature map-e { + description + "MAP-E is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP encapsulation. MAP-E + allows for a reduction of the amount of centralized state + using rules to express IPv4/IPv6 address mappings. This + introduces an algorithmic relationship between the IPv6 + subnet and IPv4 address. + + This feature indicates that the network element can function + as one or more MAP-E softwire instances."; + reference + "RFC 7597: Mapping of Address and Port with + Encapsulation (MAP-E)"; + } + + feature map-t { + description + "MAP-T is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP translation. It + leverages a double stateless NAT64-based solution as well as + the stateless algorithmic address and transport layer port + mapping algorithm defined for MAP-E. + + This feature indicates that the network element can function + as one or more MAP-T softwire instances."; + reference + "RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + // Binding Entry + + grouping binding-entry { + description + "The binding BR (Border Relay) maintains an address + binding table that contains the binding between the CE's + IPv6 address, the allocated IPv4 address, and the + restricted port-set."; + leaf binding-ipv6info { + type union { + type inet:ipv6-address; + type inet:ipv6-prefix; + } + description + "The IPv6 information for a binding entry. + + When the IPv6 prefix type is used, + the IPv6 source address of the CE is constructed + according to the description in RFC 7596. + + If the IPv6 address type is used, the CE can use + any valid /128 address from a prefix assigned to + the CE."; + reference + "RFC 7596: Lightweight 4over6: An Extension + to the Dual-Stack Lite Architecture, Section 5.1"; + } + leaf br-ipv6-addr { + type inet:ipv6-address; + mandatory true; + description + "The IPv6 address of the binding BR."; + } + } + + // configuration and stateful parameters for softwire CE interface + + augment "/if:interfaces/if:interface" { + when "derived-from(if:type, 'iana-tunnel-type:aplusp')"; + description + "Softwire CE interface configuration"; + leaf softwire-payload-mtu { + type uint16; + units "bytes"; + description + "The payload IPv4 MTU for the softwire tunnel."; + } + leaf softwire-path-mru { + type uint16; + units "bytes"; + description + "The path MRU for the softwire (payload + encapsulation + overhead)."; + reference + "RFC 4213: Basic Transition Mechanisms for IPv6 Hosts and + Routers"; + } + choice ce-type { + description + "Sets the softwire CE mechanism"; + case binding { + if-feature "binding-mode"; + description + "CE binding configuration"; + uses binding-entry; + } + case algo { + if-feature "map-e or map-t"; + description + "CE algorithm configuration"; + container algo-instances { + description + "Collection of MAP-E/MAP-T parameters"; + list algo-instance { + key "name"; + description + "MAP forwarding rule instance for + MAP-E/MAP-T"; + leaf name { + type string; + mandatory true; + description + "The name is used to uniquely identify an algorithm + instance. + + This name can be automatically assigned + or explicitly configured."; + } + uses softwire-common:algorithm-instance; + } + } + } + } + } + augment "/if:interfaces/if:interface/if:statistics" { + when "derived-from(../if:type, 'iana-tunnel-type:aplusp')"; + description + "Softwire CE interface statistics."; + uses softwire-common:traffic-stat; + } + + /* + * Notifications + */ + + notification softwire-ce-event { + if-feature "binding-mode"; + description + "CE notification"; + leaf ce-binding-ipv6-addr-change { + type inet:ipv6-address; + mandatory true; + description + "This notification is generated whenever the CE's binding + IPv6 address changes for any reason."; + } + } +} diff --git a/models/ietf/RFC/ietf-softwire-ce@2019-11-16.yang b/models/ietf/RFC/ietf-softwire-ce@2019-11-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..b41857033c0ef4edd694861ed67f08a2c2965b70 --- /dev/null +++ b/models/ietf/RFC/ietf-softwire-ce@2019-11-16.yang @@ -0,0 +1,259 @@ +module ietf-softwire-ce { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-ce"; + prefix softwire-ce; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types, Section 4"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-softwire-common { + prefix softwire-common; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + Softwires"; + } + import iana-tunnel-type { + prefix iana-tunnel-type; + reference + "RFC 8675: A YANG Data Model for Tunnel Interface Types"; + } + + organization + "IETF Softwire Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/softwire/> + WG List: <mailto:softwire@ietf.org> + + Author: Qi Sun + <mailto:sunqi.ietf@gmail.com> + + Author: Linhui Sun + <mailto:lh.sunlinh@gmail.com> + + Author: Yong Cui + <mailto:yong@csnet1.cs.tsinghua.edu.cn> + + Editor: Ian Farrer + <mailto:ian.farrer@telekom.de> + + Author: Sladjana Zoric + <mailto:sladjana.zoric@telekom.de> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Rajiv Asati + <mailto:rajiva@cisco.com>"; + description + "This document defines a YANG module for the configuration and + management of A+P Softwire Customer Premises Equipment (CEs). + It covers Lightweight 4over6, MAP-E, and MAP-T mechanisms. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8676; see + the RFC itself for full legal notices."; + + revision 2019-11-16 { + description + "Initial revision."; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + (A+P) Softwires"; + } + + /* + * Features + */ + + feature binding-mode { + description + "Binding is used for configuring the Lightweight 4over6 + mechanism. + + Binding-based softwire mechanisms are IPv4-over-IPv6 tunneling + transition mechanisms specifically intended for complete + independence between the IPv6 subnet prefix (and IPv6 address) + and IPv4 address, with or without IPv4 address sharing. + + This is accomplished by maintaining state for each softwire + (per-subscriber state) in the central Border Relay (BR) and + using a hub-and-spoke forwarding architecture. In order to + delegate the NAPT function and achieve IPv4 address sharing, + port-restricted IPv4 addresses needs to be allocated to CEs. + + This feature indicates that the network element can function + as one or more binding-based softwire instances."; + reference + "RFC 7596: Lightweight 4over6: An Extension to the Dual-Stack + Lite Architecture + RFC 7597: Mapping of Address and Port with Encapsulation + (MAP-E) + RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + feature map-e { + description + "MAP-E is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP encapsulation. MAP-E + allows for a reduction of the amount of centralized state + using rules to express IPv4/IPv6 address mappings. This + introduces an algorithmic relationship between the IPv6 + subnet and IPv4 address. + + This feature indicates that the network element can function + as one or more MAP-E softwire instances."; + reference + "RFC 7597: Mapping of Address and Port with + Encapsulation (MAP-E)"; + } + + feature map-t { + description + "MAP-T is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP translation. It + leverages a double stateless NAT64-based solution as well as + the stateless algorithmic address and transport layer port + mapping algorithm defined for MAP-E. + + This feature indicates that the network element can function + as one or more MAP-T softwire instances."; + reference + "RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + // Binding Entry + + grouping binding-entry { + description + "The binding BR (Border Relay) maintains an address + binding table that contains the binding between the CE's + IPv6 address, the allocated IPv4 address, and the + restricted port-set."; + leaf binding-ipv6info { + type union { + type inet:ipv6-address; + type inet:ipv6-prefix; + } + description + "The IPv6 information for a binding entry. + + When the IPv6 prefix type is used, + the IPv6 source address of the CE is constructed + according to the description in RFC 7596. + + If the IPv6 address type is used, the CE can use + any valid /128 address from a prefix assigned to + the CE."; + reference + "RFC 7596: Lightweight 4over6: An Extension + to the Dual-Stack Lite Architecture, Section 5.1"; + } + leaf br-ipv6-addr { + type inet:ipv6-address; + mandatory true; + description + "The IPv6 address of the binding BR."; + } + } + + // configuration and stateful parameters for softwire CE interface + + augment "/if:interfaces/if:interface" { + when "derived-from(if:type, 'iana-tunnel-type:aplusp')"; + description + "Softwire CE interface configuration"; + leaf softwire-payload-mtu { + type uint16; + units "bytes"; + description + "The payload IPv4 MTU for the softwire tunnel."; + } + leaf softwire-path-mru { + type uint16; + units "bytes"; + description + "The path MRU for the softwire (payload + encapsulation + overhead)."; + reference + "RFC 4213: Basic Transition Mechanisms for IPv6 Hosts and + Routers"; + } + choice ce-type { + description + "Sets the softwire CE mechanism"; + case binding { + if-feature "binding-mode"; + description + "CE binding configuration"; + uses binding-entry; + } + case algo { + if-feature "map-e or map-t"; + description + "CE algorithm configuration"; + container algo-instances { + description + "Collection of MAP-E/MAP-T parameters"; + list algo-instance { + key "name"; + description + "MAP forwarding rule instance for + MAP-E/MAP-T"; + leaf name { + type string; + mandatory true; + description + "The name is used to uniquely identify an algorithm + instance. + + This name can be automatically assigned + or explicitly configured."; + } + uses softwire-common:algorithm-instance; + } + } + } + } + } + augment "/if:interfaces/if:interface/if:statistics" { + when "derived-from(../if:type, 'iana-tunnel-type:aplusp')"; + description + "Softwire CE interface statistics."; + uses softwire-common:traffic-stat; + } + + /* + * Notifications + */ + + notification softwire-ce-event { + if-feature "binding-mode"; + description + "CE notification"; + leaf ce-binding-ipv6-addr-change { + type inet:ipv6-address; + mandatory true; + description + "This notification is generated whenever the CE's binding + IPv6 address changes for any reason."; + } + } +} diff --git a/models/ietf/RFC/ietf-softwire-common.yang b/models/ietf/RFC/ietf-softwire-common.yang new file mode 100644 index 0000000000000000000000000000000000000000..5e825bf0aea665515c1638da341e732401e801ca --- /dev/null +++ b/models/ietf/RFC/ietf-softwire-common.yang @@ -0,0 +1,406 @@ +module ietf-softwire-common { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-common"; + prefix softwire-common; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types, Section 4"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types, Section 3"; + } + + organization + "IETF Softwire Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/softwire/> + WG List: <mailto:softwire@ietf.org> + + Author: Qi Sun + <mailto:sunqi.ietf@gmail.com> + + Author: Linhui Sun + <mailto:lh.sunlinh@gmail.com> + + Author: Yong Cui + <mailto:yong@csnet1.cs.tsinghua.edu.cn> + + Editor: Ian Farrer + <mailto:ian.farrer@telekom.de> + + Author: Sladjana Zoric + <mailto:sladjana.zoric@telekom.de> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Rajiv Asati + <mailto:rajiva@cisco.com>"; + description + "This document defines a YANG module defining types + common to all A+P modules. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8676; see + the RFC itself for full legal notices."; + + revision 2019-11-16 { + description + "Initial revision."; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + (A+P) Softwires"; + } + + feature map-e { + description + "MAP-E is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP encapsulation. MAP-E + allows for a reduction of the amount of centralized state + using rules to express IPv4/IPv6 address mappings. This + introduces an algorithmic relationship between the IPv6 + subnet and IPv4 address. + + This feature indicates that the network element can function + as one or more MAP-E softwire instances."; + reference + "RFC 7597: Mapping of Address and Port with Encapsulation + (MAP-E)"; + } + + feature map-t { + description + "MAP-T is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP translation. It + leverages a double stateless NAT64-based solution as well as + the stateless algorithmic address and transport layer + port mapping algorithm defined for MAP-E. + + This feature indicates that the network element can function + as one or more MAP-T softwire instances."; + reference + "RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + /* + * Groupings + */ + + grouping algorithm-instance { + description + "A collection of parameters that is used for MAP-E/MAP-T."; + leaf enable { + type boolean; + description + "Enable/disable an individual MAP-E or MAP-T rule."; + } + container algo-versioning { + description + "Version number for this algorithm instance"; + leaf version { + type uint64; + description + "A version number for the mapping algorithm + rules provided to the algorithm instance"; + } + leaf date { + type yang:date-and-time; + description + "Timestamp when the algorithm instance was activated. + + An algorithm instance may be provided with mapping + rules that may change in time (for example, increase + the size of the port set). When a party who is the victim + of abuse presents an external IP address/port, the version + of the algorithm is important because depending on + the version, a distinct customer may be identified. + + The timestamp is used as a key to find the appropriate + algorithm that was put into effect when an abuse + occurred."; + reference + "RFC 7422: Deterministic Address Mapping to Reduce + Logging in Carrier-Grade NAT Deployments"; + } + } + choice data-plane { + description + "Selects MAP-E (encapsulation) or MAP-T + (translation)"; + case encapsulation { + if-feature "map-e"; + description + "encapsulation for MAP-E"; + leaf br-ipv6-addr { + type inet:ipv6-address; + mandatory true; + description + "The IPv6 address of the MAP-E BR."; + } + } + case translation { + if-feature "map-t"; + description + "translation for MAP-T"; + leaf dmr-ipv6-prefix { + type inet:ipv6-prefix; + description + "The IPv6 prefix of the MAP-T BR."; + } + } + } + leaf ea-len { + type uint8; + mandatory true; + description + "Embedded Address (EA) bits are the IPv4 EA-bits in the IPv6 + address identifying an IPv4 prefix/address (or part thereof) + or a shared IPv4 address (or part thereof) and a port-set + identifier. The length of the EA-bits is defined as part of + a MAP rule for a MAP domain."; + } + leaf rule-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "The Rule IPv6 prefix defined in the mapping rule."; + } + leaf rule-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "The Rule IPv4 prefix defined in the mapping rule."; + } + leaf forwarding { + type boolean; + mandatory true; + description + "This parameter specifies whether the rule may be used for + forwarding; if set, this rule is used as a Forwarding + Mapping Rule (FMR); if not set, this rule is a Basic + Mapping Rule (BMR) only and must not be used for + forwarding."; + } + } + + grouping traffic-stat { + description + "Traffic statistics"; + leaf sent-ipv4-packets { + type yang:zero-based-counter64; + description + "Number of decapsulated and forwarded IPv4 packets. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf sent-ipv4-bytes { + type yang:zero-based-counter64; + description + "Decapsulated/translated IPv4 traffic sent, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf sent-ipv6-packets { + type yang:zero-based-counter64; + description + "Number of encapsulated IPv6 packets sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf sent-ipv6-bytes { + type yang:zero-based-counter64; + description + "Encapsulated IPv6 traffic sent, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf rcvd-ipv4-packets { + type yang:zero-based-counter64; + description + "Number of IPv4 packets received. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf rcvd-ipv4-bytes { + type yang:zero-based-counter64; + description + "IPv4 traffic received, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf rcvd-ipv6-packets { + type yang:zero-based-counter64; + description + "Number of IPv4-in-IPv6 packets received. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf rcvd-ipv6-bytes { + type yang:zero-based-counter64; + description + "IPv4-in-IPv6 traffic received, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv4-packets { + type yang:zero-based-counter64; + description + "Number of IPv4 packets dropped at the + Internet-facing interface. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv4-bytes { + type yang:zero-based-counter64; + description + "IPv4 traffic dropped at the Internet-facing + interface, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv6-packets { + type yang:zero-based-counter64; + description + "Number of IPv4-in-IPv6 packets dropped. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv6-bytes { + type yang:zero-based-counter64; + description + "IPv4-in-IPv6 traffic dropped, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv4-fragments { + type yang:zero-based-counter64; + description + "Number of fragmented IPv4 packets dropped. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv4-fragment-bytes { + type yang:zero-based-counter64; + description + "Fragmented IPv4 traffic dropped, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf ipv6-fragments-reassembled { + type yang:zero-based-counter64; + description + "Number of IPv6 fragments successfully reassembled. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf ipv6-fragments-bytes-reassembled { + type yang:zero-based-counter64; + description + "IPv6 fragments successfully reassembled, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf out-icmpv4-error-packets { + type yang:zero-based-counter64; + description + "Internally generated ICMPv4 error packets. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf out-icmpv4-error-bytes { + type yang:zero-based-counter64; + description + "Internally generated ICMPv4 error messages, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf out-icmpv6-error-packets { + type yang:zero-based-counter64; + description + "Internally generated ICMPv6 error packets. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf out-icmpv6-error-bytes { + type yang:zero-based-counter64; + description + "Internally generated ICMPv6 error messages, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + } +} diff --git a/models/ietf/RFC/ietf-softwire-common@2019-11-16.yang b/models/ietf/RFC/ietf-softwire-common@2019-11-16.yang new file mode 100644 index 0000000000000000000000000000000000000000..5e825bf0aea665515c1638da341e732401e801ca --- /dev/null +++ b/models/ietf/RFC/ietf-softwire-common@2019-11-16.yang @@ -0,0 +1,406 @@ +module ietf-softwire-common { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-common"; + prefix softwire-common; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types, Section 4"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types, Section 3"; + } + + organization + "IETF Softwire Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/softwire/> + WG List: <mailto:softwire@ietf.org> + + Author: Qi Sun + <mailto:sunqi.ietf@gmail.com> + + Author: Linhui Sun + <mailto:lh.sunlinh@gmail.com> + + Author: Yong Cui + <mailto:yong@csnet1.cs.tsinghua.edu.cn> + + Editor: Ian Farrer + <mailto:ian.farrer@telekom.de> + + Author: Sladjana Zoric + <mailto:sladjana.zoric@telekom.de> + + Editor: Mohamed Boucadair + <mailto:mohamed.boucadair@orange.com> + + Author: Rajiv Asati + <mailto:rajiva@cisco.com>"; + description + "This document defines a YANG module defining types + common to all A+P modules. + + Copyright (c) 2019 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8676; see + the RFC itself for full legal notices."; + + revision 2019-11-16 { + description + "Initial revision."; + reference + "RFC 8676: YANG Modules for IPv4-in-IPv6 Address plus Port + (A+P) Softwires"; + } + + feature map-e { + description + "MAP-E is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP encapsulation. MAP-E + allows for a reduction of the amount of centralized state + using rules to express IPv4/IPv6 address mappings. This + introduces an algorithmic relationship between the IPv6 + subnet and IPv4 address. + + This feature indicates that the network element can function + as one or more MAP-E softwire instances."; + reference + "RFC 7597: Mapping of Address and Port with Encapsulation + (MAP-E)"; + } + + feature map-t { + description + "MAP-T is an IPv6 transition mechanism for transporting IPv4 + packets across an IPv6 network using IP translation. It + leverages a double stateless NAT64-based solution as well as + the stateless algorithmic address and transport layer + port mapping algorithm defined for MAP-E. + + This feature indicates that the network element can function + as one or more MAP-T softwire instances."; + reference + "RFC 7599: Mapping of Address and Port using Translation + (MAP-T)"; + } + + /* + * Groupings + */ + + grouping algorithm-instance { + description + "A collection of parameters that is used for MAP-E/MAP-T."; + leaf enable { + type boolean; + description + "Enable/disable an individual MAP-E or MAP-T rule."; + } + container algo-versioning { + description + "Version number for this algorithm instance"; + leaf version { + type uint64; + description + "A version number for the mapping algorithm + rules provided to the algorithm instance"; + } + leaf date { + type yang:date-and-time; + description + "Timestamp when the algorithm instance was activated. + + An algorithm instance may be provided with mapping + rules that may change in time (for example, increase + the size of the port set). When a party who is the victim + of abuse presents an external IP address/port, the version + of the algorithm is important because depending on + the version, a distinct customer may be identified. + + The timestamp is used as a key to find the appropriate + algorithm that was put into effect when an abuse + occurred."; + reference + "RFC 7422: Deterministic Address Mapping to Reduce + Logging in Carrier-Grade NAT Deployments"; + } + } + choice data-plane { + description + "Selects MAP-E (encapsulation) or MAP-T + (translation)"; + case encapsulation { + if-feature "map-e"; + description + "encapsulation for MAP-E"; + leaf br-ipv6-addr { + type inet:ipv6-address; + mandatory true; + description + "The IPv6 address of the MAP-E BR."; + } + } + case translation { + if-feature "map-t"; + description + "translation for MAP-T"; + leaf dmr-ipv6-prefix { + type inet:ipv6-prefix; + description + "The IPv6 prefix of the MAP-T BR."; + } + } + } + leaf ea-len { + type uint8; + mandatory true; + description + "Embedded Address (EA) bits are the IPv4 EA-bits in the IPv6 + address identifying an IPv4 prefix/address (or part thereof) + or a shared IPv4 address (or part thereof) and a port-set + identifier. The length of the EA-bits is defined as part of + a MAP rule for a MAP domain."; + } + leaf rule-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "The Rule IPv6 prefix defined in the mapping rule."; + } + leaf rule-ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "The Rule IPv4 prefix defined in the mapping rule."; + } + leaf forwarding { + type boolean; + mandatory true; + description + "This parameter specifies whether the rule may be used for + forwarding; if set, this rule is used as a Forwarding + Mapping Rule (FMR); if not set, this rule is a Basic + Mapping Rule (BMR) only and must not be used for + forwarding."; + } + } + + grouping traffic-stat { + description + "Traffic statistics"; + leaf sent-ipv4-packets { + type yang:zero-based-counter64; + description + "Number of decapsulated and forwarded IPv4 packets. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf sent-ipv4-bytes { + type yang:zero-based-counter64; + description + "Decapsulated/translated IPv4 traffic sent, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf sent-ipv6-packets { + type yang:zero-based-counter64; + description + "Number of encapsulated IPv6 packets sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf sent-ipv6-bytes { + type yang:zero-based-counter64; + description + "Encapsulated IPv6 traffic sent, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf rcvd-ipv4-packets { + type yang:zero-based-counter64; + description + "Number of IPv4 packets received. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf rcvd-ipv4-bytes { + type yang:zero-based-counter64; + description + "IPv4 traffic received, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf rcvd-ipv6-packets { + type yang:zero-based-counter64; + description + "Number of IPv4-in-IPv6 packets received. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf rcvd-ipv6-bytes { + type yang:zero-based-counter64; + description + "IPv4-in-IPv6 traffic received, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv4-packets { + type yang:zero-based-counter64; + description + "Number of IPv4 packets dropped at the + Internet-facing interface. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv4-bytes { + type yang:zero-based-counter64; + description + "IPv4 traffic dropped at the Internet-facing + interface, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv6-packets { + type yang:zero-based-counter64; + description + "Number of IPv4-in-IPv6 packets dropped. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv6-bytes { + type yang:zero-based-counter64; + description + "IPv4-in-IPv6 traffic dropped, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv4-fragments { + type yang:zero-based-counter64; + description + "Number of fragmented IPv4 packets dropped. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf dropped-ipv4-fragment-bytes { + type yang:zero-based-counter64; + description + "Fragmented IPv4 traffic dropped, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf ipv6-fragments-reassembled { + type yang:zero-based-counter64; + description + "Number of IPv6 fragments successfully reassembled. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf ipv6-fragments-bytes-reassembled { + type yang:zero-based-counter64; + description + "IPv6 fragments successfully reassembled, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf out-icmpv4-error-packets { + type yang:zero-based-counter64; + description + "Internally generated ICMPv4 error packets. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf out-icmpv4-error-bytes { + type yang:zero-based-counter64; + description + "Internally generated ICMPv4 error messages, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf out-icmpv6-error-packets { + type yang:zero-based-counter64; + description + "Internally generated ICMPv6 error packets. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + leaf out-icmpv6-error-bytes { + type yang:zero-based-counter64; + description + "Internally generated ICMPv6 error messages, in bytes. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + } + } +} diff --git a/models/ietf/RFC/ietf-subscribed-notifications.yang b/models/ietf/RFC/ietf-subscribed-notifications.yang new file mode 100644 index 0000000000000000000000000000000000000000..e04593c3f2b3b02bca67eadad5f04f714e8d1719 --- /dev/null +++ b/models/ietf/RFC/ietf-subscribed-notifications.yang @@ -0,0 +1,1350 @@ +module ietf-subscribed-notifications { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"; + prefix sn; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + import ietf-network-instance { + prefix ni; + reference + "RFC 8529: YANG Data Model for Network Instances"; + } + import ietf-restconf { + prefix rc; + reference + "RFC 8040: RESTCONF Protocol"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https:/datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Alexander Clemm + <mailto:ludwig@clemm.org> + + Author: Eric Voit + <mailto:evoit@cisco.com> + + Author: Alberto Gonzalez Prieto + <mailto:alberto.gonzalez@microsoft.com> + + Author: Einar Nilsen-Nygaard + <mailto:einarnn@cisco.com> + + Author: Ambika Prasad Tripathy + <mailto:ambtripa@cisco.com>"; + description + "This module defines a YANG data model for subscribing to event + records and receiving matching content in notification messages. + + 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. + + Copyright (c) 2019 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 Simplified 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 8639; see the + RFC itself for full legal notices."; + + revision 2019-09-09 { + description + "Initial version."; + reference + "RFC 8639: A YANG Data Model for Subscriptions to + Event Notifications"; + } + + /* + * FEATURES + */ + + feature configured { + description + "This feature indicates that configuration of subscriptions is + supported."; + } + + feature dscp { + description + "This feature indicates that a publisher supports the ability + to set the Differentiated Services Code Point (DSCP) value in + outgoing packets."; + } + + feature encode-json { + description + "This feature indicates that JSON encoding of notification + messages is supported."; + } + + feature encode-xml { + description + "This feature indicates that XML encoding of notification + messages is supported."; + } + + feature interface-designation { + description + "This feature indicates that a publisher supports sourcing all + receiver interactions for a configured subscription from a + single designated egress interface."; + } + + feature qos { + description + "This feature indicates that a publisher supports absolute + dependencies of one subscription's traffic over another + as well as weighted bandwidth sharing between subscriptions. + Both of these are Quality of Service (QoS) features that allow + differentiated treatment of notification messages between a + publisher and a specific receiver."; + } + + feature replay { + description + "This feature indicates that historical event record replay is + supported. With replay, it is possible for past event records + to be streamed in chronological order."; + } + + feature subtree { + description + "This feature indicates support for YANG subtree filtering."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 6"; + } + + feature supports-vrf { + description + "This feature indicates that a publisher supports VRF + configuration for configured subscriptions. VRF support for + dynamic subscriptions does not require this feature."; + reference + "RFC 8529: YANG Data Model for Network Instances, + Section 6"; + } + + feature xpath { + description + "This feature indicates support for XPath filtering."; + reference + "XML Path Language (XPath) Version 1.0 + (https://www.w3.org/TR/1999/REC-xpath-19991116)"; + } + + /* + * EXTENSIONS + */ + + extension subscription-state-notification { + description + "This statement applies only to notifications. It indicates + that the notification is a subscription state change + notification. Therefore, it does not participate in a regular + event stream and does not need to be specifically subscribed + to in order to be received. This statement can only occur as + a substatement of the YANG 'notification' statement. This + statement is not for use outside of this YANG module."; + } + + /* + * IDENTITIES + */ + /* Identities for RPC and notification errors */ + + identity delete-subscription-error { + description + "Base identity for the problem found while attempting to + fulfill either a 'delete-subscription' RPC request or a + 'kill-subscription' RPC request."; + } + + identity establish-subscription-error { + description + "Base identity for the problem found while attempting to + fulfill an 'establish-subscription' RPC request."; + } + + identity modify-subscription-error { + description + "Base identity for the problem found while attempting to + fulfill a 'modify-subscription' RPC request."; + } + + identity subscription-suspended-reason { + description + "Base identity for the problem condition communicated to a + receiver as part of a 'subscription-suspended' + notification."; + } + + identity subscription-terminated-reason { + description + "Base identity for the problem condition communicated to a + receiver as part of a 'subscription-terminated' + notification."; + } + + identity dscp-unavailable { + base establish-subscription-error; + if-feature "dscp"; + description + "The publisher is unable to mark notification messages with + prioritization information in a way that will be respected + during network transit."; + } + + identity encoding-unsupported { + base establish-subscription-error; + description + "Unable to encode notification messages in the desired + format."; + } + + identity filter-unavailable { + base subscription-terminated-reason; + description + "Referenced filter does not exist. This means a receiver is + referencing a filter that doesn't exist or to which it + does not have access permissions."; + } + + identity filter-unsupported { + base establish-subscription-error; + base modify-subscription-error; + description + "Cannot parse syntax in the filter. This failure can be from + a syntax error or a syntax too complex to be processed by the + publisher."; + } + + identity insufficient-resources { + base establish-subscription-error; + base modify-subscription-error; + base subscription-suspended-reason; + description + "The publisher does not have sufficient resources to support + the requested subscription. An example might be that + allocated CPU is too limited to generate the desired set of + notification messages."; + } + + identity no-such-subscription { + base modify-subscription-error; + base delete-subscription-error; + base subscription-terminated-reason; + description + "Referenced subscription doesn't exist. This may be as a + result of a nonexistent subscription ID, an ID that belongs to + another subscriber, or an ID for a configured subscription."; + } + + identity replay-unsupported { + base establish-subscription-error; + if-feature "replay"; + description + "Replay cannot be performed for this subscription. This means + the publisher will not provide the requested historic + information from the event stream via replay to this + receiver."; + } + + identity stream-unavailable { + base subscription-terminated-reason; + description + "Not a subscribable event stream. This means the referenced + event stream is not available for subscription by the + receiver."; + } + + identity suspension-timeout { + base subscription-terminated-reason; + description + "Termination of a previously suspended subscription. The + publisher has eliminated the subscription, as it exceeded a + time limit for suspension."; + } + + identity unsupportable-volume { + base subscription-suspended-reason; + description + "The publisher does not have the network bandwidth needed to + get the volume of generated information intended for a + receiver."; + } + + /* Identities for encodings */ + + identity configurable-encoding { + description + "If a transport identity derives from this identity, it means + that it supports configurable encodings. An example of a + configurable encoding might be a new identity such as + 'encode-cbor'. Such an identity could use + 'configurable-encoding' as its base. This would allow a + dynamic subscription encoded in JSON (RFC 8259) to request + that notification messages be encoded via the Concise Binary + Object Representation (CBOR) (RFC 7049). Further details for + any specific configurable encoding would be explored in a + transport document based on this specification."; + reference + "RFC 8259: The JavaScript Object Notation (JSON) Data + Interchange Format + RFC 7049: Concise Binary Object Representation (CBOR)"; + } + + identity encoding { + description + "Base identity to represent data encodings."; + } + + identity encode-xml { + base encoding; + if-feature "encode-xml"; + description + "Encode data using XML as described in RFC 7950."; + reference + "RFC 7950: The YANG 1.1 Data Modeling Language"; + } + + identity encode-json { + base encoding; + if-feature "encode-json"; + description + "Encode data using JSON as described in RFC 7951."; + reference + "RFC 7951: JSON Encoding of Data Modeled with YANG"; + } + + /* Identities for transports */ + + identity transport { + description + "An identity that represents the underlying mechanism for + passing notification messages."; + } + + /* + * TYPEDEFs + */ + + typedef encoding { + type identityref { + base encoding; + } + description + "Specifies a data encoding, e.g., for a data subscription."; + } + + typedef stream-filter-ref { + type leafref { + path "/sn:filters/sn:stream-filter/sn:name"; + } + description + "This type is used to reference an event stream filter."; + } + + typedef stream-ref { + type leafref { + path "/sn:streams/sn:stream/sn:name"; + } + description + "This type is used to reference a system-provided + event stream."; + } + + typedef subscription-id { + type uint32; + description + "A type for subscription identifiers."; + } + + typedef transport { + type identityref { + base transport; + } + description + "Specifies the transport used to send notification messages + to a receiver."; + } + + /* + * GROUPINGS + */ + + grouping stream-filter-elements { + description + "This grouping defines the base for filters applied to event + streams."; + choice filter-spec { + description + "The content filter specification for this request."; + anydata stream-subtree-filter { + if-feature "subtree"; + description + "Event stream evaluation criteria encoded in the syntax of + a subtree filter as defined in RFC 6241, Section 6. + + The subtree filter is applied to the representation of + individual, delineated event records as contained in the + event stream. + + If the subtree filter returns a non-empty node set, the + filter matches the event record, and the event record is + included in the notification message sent to the + receivers."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 6"; + } + leaf stream-xpath-filter { + if-feature "xpath"; + type yang:xpath1.0; + description + "Event stream evaluation criteria encoded in the syntax of + an XPath 1.0 expression. + + The XPath expression is evaluated on the representation of + individual, delineated event records as contained in + the event stream. + + The result of the XPath expression is converted to a + boolean value using the standard XPath 1.0 rules. If the + boolean value is 'true', the filter matches the event + record, and the event record is included in the + notification message sent to the receivers. + + The expression is evaluated in the following XPath + context: + + o The set of namespace declarations is the set of + prefix and namespace pairs for all YANG modules + implemented by the server, where the prefix is the + YANG module name and the namespace is as defined by + the 'namespace' statement in the YANG module. + + If the leaf is encoded in XML, all namespace + declarations in scope on the 'stream-xpath-filter' + leaf element are added to the set of namespace + declarations. If a prefix found in the XML is + already present in the set of namespace + declarations, the namespace in the XML is used. + + o The set of variable bindings is empty. + + o The function library is comprised of the core + function library and the XPath functions defined in + Section 10 in RFC 7950. + + o The context node is the root node."; + reference + "XML Path Language (XPath) Version 1.0 + (https://www.w3.org/TR/1999/REC-xpath-19991116) + RFC 7950: The YANG 1.1 Data Modeling Language, + Section 10"; + } + } + } + + grouping update-qos { + description + "This grouping describes QoS information concerning a + subscription. This information is passed to lower layers + for transport prioritization and treatment."; + leaf dscp { + if-feature "dscp"; + type inet:dscp; + default "0"; + description + "The desired network transport priority level. This is the + priority set on notification messages encapsulating the + results of the subscription. This transport priority is + shared for all receivers of a given subscription."; + } + leaf weighting { + if-feature "qos"; + type uint8 { + range "0 .. 255"; + } + description + "Relative weighting for a subscription. Larger weights get + more resources. Allows an underlying transport layer to + perform informed load-balance allocations between various + subscriptions."; + reference + "RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2), + Section 5.3.2"; + } + leaf dependency { + if-feature "qos"; + type subscription-id; + description + "Provides the 'subscription-id' of a parent subscription. + The parent subscription has absolute precedence should + that parent have push updates ready to egress the publisher. + In other words, there should be no streaming of objects from + the current subscription if the parent has something ready + to push. + + If a dependency is asserted via configuration or via an RPC + but the referenced 'subscription-id' does not exist, the + dependency is silently discarded. If a referenced + subscription is deleted, this dependency is removed."; + reference + "RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2), + Section 5.3.1"; + } + } + + grouping subscription-policy-modifiable { + description + "This grouping describes all objects that may be changed + in a subscription."; + choice target { + mandatory true; + description + "Identifies the source of information against which a + subscription is being applied as well as specifics on the + subset of information desired from that source."; + case stream { + choice stream-filter { + description + "An event stream filter can be applied to a subscription. + That filter will either come referenced from a global + list or be provided in the subscription itself."; + case by-reference { + description + "Apply a filter that has been configured separately."; + leaf stream-filter-name { + type stream-filter-ref; + mandatory true; + description + "References an existing event stream filter that is + to be applied to an event stream for the + subscription."; + } + } + case within-subscription { + description + "A local definition allows a filter to have the same + lifecycle as the subscription."; + uses stream-filter-elements; + } + } + } + } + leaf stop-time { + type yang:date-and-time; + description + "Identifies a time after which notification messages for a + subscription should not be sent. If 'stop-time' is not + present, the notification messages will continue until the + subscription is terminated. If 'replay-start-time' exists, + 'stop-time' must be for a subsequent time. If + 'replay-start-time' doesn't exist, 'stop-time', when + established, must be for a future time."; + } + } + + grouping subscription-policy-dynamic { + description + "This grouping describes the only information concerning a + subscription that can be passed over the RPCs defined in this + data model."; + uses subscription-policy-modifiable { + augment "target/stream" { + description + "Adds additional objects that can be modified by an RPC."; + leaf stream { + type stream-ref { + require-instance false; + } + mandatory true; + description + "Indicates the event stream to be considered for + this subscription."; + } + leaf replay-start-time { + if-feature "replay"; + type yang:date-and-time; + config false; + description + "Used to trigger the 'replay' feature for a dynamic + subscription, where event records that are selected + need to be at or after the specified starting time. If + 'replay-start-time' is not present, this is not a replay + subscription and event record push should start + immediately. It is never valid to specify start times + that are later than or equal to the current time."; + } + } + } + uses update-qos; + } + + grouping subscription-policy { + description + "This grouping describes the full set of policy information + concerning both dynamic and configured subscriptions, with the + exclusion of both receivers and networking information + specific to the publisher, such as what interface should be + used to transmit notification messages."; + uses subscription-policy-dynamic; + leaf transport { + if-feature "configured"; + type transport; + description + "For a configured subscription, this leaf specifies the + transport used to deliver messages destined for all + receivers of that subscription."; + } + leaf encoding { + when 'not(../transport) or derived-from(../transport, + "sn:configurable-encoding")'; + type encoding; + description + "The type of encoding for notification messages. For a + dynamic subscription, if not included as part of an + 'establish-subscription' RPC, the encoding will be populated + with the encoding used by that RPC. For a configured + subscription, if not explicitly configured, the encoding + will be the default encoding for an underlying transport."; + } + leaf purpose { + if-feature "configured"; + type string; + description + "Open text allowing a configuring entity to embed the + originator or other specifics of this subscription."; + } + } + + /* + * RPCs + */ + + rpc establish-subscription { + description + "This RPC allows a subscriber to create (and possibly + negotiate) a subscription on its own behalf. If successful, + the subscription remains in effect for the duration of the + subscriber's association with the publisher or until the + subscription is terminated. If an error occurs or the + publisher cannot meet the terms of a subscription, an RPC + error is returned, and the subscription is not created. + In that case, the RPC reply's 'error-info' MAY include + suggested parameter settings that would have a higher + likelihood of succeeding in a subsequent + 'establish-subscription' request."; + input { + uses subscription-policy-dynamic; + leaf encoding { + type encoding; + description + "The type of encoding for the subscribed data. If not + included as part of the RPC, the encoding MUST be set by + the publisher to be the encoding used by this RPC."; + } + } + output { + leaf id { + type subscription-id; + mandatory true; + description + "Identifier used for this subscription."; + } + leaf replay-start-time-revision { + if-feature "replay"; + type yang:date-and-time; + description + "If a replay has been requested, this object represents + the earliest time covered by the event buffer for the + requested event stream. The value of this object is the + 'replay-log-aged-time' if it exists. Otherwise, it is + the 'replay-log-creation-time'. All buffered event + records after this time will be replayed to a receiver. + This object will only be sent if the starting time has + been revised to be later than the time requested by the + subscriber."; + } + } + } + + rc:yang-data establish-subscription-stream-error-info { + container establish-subscription-stream-error-info { + description + "If any 'establish-subscription' RPC parameters are + unsupportable against the event stream, a subscription + is not created and the RPC error response MUST indicate the + reason why the subscription failed to be created. This + yang-data MAY be inserted as structured data in a + subscription's RPC error response to indicate the reason for + the failure. This yang-data MUST be inserted if hints are + to be provided back to the subscriber."; + leaf reason { + type identityref { + base establish-subscription-error; + } + description + "Indicates the reason why the subscription has failed to + be created to a targeted event stream."; + } + leaf filter-failure-hint { + type string; + description + "Information describing where and/or why a provided + filter was unsupportable for a subscription. The + syntax and semantics of this hint are + implementation specific."; + } + } + } + + rpc modify-subscription { + description + "This RPC allows a subscriber to modify a dynamic + subscription's parameters. If successful, the changed + subscription parameters remain in effect for the duration of + the subscription, until the subscription is again modified, or + until the subscription is terminated. In the case of an error + or an inability to meet the modified parameters, the + subscription is not modified and the original subscription + parameters remain in effect. In that case, the RPC error MAY + include 'error-info' suggested parameter hints that would have + a high likelihood of succeeding in a subsequent + 'modify-subscription' request. A successful + 'modify-subscription' will return a suspended subscription to + the 'active' state."; + input { + leaf id { + type subscription-id; + mandatory true; + description + "Identifier to use for this subscription."; + } + uses subscription-policy-modifiable; + } + } + + rc:yang-data modify-subscription-stream-error-info { + container modify-subscription-stream-error-info { + description + "This yang-data MAY be provided as part of a subscription's + RPC error response when there is a failure of a + 'modify-subscription' RPC that has been made against an + event stream. This yang-data MUST be used if hints are to + be provided back to the subscriber."; + leaf reason { + type identityref { + base modify-subscription-error; + } + description + "Information in a 'modify-subscription' RPC error response + that indicates the reason why the subscription to an event + stream has failed to be modified."; + } + leaf filter-failure-hint { + type string; + description + "Information describing where and/or why a provided + filter was unsupportable for a subscription. The syntax + and semantics of this hint are + implementation specific."; + } + } + } + + rpc delete-subscription { + description + "This RPC allows a subscriber to delete a subscription that + was previously created by that same subscriber using the + 'establish-subscription' RPC. + + If an error occurs, the server replies with an 'rpc-error' + where the 'error-info' field MAY contain a + 'delete-subscription-error-info' structure."; + input { + leaf id { + type subscription-id; + mandatory true; + description + "Identifier of the subscription that is to be deleted. + Only subscriptions that were created using + 'establish-subscription' from the same origin as this RPC + can be deleted via this RPC."; + } + } + } + + rpc kill-subscription { + nacm:default-deny-all; + description + "This RPC allows an operator to delete a dynamic subscription + without restrictions on the originating subscriber or + underlying transport session. + + If an error occurs, the server replies with an 'rpc-error' + where the 'error-info' field MAY contain a + 'delete-subscription-error-info' structure."; + input { + leaf id { + type subscription-id; + mandatory true; + description + "Identifier of the subscription that is to be deleted. + Only subscriptions that were created using + 'establish-subscription' can be deleted via this RPC."; + } + } + } + + rc:yang-data delete-subscription-error-info { + container delete-subscription-error-info { + description + "If a 'delete-subscription' RPC or a 'kill-subscription' RPC + fails, the subscription is not deleted and the RPC error + response MUST indicate the reason for this failure. This + yang-data MAY be inserted as structured data in a + subscription's RPC error response to indicate the reason + for the failure."; + leaf reason { + type identityref { + base delete-subscription-error; + } + mandatory true; + description + "Indicates the reason why the subscription has failed to be + deleted."; + } + } + } + + /* + * NOTIFICATIONS + */ + + notification replay-completed { + sn:subscription-state-notification; + if-feature "replay"; + description + "This notification is sent to indicate that all of the replay + notifications have been sent."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + } + + notification subscription-completed { + sn:subscription-state-notification; + if-feature "configured"; + description + "This notification is sent to indicate that a subscription has + finished passing event records, as the 'stop-time' has been + reached."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the gracefully completed subscription."; + } + } + + notification subscription-modified { + sn:subscription-state-notification; + description + "This notification indicates that a subscription has been + modified. Notification messages sent from this point on will + conform to the modified terms of the subscription. For + completeness, this subscription state change notification + includes both modified and unmodified aspects of a + subscription."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + uses subscription-policy { + refine "target/stream/stream-filter/within-subscription" { + description + "Filter applied to the subscription. If the + 'stream-filter-name' is populated, the filter in the + subscription came from the 'filters' container. + Otherwise, it is populated in-line as part of the + subscription."; + } + } + } + + notification subscription-resumed { + sn:subscription-state-notification; + description + "This notification indicates that a subscription that had + previously been suspended has resumed. Notifications will + once again be sent. In addition, a 'subscription-resumed' + indicates that no modification of parameters has occurred + since the last time event records have been sent."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + } + + notification subscription-started { + sn:subscription-state-notification; + if-feature "configured"; + description + "This notification indicates that a subscription has started + and notifications will now be sent."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + uses subscription-policy { + refine "target/stream/replay-start-time" { + description + "Indicates the time that a replay is using for the + streaming of buffered event records. This will be + populated with the most recent of the following: + the event time of the previous event record sent to a + receiver, the 'replay-log-creation-time', the + 'replay-log-aged-time', or the most recent publisher + boot time."; + } + refine "target/stream/stream-filter/within-subscription" { + description + "Filter applied to the subscription. If the + 'stream-filter-name' is populated, the filter in the + subscription came from the 'filters' container. + Otherwise, it is populated in-line as part of the + subscription."; + } + augment "target/stream" { + description + "This augmentation adds additional parameters specific to a + 'subscription-started' notification."; + leaf replay-previous-event-time { + when '../replay-start-time'; + if-feature "replay"; + type yang:date-and-time; + description + "If there is at least one event in the replay buffer + prior to 'replay-start-time', this gives the time of + the event generated immediately prior to the + 'replay-start-time'. + + If a receiver previously received event records for + this configured subscription, it can compare this time + to the last event record previously received. If the + two are not the same (perhaps due to a reboot), then a + dynamic replay can be initiated to acquire any missing + event records."; + } + } + } + } + + notification subscription-suspended { + sn:subscription-state-notification; + description + "This notification indicates that a suspension of the + subscription by the publisher has occurred. No further + notifications will be sent until the subscription resumes. + This notification shall only be sent to receivers of a + subscription; it does not constitute a general-purpose + notification."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + leaf reason { + type identityref { + base subscription-suspended-reason; + } + mandatory true; + description + "Identifies the condition that resulted in the suspension."; + } + } + + notification subscription-terminated { + sn:subscription-state-notification; + description + "This notification indicates that a subscription has been + terminated."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + leaf reason { + type identityref { + base subscription-terminated-reason; + } + mandatory true; + description + "Identifies the condition that resulted in the termination."; + } + } + + /* + * DATA NODES + */ + + container streams { + config false; + description + "Contains information on the built-in event streams provided by + the publisher."; + list stream { + key "name"; + description + "Identifies the built-in event streams that are supported by + the publisher."; + leaf name { + type string; + description + "A handle for a system-provided event stream made up of a + sequential set of event records, each of which is + characterized by its own domain and semantics."; + } + leaf description { + type string; + description + "A description of the event stream, including such + information as the type of event records that are + available in this event stream."; + } + leaf replay-support { + if-feature "replay"; + type empty; + description + "Indicates that event record replay is available on this + event stream."; + } + leaf replay-log-creation-time { + when '../replay-support'; + if-feature "replay"; + type yang:date-and-time; + mandatory true; + description + "The timestamp of the creation of the log used to support + the replay function on this event stream. This time + might be earlier than the earliest available information + contained in the log. This object is updated if the log + resets for some reason."; + } + leaf replay-log-aged-time { + when '../replay-support'; + if-feature "replay"; + type yang:date-and-time; + description + "The timestamp associated with the last event record that + has been aged out of the log. This timestamp identifies + how far back in history this replay log extends, if it + doesn't extend back to the 'replay-log-creation-time'. + This object MUST be present if replay is supported and any + event records have been aged out of the log."; + } + } + } + container filters { + description + "Contains a list of configurable filters that can be applied to + subscriptions. This facilitates the reuse of complex filters + once defined."; + list stream-filter { + key "name"; + description + "A list of preconfigured filters that can be applied to + subscriptions."; + leaf name { + type string; + description + "A name to differentiate between filters."; + } + uses stream-filter-elements; + } + } + container subscriptions { + description + "Contains the list of currently active subscriptions, i.e., + subscriptions that are currently in effect, used for + subscription management and monitoring purposes. This + includes subscriptions that have been set up via + RPC primitives as well as subscriptions that have been + established via configuration."; + list subscription { + key "id"; + description + "The identity and specific parameters of a subscription. + Subscriptions in this list can be created using a control + channel or RPC or can be established through configuration. + + If the 'kill-subscription' RPC or configuration operations + are used to delete a subscription, a + 'subscription-terminated' message is sent to any active or + suspended receivers."; + leaf id { + type subscription-id; + description + "Identifier of a subscription; unique in a given + publisher."; + } + uses subscription-policy { + refine "target/stream/stream" { + description + "Indicates the event stream to be considered for this + subscription. If an event stream has been removed + and can no longer be referenced by an active + subscription, send a 'subscription-terminated' + notification with 'stream-unavailable' as the reason. + If a configured subscription refers to a nonexistent + event stream, move that subscription to the + 'invalid' state."; + } + refine "transport" { + description + "For a configured subscription, this leaf specifies the + transport used to deliver messages destined for all + receivers of that subscription. This object is + mandatory for subscriptions in the configuration + datastore. This object (1) is not mandatory for dynamic + subscriptions in the operational state datastore and + (2) should not be present for other types of dynamic + subscriptions."; + } + augment "target/stream" { + description + "Enables objects to be added to a configured stream + subscription."; + leaf configured-replay { + if-feature "configured"; + if-feature "replay"; + type empty; + description + "The presence of this leaf indicates that replay for + the configured subscription should start at the + earliest time in the event log or at the publisher + boot time, whichever is later."; + } + } + } + choice notification-message-origin { + if-feature "configured"; + description + "Identifies the egress interface on the publisher + from which notification messages are to be sent."; + case interface-originated { + description + "When notification messages are to egress a specific, + designated interface on the publisher."; + leaf source-interface { + if-feature "interface-designation"; + type if:interface-ref; + description + "References the interface for notification messages."; + } + } + case address-originated { + description + "When notification messages are to depart from a + publisher using a specific originating address and/or + routing context information."; + leaf source-vrf { + if-feature "supports-vrf"; + type leafref { + path "/ni:network-instances/ni:network-instance/ni:name"; + } + description + "VRF from which notification messages should egress a + publisher."; + } + leaf source-address { + type inet:ip-address-no-zone; + description + "The source address for the notification messages. + If a source VRF exists but this object doesn't, a + publisher's default address for that VRF must + be used."; + } + } + } + leaf configured-subscription-state { + if-feature "configured"; + type enumeration { + enum valid { + value 1; + description + "The subscription is supportable with its current + parameters."; + } + enum invalid { + value 2; + description + "The subscription as a whole is unsupportable with its + current parameters."; + } + enum concluded { + value 3; + description + "A subscription is inactive, as it has hit a + stop time. It no longer has receivers in the + 'active' or 'suspended' state, but the subscription + has not yet been removed from configuration."; + } + } + config false; + description + "The presence of this leaf indicates that the subscription + originated from configuration, not through a control + channel or RPC. The value indicates the state of the + subscription as established by the publisher."; + } + container receivers { + description + "Set of receivers in a subscription."; + list receiver { + key "name"; + min-elements 1; + description + "A host intended as a recipient for the notification + messages of a subscription. For configured + subscriptions, transport-specific network parameters + (or a leafref to those parameters) may be augmented to a + specific receiver in this list."; + leaf name { + type string; + description + "Identifies a unique receiver for a subscription."; + } + leaf sent-event-records { + type yang:zero-based-counter64; + config false; + description + "The number of event records sent to the receiver. The + count is initialized when a dynamic subscription is + established or when a configured receiver + transitions to the 'valid' state."; + } + leaf excluded-event-records { + type yang:zero-based-counter64; + config false; + description + "The number of event records explicitly removed via + either an event stream filter or an access control + filter so that they are not passed to a receiver. + This count is set to zero each time + 'sent-event-records' is initialized."; + } + leaf state { + type enumeration { + enum active { + value 1; + description + "The receiver is currently being sent any + applicable notification messages for the + subscription."; + } + enum suspended { + value 2; + description + "The receiver state is 'suspended', so the + publisher is currently unable to provide + notification messages for the subscription."; + } + enum connecting { + value 3; + if-feature "configured"; + description + "A subscription has been configured, but a + 'subscription-started' subscription state change + notification needs to be successfully received + before notification messages are sent. + + If the 'reset' action is invoked for a receiver of + an active configured subscription, the state + must be moved to 'connecting'."; + } + enum disconnected { + value 4; + if-feature "configured"; + description + "A subscription has failed to send a + 'subscription-started' state change to the + receiver. Additional connection attempts are not + currently being made."; + } + } + config false; + mandatory true; + description + "Specifies the state of a subscription from the + perspective of a particular receiver. With this + information, it is possible to determine whether a + publisher is currently generating notification + messages intended for that receiver."; + } + action reset { + if-feature "configured"; + description + "Allows the reset of this configured subscription's + receiver to the 'connecting' state. This enables the + connection process to be reinitiated."; + output { + leaf time { + type yang:date-and-time; + mandatory true; + description + "Time at which a publisher returned the receiver to + the 'connecting' state."; + } + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-subscribed-notifications@2019-09-09.yang b/models/ietf/RFC/ietf-subscribed-notifications@2019-09-09.yang new file mode 100644 index 0000000000000000000000000000000000000000..e04593c3f2b3b02bca67eadad5f04f714e8d1719 --- /dev/null +++ b/models/ietf/RFC/ietf-subscribed-notifications@2019-09-09.yang @@ -0,0 +1,1350 @@ +module ietf-subscribed-notifications { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"; + prefix sn; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + import ietf-network-instance { + prefix ni; + reference + "RFC 8529: YANG Data Model for Network Instances"; + } + import ietf-restconf { + prefix rc; + reference + "RFC 8040: RESTCONF Protocol"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https:/datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Alexander Clemm + <mailto:ludwig@clemm.org> + + Author: Eric Voit + <mailto:evoit@cisco.com> + + Author: Alberto Gonzalez Prieto + <mailto:alberto.gonzalez@microsoft.com> + + Author: Einar Nilsen-Nygaard + <mailto:einarnn@cisco.com> + + Author: Ambika Prasad Tripathy + <mailto:ambtripa@cisco.com>"; + description + "This module defines a YANG data model for subscribing to event + records and receiving matching content in notification messages. + + 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. + + Copyright (c) 2019 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 Simplified 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 8639; see the + RFC itself for full legal notices."; + + revision 2019-09-09 { + description + "Initial version."; + reference + "RFC 8639: A YANG Data Model for Subscriptions to + Event Notifications"; + } + + /* + * FEATURES + */ + + feature configured { + description + "This feature indicates that configuration of subscriptions is + supported."; + } + + feature dscp { + description + "This feature indicates that a publisher supports the ability + to set the Differentiated Services Code Point (DSCP) value in + outgoing packets."; + } + + feature encode-json { + description + "This feature indicates that JSON encoding of notification + messages is supported."; + } + + feature encode-xml { + description + "This feature indicates that XML encoding of notification + messages is supported."; + } + + feature interface-designation { + description + "This feature indicates that a publisher supports sourcing all + receiver interactions for a configured subscription from a + single designated egress interface."; + } + + feature qos { + description + "This feature indicates that a publisher supports absolute + dependencies of one subscription's traffic over another + as well as weighted bandwidth sharing between subscriptions. + Both of these are Quality of Service (QoS) features that allow + differentiated treatment of notification messages between a + publisher and a specific receiver."; + } + + feature replay { + description + "This feature indicates that historical event record replay is + supported. With replay, it is possible for past event records + to be streamed in chronological order."; + } + + feature subtree { + description + "This feature indicates support for YANG subtree filtering."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 6"; + } + + feature supports-vrf { + description + "This feature indicates that a publisher supports VRF + configuration for configured subscriptions. VRF support for + dynamic subscriptions does not require this feature."; + reference + "RFC 8529: YANG Data Model for Network Instances, + Section 6"; + } + + feature xpath { + description + "This feature indicates support for XPath filtering."; + reference + "XML Path Language (XPath) Version 1.0 + (https://www.w3.org/TR/1999/REC-xpath-19991116)"; + } + + /* + * EXTENSIONS + */ + + extension subscription-state-notification { + description + "This statement applies only to notifications. It indicates + that the notification is a subscription state change + notification. Therefore, it does not participate in a regular + event stream and does not need to be specifically subscribed + to in order to be received. This statement can only occur as + a substatement of the YANG 'notification' statement. This + statement is not for use outside of this YANG module."; + } + + /* + * IDENTITIES + */ + /* Identities for RPC and notification errors */ + + identity delete-subscription-error { + description + "Base identity for the problem found while attempting to + fulfill either a 'delete-subscription' RPC request or a + 'kill-subscription' RPC request."; + } + + identity establish-subscription-error { + description + "Base identity for the problem found while attempting to + fulfill an 'establish-subscription' RPC request."; + } + + identity modify-subscription-error { + description + "Base identity for the problem found while attempting to + fulfill a 'modify-subscription' RPC request."; + } + + identity subscription-suspended-reason { + description + "Base identity for the problem condition communicated to a + receiver as part of a 'subscription-suspended' + notification."; + } + + identity subscription-terminated-reason { + description + "Base identity for the problem condition communicated to a + receiver as part of a 'subscription-terminated' + notification."; + } + + identity dscp-unavailable { + base establish-subscription-error; + if-feature "dscp"; + description + "The publisher is unable to mark notification messages with + prioritization information in a way that will be respected + during network transit."; + } + + identity encoding-unsupported { + base establish-subscription-error; + description + "Unable to encode notification messages in the desired + format."; + } + + identity filter-unavailable { + base subscription-terminated-reason; + description + "Referenced filter does not exist. This means a receiver is + referencing a filter that doesn't exist or to which it + does not have access permissions."; + } + + identity filter-unsupported { + base establish-subscription-error; + base modify-subscription-error; + description + "Cannot parse syntax in the filter. This failure can be from + a syntax error or a syntax too complex to be processed by the + publisher."; + } + + identity insufficient-resources { + base establish-subscription-error; + base modify-subscription-error; + base subscription-suspended-reason; + description + "The publisher does not have sufficient resources to support + the requested subscription. An example might be that + allocated CPU is too limited to generate the desired set of + notification messages."; + } + + identity no-such-subscription { + base modify-subscription-error; + base delete-subscription-error; + base subscription-terminated-reason; + description + "Referenced subscription doesn't exist. This may be as a + result of a nonexistent subscription ID, an ID that belongs to + another subscriber, or an ID for a configured subscription."; + } + + identity replay-unsupported { + base establish-subscription-error; + if-feature "replay"; + description + "Replay cannot be performed for this subscription. This means + the publisher will not provide the requested historic + information from the event stream via replay to this + receiver."; + } + + identity stream-unavailable { + base subscription-terminated-reason; + description + "Not a subscribable event stream. This means the referenced + event stream is not available for subscription by the + receiver."; + } + + identity suspension-timeout { + base subscription-terminated-reason; + description + "Termination of a previously suspended subscription. The + publisher has eliminated the subscription, as it exceeded a + time limit for suspension."; + } + + identity unsupportable-volume { + base subscription-suspended-reason; + description + "The publisher does not have the network bandwidth needed to + get the volume of generated information intended for a + receiver."; + } + + /* Identities for encodings */ + + identity configurable-encoding { + description + "If a transport identity derives from this identity, it means + that it supports configurable encodings. An example of a + configurable encoding might be a new identity such as + 'encode-cbor'. Such an identity could use + 'configurable-encoding' as its base. This would allow a + dynamic subscription encoded in JSON (RFC 8259) to request + that notification messages be encoded via the Concise Binary + Object Representation (CBOR) (RFC 7049). Further details for + any specific configurable encoding would be explored in a + transport document based on this specification."; + reference + "RFC 8259: The JavaScript Object Notation (JSON) Data + Interchange Format + RFC 7049: Concise Binary Object Representation (CBOR)"; + } + + identity encoding { + description + "Base identity to represent data encodings."; + } + + identity encode-xml { + base encoding; + if-feature "encode-xml"; + description + "Encode data using XML as described in RFC 7950."; + reference + "RFC 7950: The YANG 1.1 Data Modeling Language"; + } + + identity encode-json { + base encoding; + if-feature "encode-json"; + description + "Encode data using JSON as described in RFC 7951."; + reference + "RFC 7951: JSON Encoding of Data Modeled with YANG"; + } + + /* Identities for transports */ + + identity transport { + description + "An identity that represents the underlying mechanism for + passing notification messages."; + } + + /* + * TYPEDEFs + */ + + typedef encoding { + type identityref { + base encoding; + } + description + "Specifies a data encoding, e.g., for a data subscription."; + } + + typedef stream-filter-ref { + type leafref { + path "/sn:filters/sn:stream-filter/sn:name"; + } + description + "This type is used to reference an event stream filter."; + } + + typedef stream-ref { + type leafref { + path "/sn:streams/sn:stream/sn:name"; + } + description + "This type is used to reference a system-provided + event stream."; + } + + typedef subscription-id { + type uint32; + description + "A type for subscription identifiers."; + } + + typedef transport { + type identityref { + base transport; + } + description + "Specifies the transport used to send notification messages + to a receiver."; + } + + /* + * GROUPINGS + */ + + grouping stream-filter-elements { + description + "This grouping defines the base for filters applied to event + streams."; + choice filter-spec { + description + "The content filter specification for this request."; + anydata stream-subtree-filter { + if-feature "subtree"; + description + "Event stream evaluation criteria encoded in the syntax of + a subtree filter as defined in RFC 6241, Section 6. + + The subtree filter is applied to the representation of + individual, delineated event records as contained in the + event stream. + + If the subtree filter returns a non-empty node set, the + filter matches the event record, and the event record is + included in the notification message sent to the + receivers."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 6"; + } + leaf stream-xpath-filter { + if-feature "xpath"; + type yang:xpath1.0; + description + "Event stream evaluation criteria encoded in the syntax of + an XPath 1.0 expression. + + The XPath expression is evaluated on the representation of + individual, delineated event records as contained in + the event stream. + + The result of the XPath expression is converted to a + boolean value using the standard XPath 1.0 rules. If the + boolean value is 'true', the filter matches the event + record, and the event record is included in the + notification message sent to the receivers. + + The expression is evaluated in the following XPath + context: + + o The set of namespace declarations is the set of + prefix and namespace pairs for all YANG modules + implemented by the server, where the prefix is the + YANG module name and the namespace is as defined by + the 'namespace' statement in the YANG module. + + If the leaf is encoded in XML, all namespace + declarations in scope on the 'stream-xpath-filter' + leaf element are added to the set of namespace + declarations. If a prefix found in the XML is + already present in the set of namespace + declarations, the namespace in the XML is used. + + o The set of variable bindings is empty. + + o The function library is comprised of the core + function library and the XPath functions defined in + Section 10 in RFC 7950. + + o The context node is the root node."; + reference + "XML Path Language (XPath) Version 1.0 + (https://www.w3.org/TR/1999/REC-xpath-19991116) + RFC 7950: The YANG 1.1 Data Modeling Language, + Section 10"; + } + } + } + + grouping update-qos { + description + "This grouping describes QoS information concerning a + subscription. This information is passed to lower layers + for transport prioritization and treatment."; + leaf dscp { + if-feature "dscp"; + type inet:dscp; + default "0"; + description + "The desired network transport priority level. This is the + priority set on notification messages encapsulating the + results of the subscription. This transport priority is + shared for all receivers of a given subscription."; + } + leaf weighting { + if-feature "qos"; + type uint8 { + range "0 .. 255"; + } + description + "Relative weighting for a subscription. Larger weights get + more resources. Allows an underlying transport layer to + perform informed load-balance allocations between various + subscriptions."; + reference + "RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2), + Section 5.3.2"; + } + leaf dependency { + if-feature "qos"; + type subscription-id; + description + "Provides the 'subscription-id' of a parent subscription. + The parent subscription has absolute precedence should + that parent have push updates ready to egress the publisher. + In other words, there should be no streaming of objects from + the current subscription if the parent has something ready + to push. + + If a dependency is asserted via configuration or via an RPC + but the referenced 'subscription-id' does not exist, the + dependency is silently discarded. If a referenced + subscription is deleted, this dependency is removed."; + reference + "RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2), + Section 5.3.1"; + } + } + + grouping subscription-policy-modifiable { + description + "This grouping describes all objects that may be changed + in a subscription."; + choice target { + mandatory true; + description + "Identifies the source of information against which a + subscription is being applied as well as specifics on the + subset of information desired from that source."; + case stream { + choice stream-filter { + description + "An event stream filter can be applied to a subscription. + That filter will either come referenced from a global + list or be provided in the subscription itself."; + case by-reference { + description + "Apply a filter that has been configured separately."; + leaf stream-filter-name { + type stream-filter-ref; + mandatory true; + description + "References an existing event stream filter that is + to be applied to an event stream for the + subscription."; + } + } + case within-subscription { + description + "A local definition allows a filter to have the same + lifecycle as the subscription."; + uses stream-filter-elements; + } + } + } + } + leaf stop-time { + type yang:date-and-time; + description + "Identifies a time after which notification messages for a + subscription should not be sent. If 'stop-time' is not + present, the notification messages will continue until the + subscription is terminated. If 'replay-start-time' exists, + 'stop-time' must be for a subsequent time. If + 'replay-start-time' doesn't exist, 'stop-time', when + established, must be for a future time."; + } + } + + grouping subscription-policy-dynamic { + description + "This grouping describes the only information concerning a + subscription that can be passed over the RPCs defined in this + data model."; + uses subscription-policy-modifiable { + augment "target/stream" { + description + "Adds additional objects that can be modified by an RPC."; + leaf stream { + type stream-ref { + require-instance false; + } + mandatory true; + description + "Indicates the event stream to be considered for + this subscription."; + } + leaf replay-start-time { + if-feature "replay"; + type yang:date-and-time; + config false; + description + "Used to trigger the 'replay' feature for a dynamic + subscription, where event records that are selected + need to be at or after the specified starting time. If + 'replay-start-time' is not present, this is not a replay + subscription and event record push should start + immediately. It is never valid to specify start times + that are later than or equal to the current time."; + } + } + } + uses update-qos; + } + + grouping subscription-policy { + description + "This grouping describes the full set of policy information + concerning both dynamic and configured subscriptions, with the + exclusion of both receivers and networking information + specific to the publisher, such as what interface should be + used to transmit notification messages."; + uses subscription-policy-dynamic; + leaf transport { + if-feature "configured"; + type transport; + description + "For a configured subscription, this leaf specifies the + transport used to deliver messages destined for all + receivers of that subscription."; + } + leaf encoding { + when 'not(../transport) or derived-from(../transport, + "sn:configurable-encoding")'; + type encoding; + description + "The type of encoding for notification messages. For a + dynamic subscription, if not included as part of an + 'establish-subscription' RPC, the encoding will be populated + with the encoding used by that RPC. For a configured + subscription, if not explicitly configured, the encoding + will be the default encoding for an underlying transport."; + } + leaf purpose { + if-feature "configured"; + type string; + description + "Open text allowing a configuring entity to embed the + originator or other specifics of this subscription."; + } + } + + /* + * RPCs + */ + + rpc establish-subscription { + description + "This RPC allows a subscriber to create (and possibly + negotiate) a subscription on its own behalf. If successful, + the subscription remains in effect for the duration of the + subscriber's association with the publisher or until the + subscription is terminated. If an error occurs or the + publisher cannot meet the terms of a subscription, an RPC + error is returned, and the subscription is not created. + In that case, the RPC reply's 'error-info' MAY include + suggested parameter settings that would have a higher + likelihood of succeeding in a subsequent + 'establish-subscription' request."; + input { + uses subscription-policy-dynamic; + leaf encoding { + type encoding; + description + "The type of encoding for the subscribed data. If not + included as part of the RPC, the encoding MUST be set by + the publisher to be the encoding used by this RPC."; + } + } + output { + leaf id { + type subscription-id; + mandatory true; + description + "Identifier used for this subscription."; + } + leaf replay-start-time-revision { + if-feature "replay"; + type yang:date-and-time; + description + "If a replay has been requested, this object represents + the earliest time covered by the event buffer for the + requested event stream. The value of this object is the + 'replay-log-aged-time' if it exists. Otherwise, it is + the 'replay-log-creation-time'. All buffered event + records after this time will be replayed to a receiver. + This object will only be sent if the starting time has + been revised to be later than the time requested by the + subscriber."; + } + } + } + + rc:yang-data establish-subscription-stream-error-info { + container establish-subscription-stream-error-info { + description + "If any 'establish-subscription' RPC parameters are + unsupportable against the event stream, a subscription + is not created and the RPC error response MUST indicate the + reason why the subscription failed to be created. This + yang-data MAY be inserted as structured data in a + subscription's RPC error response to indicate the reason for + the failure. This yang-data MUST be inserted if hints are + to be provided back to the subscriber."; + leaf reason { + type identityref { + base establish-subscription-error; + } + description + "Indicates the reason why the subscription has failed to + be created to a targeted event stream."; + } + leaf filter-failure-hint { + type string; + description + "Information describing where and/or why a provided + filter was unsupportable for a subscription. The + syntax and semantics of this hint are + implementation specific."; + } + } + } + + rpc modify-subscription { + description + "This RPC allows a subscriber to modify a dynamic + subscription's parameters. If successful, the changed + subscription parameters remain in effect for the duration of + the subscription, until the subscription is again modified, or + until the subscription is terminated. In the case of an error + or an inability to meet the modified parameters, the + subscription is not modified and the original subscription + parameters remain in effect. In that case, the RPC error MAY + include 'error-info' suggested parameter hints that would have + a high likelihood of succeeding in a subsequent + 'modify-subscription' request. A successful + 'modify-subscription' will return a suspended subscription to + the 'active' state."; + input { + leaf id { + type subscription-id; + mandatory true; + description + "Identifier to use for this subscription."; + } + uses subscription-policy-modifiable; + } + } + + rc:yang-data modify-subscription-stream-error-info { + container modify-subscription-stream-error-info { + description + "This yang-data MAY be provided as part of a subscription's + RPC error response when there is a failure of a + 'modify-subscription' RPC that has been made against an + event stream. This yang-data MUST be used if hints are to + be provided back to the subscriber."; + leaf reason { + type identityref { + base modify-subscription-error; + } + description + "Information in a 'modify-subscription' RPC error response + that indicates the reason why the subscription to an event + stream has failed to be modified."; + } + leaf filter-failure-hint { + type string; + description + "Information describing where and/or why a provided + filter was unsupportable for a subscription. The syntax + and semantics of this hint are + implementation specific."; + } + } + } + + rpc delete-subscription { + description + "This RPC allows a subscriber to delete a subscription that + was previously created by that same subscriber using the + 'establish-subscription' RPC. + + If an error occurs, the server replies with an 'rpc-error' + where the 'error-info' field MAY contain a + 'delete-subscription-error-info' structure."; + input { + leaf id { + type subscription-id; + mandatory true; + description + "Identifier of the subscription that is to be deleted. + Only subscriptions that were created using + 'establish-subscription' from the same origin as this RPC + can be deleted via this RPC."; + } + } + } + + rpc kill-subscription { + nacm:default-deny-all; + description + "This RPC allows an operator to delete a dynamic subscription + without restrictions on the originating subscriber or + underlying transport session. + + If an error occurs, the server replies with an 'rpc-error' + where the 'error-info' field MAY contain a + 'delete-subscription-error-info' structure."; + input { + leaf id { + type subscription-id; + mandatory true; + description + "Identifier of the subscription that is to be deleted. + Only subscriptions that were created using + 'establish-subscription' can be deleted via this RPC."; + } + } + } + + rc:yang-data delete-subscription-error-info { + container delete-subscription-error-info { + description + "If a 'delete-subscription' RPC or a 'kill-subscription' RPC + fails, the subscription is not deleted and the RPC error + response MUST indicate the reason for this failure. This + yang-data MAY be inserted as structured data in a + subscription's RPC error response to indicate the reason + for the failure."; + leaf reason { + type identityref { + base delete-subscription-error; + } + mandatory true; + description + "Indicates the reason why the subscription has failed to be + deleted."; + } + } + } + + /* + * NOTIFICATIONS + */ + + notification replay-completed { + sn:subscription-state-notification; + if-feature "replay"; + description + "This notification is sent to indicate that all of the replay + notifications have been sent."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + } + + notification subscription-completed { + sn:subscription-state-notification; + if-feature "configured"; + description + "This notification is sent to indicate that a subscription has + finished passing event records, as the 'stop-time' has been + reached."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the gracefully completed subscription."; + } + } + + notification subscription-modified { + sn:subscription-state-notification; + description + "This notification indicates that a subscription has been + modified. Notification messages sent from this point on will + conform to the modified terms of the subscription. For + completeness, this subscription state change notification + includes both modified and unmodified aspects of a + subscription."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + uses subscription-policy { + refine "target/stream/stream-filter/within-subscription" { + description + "Filter applied to the subscription. If the + 'stream-filter-name' is populated, the filter in the + subscription came from the 'filters' container. + Otherwise, it is populated in-line as part of the + subscription."; + } + } + } + + notification subscription-resumed { + sn:subscription-state-notification; + description + "This notification indicates that a subscription that had + previously been suspended has resumed. Notifications will + once again be sent. In addition, a 'subscription-resumed' + indicates that no modification of parameters has occurred + since the last time event records have been sent."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + } + + notification subscription-started { + sn:subscription-state-notification; + if-feature "configured"; + description + "This notification indicates that a subscription has started + and notifications will now be sent."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + uses subscription-policy { + refine "target/stream/replay-start-time" { + description + "Indicates the time that a replay is using for the + streaming of buffered event records. This will be + populated with the most recent of the following: + the event time of the previous event record sent to a + receiver, the 'replay-log-creation-time', the + 'replay-log-aged-time', or the most recent publisher + boot time."; + } + refine "target/stream/stream-filter/within-subscription" { + description + "Filter applied to the subscription. If the + 'stream-filter-name' is populated, the filter in the + subscription came from the 'filters' container. + Otherwise, it is populated in-line as part of the + subscription."; + } + augment "target/stream" { + description + "This augmentation adds additional parameters specific to a + 'subscription-started' notification."; + leaf replay-previous-event-time { + when '../replay-start-time'; + if-feature "replay"; + type yang:date-and-time; + description + "If there is at least one event in the replay buffer + prior to 'replay-start-time', this gives the time of + the event generated immediately prior to the + 'replay-start-time'. + + If a receiver previously received event records for + this configured subscription, it can compare this time + to the last event record previously received. If the + two are not the same (perhaps due to a reboot), then a + dynamic replay can be initiated to acquire any missing + event records."; + } + } + } + } + + notification subscription-suspended { + sn:subscription-state-notification; + description + "This notification indicates that a suspension of the + subscription by the publisher has occurred. No further + notifications will be sent until the subscription resumes. + This notification shall only be sent to receivers of a + subscription; it does not constitute a general-purpose + notification."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + leaf reason { + type identityref { + base subscription-suspended-reason; + } + mandatory true; + description + "Identifies the condition that resulted in the suspension."; + } + } + + notification subscription-terminated { + sn:subscription-state-notification; + description + "This notification indicates that a subscription has been + terminated."; + leaf id { + type subscription-id; + mandatory true; + description + "This references the affected subscription."; + } + leaf reason { + type identityref { + base subscription-terminated-reason; + } + mandatory true; + description + "Identifies the condition that resulted in the termination."; + } + } + + /* + * DATA NODES + */ + + container streams { + config false; + description + "Contains information on the built-in event streams provided by + the publisher."; + list stream { + key "name"; + description + "Identifies the built-in event streams that are supported by + the publisher."; + leaf name { + type string; + description + "A handle for a system-provided event stream made up of a + sequential set of event records, each of which is + characterized by its own domain and semantics."; + } + leaf description { + type string; + description + "A description of the event stream, including such + information as the type of event records that are + available in this event stream."; + } + leaf replay-support { + if-feature "replay"; + type empty; + description + "Indicates that event record replay is available on this + event stream."; + } + leaf replay-log-creation-time { + when '../replay-support'; + if-feature "replay"; + type yang:date-and-time; + mandatory true; + description + "The timestamp of the creation of the log used to support + the replay function on this event stream. This time + might be earlier than the earliest available information + contained in the log. This object is updated if the log + resets for some reason."; + } + leaf replay-log-aged-time { + when '../replay-support'; + if-feature "replay"; + type yang:date-and-time; + description + "The timestamp associated with the last event record that + has been aged out of the log. This timestamp identifies + how far back in history this replay log extends, if it + doesn't extend back to the 'replay-log-creation-time'. + This object MUST be present if replay is supported and any + event records have been aged out of the log."; + } + } + } + container filters { + description + "Contains a list of configurable filters that can be applied to + subscriptions. This facilitates the reuse of complex filters + once defined."; + list stream-filter { + key "name"; + description + "A list of preconfigured filters that can be applied to + subscriptions."; + leaf name { + type string; + description + "A name to differentiate between filters."; + } + uses stream-filter-elements; + } + } + container subscriptions { + description + "Contains the list of currently active subscriptions, i.e., + subscriptions that are currently in effect, used for + subscription management and monitoring purposes. This + includes subscriptions that have been set up via + RPC primitives as well as subscriptions that have been + established via configuration."; + list subscription { + key "id"; + description + "The identity and specific parameters of a subscription. + Subscriptions in this list can be created using a control + channel or RPC or can be established through configuration. + + If the 'kill-subscription' RPC or configuration operations + are used to delete a subscription, a + 'subscription-terminated' message is sent to any active or + suspended receivers."; + leaf id { + type subscription-id; + description + "Identifier of a subscription; unique in a given + publisher."; + } + uses subscription-policy { + refine "target/stream/stream" { + description + "Indicates the event stream to be considered for this + subscription. If an event stream has been removed + and can no longer be referenced by an active + subscription, send a 'subscription-terminated' + notification with 'stream-unavailable' as the reason. + If a configured subscription refers to a nonexistent + event stream, move that subscription to the + 'invalid' state."; + } + refine "transport" { + description + "For a configured subscription, this leaf specifies the + transport used to deliver messages destined for all + receivers of that subscription. This object is + mandatory for subscriptions in the configuration + datastore. This object (1) is not mandatory for dynamic + subscriptions in the operational state datastore and + (2) should not be present for other types of dynamic + subscriptions."; + } + augment "target/stream" { + description + "Enables objects to be added to a configured stream + subscription."; + leaf configured-replay { + if-feature "configured"; + if-feature "replay"; + type empty; + description + "The presence of this leaf indicates that replay for + the configured subscription should start at the + earliest time in the event log or at the publisher + boot time, whichever is later."; + } + } + } + choice notification-message-origin { + if-feature "configured"; + description + "Identifies the egress interface on the publisher + from which notification messages are to be sent."; + case interface-originated { + description + "When notification messages are to egress a specific, + designated interface on the publisher."; + leaf source-interface { + if-feature "interface-designation"; + type if:interface-ref; + description + "References the interface for notification messages."; + } + } + case address-originated { + description + "When notification messages are to depart from a + publisher using a specific originating address and/or + routing context information."; + leaf source-vrf { + if-feature "supports-vrf"; + type leafref { + path "/ni:network-instances/ni:network-instance/ni:name"; + } + description + "VRF from which notification messages should egress a + publisher."; + } + leaf source-address { + type inet:ip-address-no-zone; + description + "The source address for the notification messages. + If a source VRF exists but this object doesn't, a + publisher's default address for that VRF must + be used."; + } + } + } + leaf configured-subscription-state { + if-feature "configured"; + type enumeration { + enum valid { + value 1; + description + "The subscription is supportable with its current + parameters."; + } + enum invalid { + value 2; + description + "The subscription as a whole is unsupportable with its + current parameters."; + } + enum concluded { + value 3; + description + "A subscription is inactive, as it has hit a + stop time. It no longer has receivers in the + 'active' or 'suspended' state, but the subscription + has not yet been removed from configuration."; + } + } + config false; + description + "The presence of this leaf indicates that the subscription + originated from configuration, not through a control + channel or RPC. The value indicates the state of the + subscription as established by the publisher."; + } + container receivers { + description + "Set of receivers in a subscription."; + list receiver { + key "name"; + min-elements 1; + description + "A host intended as a recipient for the notification + messages of a subscription. For configured + subscriptions, transport-specific network parameters + (or a leafref to those parameters) may be augmented to a + specific receiver in this list."; + leaf name { + type string; + description + "Identifies a unique receiver for a subscription."; + } + leaf sent-event-records { + type yang:zero-based-counter64; + config false; + description + "The number of event records sent to the receiver. The + count is initialized when a dynamic subscription is + established or when a configured receiver + transitions to the 'valid' state."; + } + leaf excluded-event-records { + type yang:zero-based-counter64; + config false; + description + "The number of event records explicitly removed via + either an event stream filter or an access control + filter so that they are not passed to a receiver. + This count is set to zero each time + 'sent-event-records' is initialized."; + } + leaf state { + type enumeration { + enum active { + value 1; + description + "The receiver is currently being sent any + applicable notification messages for the + subscription."; + } + enum suspended { + value 2; + description + "The receiver state is 'suspended', so the + publisher is currently unable to provide + notification messages for the subscription."; + } + enum connecting { + value 3; + if-feature "configured"; + description + "A subscription has been configured, but a + 'subscription-started' subscription state change + notification needs to be successfully received + before notification messages are sent. + + If the 'reset' action is invoked for a receiver of + an active configured subscription, the state + must be moved to 'connecting'."; + } + enum disconnected { + value 4; + if-feature "configured"; + description + "A subscription has failed to send a + 'subscription-started' state change to the + receiver. Additional connection attempts are not + currently being made."; + } + } + config false; + mandatory true; + description + "Specifies the state of a subscription from the + perspective of a particular receiver. With this + information, it is possible to determine whether a + publisher is currently generating notification + messages intended for that receiver."; + } + action reset { + if-feature "configured"; + description + "Allows the reset of this configured subscription's + receiver to the 'connecting' state. This enables the + connection process to be reinitiated."; + output { + leaf time { + type yang:date-and-time; + mandatory true; + description + "Time at which a publisher returned the receiver to + the 'connecting' state."; + } + } + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-system-tacacs-plus.yang b/models/ietf/RFC/ietf-system-tacacs-plus.yang new file mode 100644 index 0000000000000000000000000000000000000000..367b8c048fb2174e82dca012c08780c60402d48b --- /dev/null +++ b/models/ietf/RFC/ietf-system-tacacs-plus.yang @@ -0,0 +1,305 @@ +module ietf-system-tacacs-plus { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-system-tacacs-plus"; + prefix sys-tcs-plus; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-network-instance { + prefix ni; + reference + "RFC 8529: YANG Data Model for Network Instances"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-system { + prefix sys; + reference + "RFC 7317: A YANG Data Model for System Management"; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <http://datatracker.ietf.org/wg/opsawg/> + WG List: <mailto:opsawg@ietf.org> + + Editor: Bo Wu <lana.wubo@huawei.com> + Editor: Guangying Zheng <zhengguangying@huawei.com>"; + description + "This module provides configuration of TACACS+ client. + + 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. + + Copyright (c) 2021 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 Simplified 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 9105; see the + RFC itself for full legal notices."; + + revision 2021-08-05 { + description + "Initial revision."; + reference + "RFC 9105: A YANG Data Model for Terminal Access Controller + Access-Control System Plus (TACACS+)"; + } + + typedef tacacs-plus-server-type { + type bits { + bit authentication { + description + "Indicates that the TACACS+ server is providing + authentication services."; + } + bit authorization { + description + "Indicates that the TACACS+ server is providing + authorization services."; + } + bit accounting { + description + "Indicates that the TACACS+ server is providing accounting + services."; + } + } + description + "tacacs-plus-server-type can be set to + authentication/authorization/accounting + or any combination of the three types."; + } + + identity tacacs-plus { + base sys:authentication-method; + description + "Indicates AAA operation using TACACS+."; + reference + "RFC 8907: The TACACS+ Protocol"; + } + + grouping statistics { + description + "Grouping for TACACS+ statistics attributes."; + container statistics { + config false; + description + "A collection of server-related statistics objects."; + leaf connection-opens { + type yang:counter64; + description + "Number of new connection requests sent to the server, + e.g., socket open."; + } + leaf connection-closes { + type yang:counter64; + description + "Number of connection close requests sent to the server, + e.g., socket close."; + } + leaf connection-aborts { + type yang:counter64; + description + "Number of aborted connections to the server. These do + not include connections that are closed gracefully."; + } + leaf connection-failures { + type yang:counter64; + description + "Number of connection failures to the server."; + } + leaf connection-timeouts { + type yang:counter64; + description + "Number of connection timeouts to the server."; + } + leaf messages-sent { + type yang:counter64; + description + "Number of messages sent to the server."; + } + leaf messages-received { + type yang:counter64; + description + "Number of messages received from the server."; + } + leaf errors-received { + type yang:counter64; + description + "Number of error messages received from the server."; + } + leaf sessions { + type yang:counter64; + description + "Number of TACACS+ sessions completed with the server. + If the Single Connection Mode was NOT enabled, the number + of sessions is the same as the number of + 'connection-closes'. If the Mode was enabled, a single + TCP connection may contain multiple TACACS+ sessions."; + } + } + } + + grouping tacacs-plus { + description + "Grouping for TACACS+ attributes."; + container tacacs-plus { + must "not(derived-from-or-self(../sys:authentication" + + "/sys:user-authentication-order, 'tacacs-plus'))" + + " or bit-is-set(server/server-type,'authentication')" { + error-message "When 'tacacs-plus' is used as a system" + + " authentication method, a TACACS+" + + " authentication server must be configured."; + description + "When 'tacacs-plus' is used as an authentication method, + a TACACS+ server must be configured."; + } + description + "Container for TACACS+ configurations and operations."; + list server { + key "name"; + ordered-by user; + description + "List of TACACS+ servers used by the device."; + leaf name { + type string; + description + "An arbitrary name for the TACACS+ server."; + } + leaf server-type { + type tacacs-plus-server-type; + mandatory true; + description + "Server type: authentication/authorization/accounting and + various combinations."; + } + leaf address { + type inet:host; + mandatory true; + description + "The address of the TACACS+ server."; + } + leaf port { + type inet:port-number; + default "49"; + description + "The port number of TACACS+ Server port."; + } + choice security { + mandatory true; + description + "Security mechanism between TACACS+ client and server. + This is modeled as a YANG 'choice' so that it can be + augmented by a YANG module in a backwards-compatible + manner."; + case obfuscation { + leaf shared-secret { + type string { + length "1..max"; + } + nacm:default-deny-all; + description + "The shared secret, which is known to both the + TACACS+ client and server. TACACS+ server + administrators SHOULD configure a shared secret with + a minimum length of 16 characters. + It is highly recommended that this shared secret is + at least 32 characters long and sufficiently complex + with a mix of different character types, + i.e., upper case, lower case, numeric, and + punctuation. Note that this security mechanism is + best described as 'obfuscation' and not 'encryption' + as it does not provide any meaningful integrity, + privacy, or replay protection."; + reference + "RFC 8907: The TACACS+ Protocol"; + } + } + } + choice source-type { + description + "The source address type for outbound TACACS+ packets."; + case source-ip { + leaf source-ip { + type inet:ip-address; + description + "Specifies source IP address for TACACS+ outbound + packets."; + } + } + case source-interface { + leaf source-interface { + type if:interface-ref; + description + "Specifies the interface from which the IP address + is derived for use as the source for the outbound + TACACS+ packet."; + } + } + } + leaf vrf-instance { + type leafref { + path "/ni:network-instances/ni:network-instance/ni:name"; + } + description + "Specifies the VPN Routing and Forwarding (VRF) instance + to use to communicate with the TACACS+ server."; + reference + "RFC 8529: YANG Data Model for Network Instances"; + } + leaf single-connection { + type boolean; + default "false"; + description + "Indicates whether the Single Connection Mode is enabled + for the server. By default, the Single Connection Mode + is disabled."; + } + leaf timeout { + type uint16 { + range "1..max"; + } + units "seconds"; + default "5"; + description + "The number of seconds the device will wait for a + response from each TACACS+ server before trying with a + different server."; + } + uses statistics; + } + } + } + + augment "/sys:system" { + description + "Augments the system model with the tacacs-plus model."; + uses tacacs-plus; + } +} diff --git a/models/ietf/RFC/ietf-system-tacacs-plus@2021-08-05.yang b/models/ietf/RFC/ietf-system-tacacs-plus@2021-08-05.yang new file mode 100644 index 0000000000000000000000000000000000000000..367b8c048fb2174e82dca012c08780c60402d48b --- /dev/null +++ b/models/ietf/RFC/ietf-system-tacacs-plus@2021-08-05.yang @@ -0,0 +1,305 @@ +module ietf-system-tacacs-plus { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-system-tacacs-plus"; + prefix sys-tcs-plus; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-network-instance { + prefix ni; + reference + "RFC 8529: YANG Data Model for Network Instances"; + } + import ietf-interfaces { + prefix if; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + import ietf-system { + prefix sys; + reference + "RFC 7317: A YANG Data Model for System Management"; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: <http://datatracker.ietf.org/wg/opsawg/> + WG List: <mailto:opsawg@ietf.org> + + Editor: Bo Wu <lana.wubo@huawei.com> + Editor: Guangying Zheng <zhengguangying@huawei.com>"; + description + "This module provides configuration of TACACS+ client. + + 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. + + Copyright (c) 2021 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 Simplified 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 9105; see the + RFC itself for full legal notices."; + + revision 2021-08-05 { + description + "Initial revision."; + reference + "RFC 9105: A YANG Data Model for Terminal Access Controller + Access-Control System Plus (TACACS+)"; + } + + typedef tacacs-plus-server-type { + type bits { + bit authentication { + description + "Indicates that the TACACS+ server is providing + authentication services."; + } + bit authorization { + description + "Indicates that the TACACS+ server is providing + authorization services."; + } + bit accounting { + description + "Indicates that the TACACS+ server is providing accounting + services."; + } + } + description + "tacacs-plus-server-type can be set to + authentication/authorization/accounting + or any combination of the three types."; + } + + identity tacacs-plus { + base sys:authentication-method; + description + "Indicates AAA operation using TACACS+."; + reference + "RFC 8907: The TACACS+ Protocol"; + } + + grouping statistics { + description + "Grouping for TACACS+ statistics attributes."; + container statistics { + config false; + description + "A collection of server-related statistics objects."; + leaf connection-opens { + type yang:counter64; + description + "Number of new connection requests sent to the server, + e.g., socket open."; + } + leaf connection-closes { + type yang:counter64; + description + "Number of connection close requests sent to the server, + e.g., socket close."; + } + leaf connection-aborts { + type yang:counter64; + description + "Number of aborted connections to the server. These do + not include connections that are closed gracefully."; + } + leaf connection-failures { + type yang:counter64; + description + "Number of connection failures to the server."; + } + leaf connection-timeouts { + type yang:counter64; + description + "Number of connection timeouts to the server."; + } + leaf messages-sent { + type yang:counter64; + description + "Number of messages sent to the server."; + } + leaf messages-received { + type yang:counter64; + description + "Number of messages received from the server."; + } + leaf errors-received { + type yang:counter64; + description + "Number of error messages received from the server."; + } + leaf sessions { + type yang:counter64; + description + "Number of TACACS+ sessions completed with the server. + If the Single Connection Mode was NOT enabled, the number + of sessions is the same as the number of + 'connection-closes'. If the Mode was enabled, a single + TCP connection may contain multiple TACACS+ sessions."; + } + } + } + + grouping tacacs-plus { + description + "Grouping for TACACS+ attributes."; + container tacacs-plus { + must "not(derived-from-or-self(../sys:authentication" + + "/sys:user-authentication-order, 'tacacs-plus'))" + + " or bit-is-set(server/server-type,'authentication')" { + error-message "When 'tacacs-plus' is used as a system" + + " authentication method, a TACACS+" + + " authentication server must be configured."; + description + "When 'tacacs-plus' is used as an authentication method, + a TACACS+ server must be configured."; + } + description + "Container for TACACS+ configurations and operations."; + list server { + key "name"; + ordered-by user; + description + "List of TACACS+ servers used by the device."; + leaf name { + type string; + description + "An arbitrary name for the TACACS+ server."; + } + leaf server-type { + type tacacs-plus-server-type; + mandatory true; + description + "Server type: authentication/authorization/accounting and + various combinations."; + } + leaf address { + type inet:host; + mandatory true; + description + "The address of the TACACS+ server."; + } + leaf port { + type inet:port-number; + default "49"; + description + "The port number of TACACS+ Server port."; + } + choice security { + mandatory true; + description + "Security mechanism between TACACS+ client and server. + This is modeled as a YANG 'choice' so that it can be + augmented by a YANG module in a backwards-compatible + manner."; + case obfuscation { + leaf shared-secret { + type string { + length "1..max"; + } + nacm:default-deny-all; + description + "The shared secret, which is known to both the + TACACS+ client and server. TACACS+ server + administrators SHOULD configure a shared secret with + a minimum length of 16 characters. + It is highly recommended that this shared secret is + at least 32 characters long and sufficiently complex + with a mix of different character types, + i.e., upper case, lower case, numeric, and + punctuation. Note that this security mechanism is + best described as 'obfuscation' and not 'encryption' + as it does not provide any meaningful integrity, + privacy, or replay protection."; + reference + "RFC 8907: The TACACS+ Protocol"; + } + } + } + choice source-type { + description + "The source address type for outbound TACACS+ packets."; + case source-ip { + leaf source-ip { + type inet:ip-address; + description + "Specifies source IP address for TACACS+ outbound + packets."; + } + } + case source-interface { + leaf source-interface { + type if:interface-ref; + description + "Specifies the interface from which the IP address + is derived for use as the source for the outbound + TACACS+ packet."; + } + } + } + leaf vrf-instance { + type leafref { + path "/ni:network-instances/ni:network-instance/ni:name"; + } + description + "Specifies the VPN Routing and Forwarding (VRF) instance + to use to communicate with the TACACS+ server."; + reference + "RFC 8529: YANG Data Model for Network Instances"; + } + leaf single-connection { + type boolean; + default "false"; + description + "Indicates whether the Single Connection Mode is enabled + for the server. By default, the Single Connection Mode + is disabled."; + } + leaf timeout { + type uint16 { + range "1..max"; + } + units "seconds"; + default "5"; + description + "The number of seconds the device will wait for a + response from each TACACS+ server before trying with a + different server."; + } + uses statistics; + } + } + } + + augment "/sys:system" { + description + "Augments the system model with the tacacs-plus model."; + uses tacacs-plus; + } +} diff --git a/models/ietf/RFC/ietf-system.yang b/models/ietf/RFC/ietf-system.yang new file mode 100644 index 0000000000000000000000000000000000000000..1618242bcc10d8501eb4fd0347ff3c9aa1c08bbc --- /dev/null +++ b/models/ietf/RFC/ietf-system.yang @@ -0,0 +1,800 @@ +module ietf-system { + namespace "urn:ietf:params:xml:ns:yang:ietf-system"; + prefix "sys"; + + import ietf-yang-types { + prefix yang; + } + + import ietf-inet-types { + prefix inet; + } + + import ietf-netconf-acm { + prefix nacm; + } + + import iana-crypt-hash { + prefix ianach; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "This module contains a collection of YANG definitions for the + configuration and identification of some common system + properties within a device containing a NETCONF server. This + includes data node definitions for system identification, + time-of-day management, user management, DNS resolver + configuration, and some protocol operations for system + management. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7317; see + the RFC itself for full legal notices."; + + revision 2014-08-06 { + description + "Initial revision."; + reference + "RFC 7317: A YANG Data Model for System Management"; + } + + /* + * Typedefs + */ + + typedef timezone-name { + type string; + description + "A time zone name as used by the Time Zone Database, + sometimes referred to as the 'Olson Database'. + + The exact set of valid values is an implementation-specific + matter. Client discovery of the exact set of time zone names + for a particular server is out of scope."; + reference + "RFC 6557: Procedures for Maintaining the Time Zone Database"; + } + + /* + * Features + */ + + feature radius { + description + "Indicates that the device can be configured as a RADIUS + client."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + feature authentication { + description + "Indicates that the device supports configuration of + user authentication."; + } + + feature local-users { + if-feature authentication; + description + "Indicates that the device supports configuration of + local user authentication."; + } + + feature radius-authentication { + if-feature radius; + if-feature authentication; + description + "Indicates that the device supports configuration of user + authentication over RADIUS."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS) + RFC 5607: Remote Authentication Dial-In User Service (RADIUS) + Authorization for Network Access Server (NAS) + Management"; + } + + feature ntp { + description + "Indicates that the device can be configured to use one or + more NTP servers to set the system date and time."; + } + + feature ntp-udp-port { + if-feature ntp; + description + "Indicates that the device supports the configuration of + the UDP port for NTP servers. + + This is a 'feature', since many implementations do not support + any port other than the default port."; + } + + feature timezone-name { + description + "Indicates that the local time zone on the device + can be configured to use the TZ database + to set the time zone and manage daylight saving time."; + reference + "RFC 6557: Procedures for Maintaining the Time Zone Database"; + } + + feature dns-udp-tcp-port { + description + "Indicates that the device supports the configuration of + the UDP and TCP port for DNS servers. + + This is a 'feature', since many implementations do not support + any port other than the default port."; + } + + /* + * Identities + */ + + identity authentication-method { + description + "Base identity for user authentication methods."; + } + + identity radius { + base authentication-method; + description + "Indicates user authentication using RADIUS."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS) + RFC 5607: Remote Authentication Dial-In User Service (RADIUS) + Authorization for Network Access Server (NAS) + Management"; + } + + identity local-users { + base authentication-method; + description + "Indicates password-based authentication of locally + configured users."; + } + + identity radius-authentication-type { + description + "Base identity for RADIUS authentication types."; + } + + identity radius-pap { + base radius-authentication-type; + description + "The device requests Password Authentication Protocol (PAP) + authentication from the RADIUS server."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + identity radius-chap { + base radius-authentication-type; + description + "The device requests Challenge Handshake Authentication + Protocol (CHAP) authentication from the RADIUS server."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + /* + * Configuration data nodes + */ + + container system { + description + "System group configuration."; + + leaf contact { + type string; + description + "The administrator contact information for the system. + + A server implementation MAY map this leaf to the sysContact + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and sysContact. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.sysContact"; + } + leaf hostname { + type inet:domain-name; + description + "The name of the host. This name can be a single domain + label or the fully qualified domain name of the host."; + } + leaf location { + type string; + description + "The system location. + + A server implementation MAY map this leaf to the sysLocation + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and sysLocation. The definition + of such a mechanism is outside the scope of this document."; + reference + "RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.sysLocation"; + } + + container clock { + description + "Configuration of the system date and time properties."; + + choice timezone { + description + "The system time zone information."; + + case timezone-name { + if-feature timezone-name; + leaf timezone-name { + type timezone-name; + description + "The TZ database name to use for the system, such + as 'Europe/Stockholm'."; + } + } + case timezone-utc-offset { + leaf timezone-utc-offset { + type int16 { + range "-1500 .. 1500"; + } + units "minutes"; + description + "The number of minutes to add to UTC time to + identify the time zone for this system. For example, + 'UTC - 8:00 hours' would be represented as '-480'. + Note that automatic daylight saving time adjustment + is not provided if this object is used."; + } + } + } + } + + container ntp { + if-feature ntp; + presence + "Enables the NTP client unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Configuration of the NTP client."; + + leaf enabled { + type boolean; + default true; + description + "Indicates that the system should attempt to + synchronize the system clock with an NTP server + from the 'ntp/server' list."; + } + list server { + key name; + description + "List of NTP servers to use for system clock + synchronization. If '/system/ntp/enabled' + is 'true', then the system will attempt to + contact and utilize the specified NTP servers."; + + leaf name { + type string; + description + "An arbitrary name for the NTP server."; + } + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + + case udp { + container udp { + description + "Contains UDP-specific configuration parameters + for NTP."; + leaf address { + type inet:host; + mandatory true; + description + "The address of the NTP server."; + } + leaf port { + if-feature ntp-udp-port; + type inet:port-number; + default 123; + description + "The port number of the NTP server."; + } + } + } + } + leaf association-type { + type enumeration { + enum server { + description + "Use client association mode. This device + will not provide synchronization to the + configured NTP server."; + } + enum peer { + description + "Use symmetric active association mode. + This device may provide synchronization + to the configured NTP server."; + } + enum pool { + description + "Use client association mode with one or + more of the NTP servers found by DNS + resolution of the domain name given by + the 'address' leaf. This device will not + provide synchronization to the servers."; + } + } + default server; + description + "The desired association type for this NTP server."; + } + leaf iburst { + type boolean; + default false; + description + "Indicates whether this server should enable burst + synchronization or not."; + } + leaf prefer { + type boolean; + default false; + description + "Indicates whether this server should be preferred + or not."; + } + } + } + + container dns-resolver { + description + "Configuration of the DNS resolver."; + + leaf-list search { + type inet:domain-name; + ordered-by user; + description + "An ordered list of domains to search when resolving + a host name."; + } + list server { + key name; + ordered-by user; + description + "List of the DNS servers that the resolver should query. + + When the resolver is invoked by a calling application, it + sends the query to the first name server in this list. If + no response has been received within 'timeout' seconds, + the resolver continues with the next server in the list. + If no response is received from any server, the resolver + continues with the first server again. When the resolver + has traversed the list 'attempts' times without receiving + any response, it gives up and returns an error to the + calling application. + + Implementations MAY limit the number of entries in this + list."; + + leaf name { + type string; + description + "An arbitrary name for the DNS server."; + } + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + + case udp-and-tcp { + container udp-and-tcp { + description + "Contains UDP- and TCP-specific configuration + parameters for DNS."; + reference + "RFC 1035: Domain Names - Implementation and + Specification + RFC 5966: DNS Transport over TCP - Implementation + Requirements"; + + leaf address { + type inet:ip-address; + mandatory true; + description + "The address of the DNS server."; + } + leaf port { + if-feature dns-udp-tcp-port; + type inet:port-number; + default 53; + description + "The UDP and TCP port number of the DNS server."; + } + } + } + } + } + container options { + description + "Resolver options. The set of available options has been + limited to those that are generally available across + different resolver implementations and generally useful."; + leaf timeout { + type uint8 { + range "1..max"; + } + units "seconds"; + default "5"; + description + "The amount of time the resolver will wait for a + response from each remote name server before + retrying the query via a different name server."; + } + leaf attempts { + type uint8 { + range "1..max"; + } + default "2"; + description + "The number of times the resolver will send a query to + all of its name servers before giving up and returning + an error to the calling application."; + } + } + } + + container radius { + if-feature radius; + + description + "Configuration of the RADIUS client."; + + list server { + key name; + ordered-by user; + description + "List of RADIUS servers used by the device. + + When the RADIUS client is invoked by a calling + application, it sends the query to the first server in + this list. If no response has been received within + 'timeout' seconds, the client continues with the next + server in the list. If no response is received from any + server, the client continues with the first server again. + When the client has traversed the list 'attempts' times + without receiving any response, it gives up and returns an + error to the calling application."; + + leaf name { + type string; + description + "An arbitrary name for the RADIUS server."; + } + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + + case udp { + container udp { + description + "Contains UDP-specific configuration parameters + for RADIUS."; + leaf address { + type inet:host; + mandatory true; + description + "The address of the RADIUS server."; + } + + leaf authentication-port { + type inet:port-number; + default "1812"; + description + "The port number of the RADIUS server."; + } + leaf shared-secret { + type string; + mandatory true; + nacm:default-deny-all; + description + "The shared secret, which is known to both the + RADIUS client and server."; + reference + "RFC 2865: Remote Authentication Dial In User + Service (RADIUS)"; + } + } + } + } + leaf authentication-type { + type identityref { + base radius-authentication-type; + } + default radius-pap; + description + "The authentication type requested from the RADIUS + server."; + } + } + container options { + description + "RADIUS client options."; + + leaf timeout { + type uint8 { + range "1..max"; + } + units "seconds"; + default "5"; + description + "The number of seconds the device will wait for a + response from each RADIUS server before trying with a + different server."; + } + + leaf attempts { + type uint8 { + range "1..max"; + } + default "2"; + description + "The number of times the device will send a query to + all of its RADIUS servers before giving up."; + } + } + } + + container authentication { + nacm:default-deny-write; + if-feature authentication; + + description + "The authentication configuration subtree."; + + leaf-list user-authentication-order { + type identityref { + base authentication-method; + } + must '(. != "sys:radius" or ../../radius/server)' { + error-message + "When 'radius' is used, a RADIUS server" + + " must be configured."; + description + "When 'radius' is used as an authentication method, + a RADIUS server must be configured."; + } + ordered-by user; + + description + "When the device authenticates a user with a password, + it tries the authentication methods in this leaf-list in + order. If authentication with one method fails, the next + method is used. If no method succeeds, the user is + denied access. + + An empty user-authentication-order leaf-list still allows + authentication of users using mechanisms that do not + involve a password. + + If the 'radius-authentication' feature is advertised by + the NETCONF server, the 'radius' identity can be added to + this list. + + If the 'local-users' feature is advertised by the + NETCONF server, the 'local-users' identity can be + added to this list."; + } + + list user { + if-feature local-users; + key name; + description + "The list of local users configured on this device."; + + leaf name { + type string; + description + "The user name string identifying this entry."; + } + leaf password { + type ianach:crypt-hash; + description + "The password for this entry."; + } + list authorized-key { + key name; + description + "A list of public SSH keys for this user. These keys + are allowed for SSH authentication, as described in + RFC 4253."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + + leaf name { + type string; + description + "An arbitrary name for the SSH key."; + } + + leaf algorithm { + type string; + mandatory true; + description + "The public key algorithm name for this SSH key. + + Valid values are the values in the IANA 'Secure Shell + (SSH) Protocol Parameters' registry, Public Key + Algorithm Names."; + reference + "IANA 'Secure Shell (SSH) Protocol Parameters' + registry, Public Key Algorithm Names"; + } + leaf key-data { + type binary; + mandatory true; + description + "The binary public key data for this SSH key, as + specified by RFC 4253, Section 6.6, i.e.: + + string certificate or public key format + identifier + byte[n] key/certificate data."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + } + } + } + } + } + + /* + * Operational state data nodes + */ + + container system-state { + config false; + description + "System group operational state."; + + container platform { + description + "Contains vendor-specific information for + identifying the system platform and operating system."; + reference + "IEEE Std 1003.1-2008 - sys/utsname.h"; + + leaf os-name { + type string; + description + "The name of the operating system in use - + for example, 'Linux'."; + reference + "IEEE Std 1003.1-2008 - utsname.sysname"; + } + leaf os-release { + type string; + description + "The current release level of the operating + system in use. This string MAY indicate + the OS source code revision."; + reference + "IEEE Std 1003.1-2008 - utsname.release"; + } + leaf os-version { + type string; + description + "The current version level of the operating + system in use. This string MAY indicate + the specific OS build date and target variant + information."; + reference + "IEEE Std 1003.1-2008 - utsname.version"; + } + leaf machine { + type string; + description + "A vendor-specific identifier string representing + the hardware in use."; + reference + "IEEE Std 1003.1-2008 - utsname.machine"; + } + } + + container clock { + description + "Monitoring of the system date and time properties."; + + leaf current-datetime { + type yang:date-and-time; + description + "The current system date and time."; + } + + leaf boot-datetime { + type yang:date-and-time; + description + "The system date and time when the system last restarted."; + } + } + } + + rpc set-current-datetime { + nacm:default-deny-all; + description + "Set the /system-state/clock/current-datetime leaf + to the specified value. + + If the system is using NTP (i.e., /system/ntp/enabled + is set to 'true'), then this operation will fail with + error-tag 'operation-failed' and error-app-tag value of + 'ntp-active'."; + input { + leaf current-datetime { + type yang:date-and-time; + mandatory true; + description + "The current system date and time."; + } + } + } + + rpc system-restart { + nacm:default-deny-all; + description + "Request that the entire system be restarted immediately. + A server SHOULD send an rpc reply to the client before + restarting the system."; + } + + rpc system-shutdown { + nacm:default-deny-all; + description + "Request that the entire system be shut down immediately. + A server SHOULD send an rpc reply to the client before + shutting down the system."; + } + +} diff --git a/models/ietf/RFC/ietf-system@2014-08-06.yang b/models/ietf/RFC/ietf-system@2014-08-06.yang new file mode 100644 index 0000000000000000000000000000000000000000..1618242bcc10d8501eb4fd0347ff3c9aa1c08bbc --- /dev/null +++ b/models/ietf/RFC/ietf-system@2014-08-06.yang @@ -0,0 +1,800 @@ +module ietf-system { + namespace "urn:ietf:params:xml:ns:yang:ietf-system"; + prefix "sys"; + + import ietf-yang-types { + prefix yang; + } + + import ietf-inet-types { + prefix inet; + } + + import ietf-netconf-acm { + prefix nacm; + } + + import iana-crypt-hash { + prefix ianach; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "This module contains a collection of YANG definitions for the + configuration and identification of some common system + properties within a device containing a NETCONF server. This + includes data node definitions for system identification, + time-of-day management, user management, DNS resolver + configuration, and some protocol operations for system + management. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7317; see + the RFC itself for full legal notices."; + + revision 2014-08-06 { + description + "Initial revision."; + reference + "RFC 7317: A YANG Data Model for System Management"; + } + + /* + * Typedefs + */ + + typedef timezone-name { + type string; + description + "A time zone name as used by the Time Zone Database, + sometimes referred to as the 'Olson Database'. + + The exact set of valid values is an implementation-specific + matter. Client discovery of the exact set of time zone names + for a particular server is out of scope."; + reference + "RFC 6557: Procedures for Maintaining the Time Zone Database"; + } + + /* + * Features + */ + + feature radius { + description + "Indicates that the device can be configured as a RADIUS + client."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + feature authentication { + description + "Indicates that the device supports configuration of + user authentication."; + } + + feature local-users { + if-feature authentication; + description + "Indicates that the device supports configuration of + local user authentication."; + } + + feature radius-authentication { + if-feature radius; + if-feature authentication; + description + "Indicates that the device supports configuration of user + authentication over RADIUS."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS) + RFC 5607: Remote Authentication Dial-In User Service (RADIUS) + Authorization for Network Access Server (NAS) + Management"; + } + + feature ntp { + description + "Indicates that the device can be configured to use one or + more NTP servers to set the system date and time."; + } + + feature ntp-udp-port { + if-feature ntp; + description + "Indicates that the device supports the configuration of + the UDP port for NTP servers. + + This is a 'feature', since many implementations do not support + any port other than the default port."; + } + + feature timezone-name { + description + "Indicates that the local time zone on the device + can be configured to use the TZ database + to set the time zone and manage daylight saving time."; + reference + "RFC 6557: Procedures for Maintaining the Time Zone Database"; + } + + feature dns-udp-tcp-port { + description + "Indicates that the device supports the configuration of + the UDP and TCP port for DNS servers. + + This is a 'feature', since many implementations do not support + any port other than the default port."; + } + + /* + * Identities + */ + + identity authentication-method { + description + "Base identity for user authentication methods."; + } + + identity radius { + base authentication-method; + description + "Indicates user authentication using RADIUS."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS) + RFC 5607: Remote Authentication Dial-In User Service (RADIUS) + Authorization for Network Access Server (NAS) + Management"; + } + + identity local-users { + base authentication-method; + description + "Indicates password-based authentication of locally + configured users."; + } + + identity radius-authentication-type { + description + "Base identity for RADIUS authentication types."; + } + + identity radius-pap { + base radius-authentication-type; + description + "The device requests Password Authentication Protocol (PAP) + authentication from the RADIUS server."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + identity radius-chap { + base radius-authentication-type; + description + "The device requests Challenge Handshake Authentication + Protocol (CHAP) authentication from the RADIUS server."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + /* + * Configuration data nodes + */ + + container system { + description + "System group configuration."; + + leaf contact { + type string; + description + "The administrator contact information for the system. + + A server implementation MAY map this leaf to the sysContact + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and sysContact. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.sysContact"; + } + leaf hostname { + type inet:domain-name; + description + "The name of the host. This name can be a single domain + label or the fully qualified domain name of the host."; + } + leaf location { + type string; + description + "The system location. + + A server implementation MAY map this leaf to the sysLocation + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and sysLocation. The definition + of such a mechanism is outside the scope of this document."; + reference + "RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.sysLocation"; + } + + container clock { + description + "Configuration of the system date and time properties."; + + choice timezone { + description + "The system time zone information."; + + case timezone-name { + if-feature timezone-name; + leaf timezone-name { + type timezone-name; + description + "The TZ database name to use for the system, such + as 'Europe/Stockholm'."; + } + } + case timezone-utc-offset { + leaf timezone-utc-offset { + type int16 { + range "-1500 .. 1500"; + } + units "minutes"; + description + "The number of minutes to add to UTC time to + identify the time zone for this system. For example, + 'UTC - 8:00 hours' would be represented as '-480'. + Note that automatic daylight saving time adjustment + is not provided if this object is used."; + } + } + } + } + + container ntp { + if-feature ntp; + presence + "Enables the NTP client unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Configuration of the NTP client."; + + leaf enabled { + type boolean; + default true; + description + "Indicates that the system should attempt to + synchronize the system clock with an NTP server + from the 'ntp/server' list."; + } + list server { + key name; + description + "List of NTP servers to use for system clock + synchronization. If '/system/ntp/enabled' + is 'true', then the system will attempt to + contact and utilize the specified NTP servers."; + + leaf name { + type string; + description + "An arbitrary name for the NTP server."; + } + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + + case udp { + container udp { + description + "Contains UDP-specific configuration parameters + for NTP."; + leaf address { + type inet:host; + mandatory true; + description + "The address of the NTP server."; + } + leaf port { + if-feature ntp-udp-port; + type inet:port-number; + default 123; + description + "The port number of the NTP server."; + } + } + } + } + leaf association-type { + type enumeration { + enum server { + description + "Use client association mode. This device + will not provide synchronization to the + configured NTP server."; + } + enum peer { + description + "Use symmetric active association mode. + This device may provide synchronization + to the configured NTP server."; + } + enum pool { + description + "Use client association mode with one or + more of the NTP servers found by DNS + resolution of the domain name given by + the 'address' leaf. This device will not + provide synchronization to the servers."; + } + } + default server; + description + "The desired association type for this NTP server."; + } + leaf iburst { + type boolean; + default false; + description + "Indicates whether this server should enable burst + synchronization or not."; + } + leaf prefer { + type boolean; + default false; + description + "Indicates whether this server should be preferred + or not."; + } + } + } + + container dns-resolver { + description + "Configuration of the DNS resolver."; + + leaf-list search { + type inet:domain-name; + ordered-by user; + description + "An ordered list of domains to search when resolving + a host name."; + } + list server { + key name; + ordered-by user; + description + "List of the DNS servers that the resolver should query. + + When the resolver is invoked by a calling application, it + sends the query to the first name server in this list. If + no response has been received within 'timeout' seconds, + the resolver continues with the next server in the list. + If no response is received from any server, the resolver + continues with the first server again. When the resolver + has traversed the list 'attempts' times without receiving + any response, it gives up and returns an error to the + calling application. + + Implementations MAY limit the number of entries in this + list."; + + leaf name { + type string; + description + "An arbitrary name for the DNS server."; + } + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + + case udp-and-tcp { + container udp-and-tcp { + description + "Contains UDP- and TCP-specific configuration + parameters for DNS."; + reference + "RFC 1035: Domain Names - Implementation and + Specification + RFC 5966: DNS Transport over TCP - Implementation + Requirements"; + + leaf address { + type inet:ip-address; + mandatory true; + description + "The address of the DNS server."; + } + leaf port { + if-feature dns-udp-tcp-port; + type inet:port-number; + default 53; + description + "The UDP and TCP port number of the DNS server."; + } + } + } + } + } + container options { + description + "Resolver options. The set of available options has been + limited to those that are generally available across + different resolver implementations and generally useful."; + leaf timeout { + type uint8 { + range "1..max"; + } + units "seconds"; + default "5"; + description + "The amount of time the resolver will wait for a + response from each remote name server before + retrying the query via a different name server."; + } + leaf attempts { + type uint8 { + range "1..max"; + } + default "2"; + description + "The number of times the resolver will send a query to + all of its name servers before giving up and returning + an error to the calling application."; + } + } + } + + container radius { + if-feature radius; + + description + "Configuration of the RADIUS client."; + + list server { + key name; + ordered-by user; + description + "List of RADIUS servers used by the device. + + When the RADIUS client is invoked by a calling + application, it sends the query to the first server in + this list. If no response has been received within + 'timeout' seconds, the client continues with the next + server in the list. If no response is received from any + server, the client continues with the first server again. + When the client has traversed the list 'attempts' times + without receiving any response, it gives up and returns an + error to the calling application."; + + leaf name { + type string; + description + "An arbitrary name for the RADIUS server."; + } + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + + case udp { + container udp { + description + "Contains UDP-specific configuration parameters + for RADIUS."; + leaf address { + type inet:host; + mandatory true; + description + "The address of the RADIUS server."; + } + + leaf authentication-port { + type inet:port-number; + default "1812"; + description + "The port number of the RADIUS server."; + } + leaf shared-secret { + type string; + mandatory true; + nacm:default-deny-all; + description + "The shared secret, which is known to both the + RADIUS client and server."; + reference + "RFC 2865: Remote Authentication Dial In User + Service (RADIUS)"; + } + } + } + } + leaf authentication-type { + type identityref { + base radius-authentication-type; + } + default radius-pap; + description + "The authentication type requested from the RADIUS + server."; + } + } + container options { + description + "RADIUS client options."; + + leaf timeout { + type uint8 { + range "1..max"; + } + units "seconds"; + default "5"; + description + "The number of seconds the device will wait for a + response from each RADIUS server before trying with a + different server."; + } + + leaf attempts { + type uint8 { + range "1..max"; + } + default "2"; + description + "The number of times the device will send a query to + all of its RADIUS servers before giving up."; + } + } + } + + container authentication { + nacm:default-deny-write; + if-feature authentication; + + description + "The authentication configuration subtree."; + + leaf-list user-authentication-order { + type identityref { + base authentication-method; + } + must '(. != "sys:radius" or ../../radius/server)' { + error-message + "When 'radius' is used, a RADIUS server" + + " must be configured."; + description + "When 'radius' is used as an authentication method, + a RADIUS server must be configured."; + } + ordered-by user; + + description + "When the device authenticates a user with a password, + it tries the authentication methods in this leaf-list in + order. If authentication with one method fails, the next + method is used. If no method succeeds, the user is + denied access. + + An empty user-authentication-order leaf-list still allows + authentication of users using mechanisms that do not + involve a password. + + If the 'radius-authentication' feature is advertised by + the NETCONF server, the 'radius' identity can be added to + this list. + + If the 'local-users' feature is advertised by the + NETCONF server, the 'local-users' identity can be + added to this list."; + } + + list user { + if-feature local-users; + key name; + description + "The list of local users configured on this device."; + + leaf name { + type string; + description + "The user name string identifying this entry."; + } + leaf password { + type ianach:crypt-hash; + description + "The password for this entry."; + } + list authorized-key { + key name; + description + "A list of public SSH keys for this user. These keys + are allowed for SSH authentication, as described in + RFC 4253."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + + leaf name { + type string; + description + "An arbitrary name for the SSH key."; + } + + leaf algorithm { + type string; + mandatory true; + description + "The public key algorithm name for this SSH key. + + Valid values are the values in the IANA 'Secure Shell + (SSH) Protocol Parameters' registry, Public Key + Algorithm Names."; + reference + "IANA 'Secure Shell (SSH) Protocol Parameters' + registry, Public Key Algorithm Names"; + } + leaf key-data { + type binary; + mandatory true; + description + "The binary public key data for this SSH key, as + specified by RFC 4253, Section 6.6, i.e.: + + string certificate or public key format + identifier + byte[n] key/certificate data."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + } + } + } + } + } + + /* + * Operational state data nodes + */ + + container system-state { + config false; + description + "System group operational state."; + + container platform { + description + "Contains vendor-specific information for + identifying the system platform and operating system."; + reference + "IEEE Std 1003.1-2008 - sys/utsname.h"; + + leaf os-name { + type string; + description + "The name of the operating system in use - + for example, 'Linux'."; + reference + "IEEE Std 1003.1-2008 - utsname.sysname"; + } + leaf os-release { + type string; + description + "The current release level of the operating + system in use. This string MAY indicate + the OS source code revision."; + reference + "IEEE Std 1003.1-2008 - utsname.release"; + } + leaf os-version { + type string; + description + "The current version level of the operating + system in use. This string MAY indicate + the specific OS build date and target variant + information."; + reference + "IEEE Std 1003.1-2008 - utsname.version"; + } + leaf machine { + type string; + description + "A vendor-specific identifier string representing + the hardware in use."; + reference + "IEEE Std 1003.1-2008 - utsname.machine"; + } + } + + container clock { + description + "Monitoring of the system date and time properties."; + + leaf current-datetime { + type yang:date-and-time; + description + "The current system date and time."; + } + + leaf boot-datetime { + type yang:date-and-time; + description + "The system date and time when the system last restarted."; + } + } + } + + rpc set-current-datetime { + nacm:default-deny-all; + description + "Set the /system-state/clock/current-datetime leaf + to the specified value. + + If the system is using NTP (i.e., /system/ntp/enabled + is set to 'true'), then this operation will fail with + error-tag 'operation-failed' and error-app-tag value of + 'ntp-active'."; + input { + leaf current-datetime { + type yang:date-and-time; + mandatory true; + description + "The current system date and time."; + } + } + } + + rpc system-restart { + nacm:default-deny-all; + description + "Request that the entire system be restarted immediately. + A server SHOULD send an rpc reply to the client before + restarting the system."; + } + + rpc system-shutdown { + nacm:default-deny-all; + description + "Request that the entire system be shut down immediately. + A server SHOULD send an rpc reply to the client before + shutting down the system."; + } + +} diff --git a/models/ietf/RFC/ietf-sztp-bootstrap-server.yang b/models/ietf/RFC/ietf-sztp-bootstrap-server.yang new file mode 100644 index 0000000000000000000000000000000000000000..f96a2f2654d168e9c0f8f0ce743af995cf1be5e2 --- /dev/null +++ b/models/ietf/RFC/ietf-sztp-bootstrap-server.yang @@ -0,0 +1,532 @@ +module ietf-sztp-bootstrap-server { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-sztp-bootstrap-server"; + prefix sztp-svr; + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + Author: Kent Watsen <mailto:kent+ietf@watsen.net>"; + description + "This module defines an interface for bootstrap servers, as + defined by RFC 8572 ('Secure Zero Touch Provisioning (SZTP)'). + + 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. + + Copyright (c) 2019 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 Simplified 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 8572; see the + RFC itself for full legal notices."; + + revision 2019-04-30 { + description + "Initial version"; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + + // features + + feature redirect-server { + description + "The server supports being a 'redirect server'."; + } + + feature onboarding-server { + description + "The server supports being an 'onboarding server'."; + } + + // typedefs + + typedef cms { + type binary; + description + "A CMS structure, as specified in RFC 5652, encoded using + ASN.1 distinguished encoding rules (DER), as specified in + ITU-T X.690."; + reference + "RFC 5652: + Cryptographic Message Syntax (CMS) + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)"; + } + + // RPCs + + rpc get-bootstrapping-data { + description + "This RPC enables a device, as identified by the RESTCONF + username, to obtain bootstrapping data that has been made + available for it."; + input { + leaf signed-data-preferred { + type empty; + description + "This optional input parameter enables a device to + communicate to the bootstrap server that it prefers + to receive signed data. Devices SHOULD always send + this parameter when the bootstrap server is untrusted. + Upon receiving this input parameter, the bootstrap + server MUST return either signed data or unsigned + redirect information; the bootstrap server MUST NOT + return unsigned onboarding information."; + } + leaf hw-model { + type string; + description + "This optional input parameter enables a device to + communicate to the bootstrap server its vendor-specific + hardware model number. This parameter may be needed, + for instance, when a device's IDevID certificate does + not include the 'hardwareModelName' value in its + subjectAltName field, as is allowed by 802.1AR."; + reference + "IEEE 802.1AR: IEEE Standard for Local and + metropolitan area networks - Secure + Device Identity"; + } + leaf os-name { + type string; + description + "This optional input parameter enables a device to + communicate to the bootstrap server the name of its + operating system. This parameter may be useful if + the device, as identified by its serial number, can + run more than one type of operating system (e.g., + on a white-box system."; + } + leaf os-version { + type string; + description + "This optional input parameter enables a device to + communicate to the bootstrap server the version of its + operating system. This parameter may be used by a + bootstrap server to return an operating-system-specific + response to the device, thus negating the need for a + potentially expensive boot image update."; + } + leaf nonce { + type binary { + length "16..32"; + } + description + "This optional input parameter enables a device to + communicate to the bootstrap server a nonce value. + This may be especially useful for devices lacking + an accurate clock, as then the bootstrap server + can dynamically obtain from the manufacturer a + voucher with the nonce value in it, as described + in RFC 8366."; + reference + "RFC 8366: + A Voucher Artifact for Bootstrapping Protocols"; + } + } + output { + leaf reporting-level { + if-feature "onboarding-server"; + type enumeration { + enum minimal { + description + "Send just the progress reports required by RFC 8572."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + enum verbose { + description + "Send additional progress reports that might help + troubleshooting an SZTP bootstrapping issue."; + } + } + default "minimal"; + description + "Specifies the reporting level for progress reports the + bootstrap server would like to receive when processing + onboarding information. Progress reports are not sent + when processing redirect information or when the + bootstrap server is untrusted (e.g., device sent the + '<signed-data-preferred>' input parameter)."; + } + leaf conveyed-information { + type cms; + mandatory true; + description + "An SZTP conveyed information artifact, as described in + Section 3.1 of RFC 8572."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + leaf owner-certificate { + type cms; + must '../ownership-voucher' { + description + "An ownership voucher must be present whenever an owner + certificate is presented."; + } + description + "An owner certificate artifact, as described in Section + 3.2 of RFC 8572. This leaf is optional because it is + only needed when the conveyed information artifact is + signed."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + leaf ownership-voucher { + type cms; + must '../owner-certificate' { + description + "An owner certificate must be present whenever an + ownership voucher is presented."; + } + description + "An ownership voucher artifact, as described by Section + 3.3 of RFC 8572. This leaf is optional because it is + only needed when the conveyed information artifact is + signed."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + } + } + + rpc report-progress { + if-feature "onboarding-server"; + description + "This RPC enables a device, as identified by the RESTCONF + username, to report its bootstrapping progress to the + bootstrap server. This RPC is expected to be used when + the device obtains onboarding-information from a trusted + bootstrap server."; + input { + leaf progress-type { + type enumeration { + enum bootstrap-initiated { + description + "Indicates that the device just used the + 'get-bootstrapping-data' RPC. The 'message' node + below MAY contain any additional information that + the manufacturer thinks might be useful."; + } + enum parsing-initiated { + description + "Indicates that the device is about to start parsing + the onboarding information. This progress type is + only for when parsing is implemented as a distinct + step."; + } + enum parsing-warning { + description + "Indicates that the device had a non-fatal error when + parsing the response from the bootstrap server. The + 'message' node below SHOULD indicate the specific + warning that occurred."; + } + enum parsing-error { + description + "Indicates that the device encountered a fatal error + when parsing the response from the bootstrap server. + For instance, this could be due to malformed encoding, + the device expecting signed data when only unsigned + data is provided, the ownership voucher not listing + the device's serial number, or because the signature + didn't match. The 'message' node below SHOULD + indicate the specific error. This progress type + also indicates that the device has abandoned trying + to bootstrap off this bootstrap server."; + } + enum parsing-complete { + description + "Indicates that the device successfully completed + parsing the onboarding information. This progress + type is only for when parsing is implemented as a + distinct step."; + } + enum boot-image-initiated { + description + "Indicates that the device is about to start + processing the boot image information."; + } + enum boot-image-warning { + description + "Indicates that the device encountered a non-fatal + error condition when trying to install a boot image. + A possible reason might include a need to reformat a + partition causing loss of data. The 'message' node + below SHOULD indicate any warning messages that were + generated."; + } + enum boot-image-error { + description + "Indicates that the device encountered an error when + trying to install a boot image, which could be for + reasons such as a file server being unreachable, + file not found, signature mismatch, etc. The + 'message' node SHOULD indicate the specific error + that occurred. This progress type also indicates + that the device has abandoned trying to bootstrap + off this bootstrap server."; + } + enum boot-image-mismatch { + description + "Indicates that the device has determined that + it is not running the correct boot image. This + message SHOULD precipitate trying to download + a boot image."; + } + enum boot-image-installed-rebooting { + description + "Indicates that the device successfully installed + a new boot image and is about to reboot. After + sending this progress type, the device is not + expected to access the bootstrap server again + for this bootstrapping attempt."; + } + enum boot-image-complete { + description + "Indicates that the device believes that it is + running the correct boot image."; + } + enum pre-script-initiated { + description + "Indicates that the device is about to execute the + 'pre-configuration-script'."; + } + enum pre-script-warning { + description + "Indicates that the device obtained a warning from the + 'pre-configuration-script' when it was executed. The + 'message' node below SHOULD capture any output the + script produces."; + } + enum pre-script-error { + description + "Indicates that the device obtained an error from the + 'pre-configuration-script' when it was executed. The + 'message' node below SHOULD capture any output the + script produces. This progress type also indicates + that the device has abandoned trying to bootstrap + off this bootstrap server."; + } + enum pre-script-complete { + description + "Indicates that the device successfully executed the + 'pre-configuration-script'."; + } + enum config-initiated { + description + "Indicates that the device is about to commit the + initial configuration."; + } + enum config-warning { + description + "Indicates that the device obtained warning messages + when it committed the initial configuration. The + 'message' node below SHOULD indicate any warning + messages that were generated."; + } + enum config-error { + description + "Indicates that the device obtained error messages + when it committed the initial configuration. The + 'message' node below SHOULD indicate the error + messages that were generated. This progress type + also indicates that the device has abandoned trying + to bootstrap off this bootstrap server."; + } + enum config-complete { + description + "Indicates that the device successfully committed + the initial configuration."; + } + enum post-script-initiated { + description + "Indicates that the device is about to execute the + 'post-configuration-script'."; + } + enum post-script-warning { + description + "Indicates that the device obtained a warning from the + 'post-configuration-script' when it was executed. The + 'message' node below SHOULD capture any output the + script produces."; + } + enum post-script-error { + description + "Indicates that the device obtained an error from the + 'post-configuration-script' when it was executed. The + 'message' node below SHOULD capture any output the + script produces. This progress type also indicates + that the device has abandoned trying to bootstrap + off this bootstrap server."; + } + enum post-script-complete { + description + "Indicates that the device successfully executed the + 'post-configuration-script'."; + } + enum bootstrap-warning { + description + "Indicates that a warning condition occurred for which + no other 'progress-type' enumeration is deemed + suitable. The 'message' node below SHOULD describe + the warning."; + } + enum bootstrap-error { + description + "Indicates that an error condition occurred for which + no other 'progress-type' enumeration is deemed + suitable. The 'message' node below SHOULD describe + the error. This progress type also indicates that + the device has abandoned trying to bootstrap off + this bootstrap server."; + } + enum bootstrap-complete { + description + "Indicates that the device successfully processed + all 'onboarding-information' provided and that it + is ready to be managed. The 'message' node below + MAY contain any additional information that the + manufacturer thinks might be useful. After sending + this progress type, the device is not expected to + access the bootstrap server again."; + } + enum informational { + description + "Indicates any additional information not captured + by any of the other progress types. For instance, + a message indicating that the device is about to + reboot after having installed a boot image could + be provided. The 'message' node below SHOULD + contain information that the manufacturer thinks + might be useful."; + } + } + mandatory true; + description + "The type of progress report provided."; + } + leaf message { + type string; + description + "An optional arbitrary value."; + } + container ssh-host-keys { + when "../progress-type = 'bootstrap-complete'" { + description + "SSH host keys are only sent when the progress type + is 'bootstrap-complete'."; + } + description + "A list of SSH host keys an NMS may use to authenticate + subsequent SSH-based connections to this device (e.g., + netconf-ssh, netconf-ch-ssh)."; + list ssh-host-key { + description + "An SSH host key an NMS may use to authenticate + subsequent SSH-based connections to this device + (e.g., netconf-ssh and netconf-ch-ssh)."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + leaf algorithm { + type string; + mandatory true; + description + "The public key algorithm name for this SSH key. + + Valid values are listed in the 'Public Key Algorithm + Names' subregistry of the 'Secure Shell (SSH) Protocol + Parameters' registry maintained by IANA."; + reference + "RFC 4250: The Secure Shell (SSH) Protocol Assigned + Numbers + IANA URL: <https://www.iana.org/assignments/ssh-para\\ + meters> + ('\\' added for formatting reasons)"; + } + leaf key-data { + type binary; + mandatory true; + description + "The binary public key data for this SSH key, as + specified by RFC 4253, Section 6.6; that is: + + string certificate or public key format + identifier + byte[n] key/certificate data."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + } + } + } + container trust-anchor-certs { + when "../progress-type = 'bootstrap-complete'" { + description + "Trust anchors are only sent when the progress type + is 'bootstrap-complete'."; + } + description + "A list of trust anchor certificates an NMS may use to + authenticate subsequent certificate-based connections + to this device (e.g., restconf-tls, netconf-tls, or + even netconf-ssh with X.509 support from RFC 6187). + In practice, trust anchors for IDevID certificates do + not need to be conveyed using this mechanism."; + reference + "RFC 6187: X.509v3 Certificates for Secure Shell + Authentication"; + leaf-list trust-anchor-cert { + type cms; + description + "A CMS structure whose topmost content type MUST be the + signed-data content type, as described by Section 5 of + RFC 5652. + + The CMS MUST contain the chain of X.509 certificates + needed to authenticate the certificate presented by + the device. + + The CMS MUST contain only a single chain of + certificates. The last certificate in the chain + MUST be the issuer for the device's end-entity + certificate. + + In all cases, the chain MUST include a self-signed + root certificate. In the case where the root + certificate is itself the issuer of the device's + end-entity certificate, only one certificate is + present. + + This CMS encodes the degenerate form of the SignedData + structure that is commonly used to disseminate X.509 + certificates and revocation objects (RFC 5280)."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation List + (CRL) Profile + RFC 5652: Cryptographic Message Syntax (CMS)"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-sztp-bootstrap-server@2019-04-30.yang b/models/ietf/RFC/ietf-sztp-bootstrap-server@2019-04-30.yang new file mode 100644 index 0000000000000000000000000000000000000000..f96a2f2654d168e9c0f8f0ce743af995cf1be5e2 --- /dev/null +++ b/models/ietf/RFC/ietf-sztp-bootstrap-server@2019-04-30.yang @@ -0,0 +1,532 @@ +module ietf-sztp-bootstrap-server { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-sztp-bootstrap-server"; + prefix sztp-svr; + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + Author: Kent Watsen <mailto:kent+ietf@watsen.net>"; + description + "This module defines an interface for bootstrap servers, as + defined by RFC 8572 ('Secure Zero Touch Provisioning (SZTP)'). + + 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. + + Copyright (c) 2019 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 Simplified 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 8572; see the + RFC itself for full legal notices."; + + revision 2019-04-30 { + description + "Initial version"; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + + // features + + feature redirect-server { + description + "The server supports being a 'redirect server'."; + } + + feature onboarding-server { + description + "The server supports being an 'onboarding server'."; + } + + // typedefs + + typedef cms { + type binary; + description + "A CMS structure, as specified in RFC 5652, encoded using + ASN.1 distinguished encoding rules (DER), as specified in + ITU-T X.690."; + reference + "RFC 5652: + Cryptographic Message Syntax (CMS) + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)"; + } + + // RPCs + + rpc get-bootstrapping-data { + description + "This RPC enables a device, as identified by the RESTCONF + username, to obtain bootstrapping data that has been made + available for it."; + input { + leaf signed-data-preferred { + type empty; + description + "This optional input parameter enables a device to + communicate to the bootstrap server that it prefers + to receive signed data. Devices SHOULD always send + this parameter when the bootstrap server is untrusted. + Upon receiving this input parameter, the bootstrap + server MUST return either signed data or unsigned + redirect information; the bootstrap server MUST NOT + return unsigned onboarding information."; + } + leaf hw-model { + type string; + description + "This optional input parameter enables a device to + communicate to the bootstrap server its vendor-specific + hardware model number. This parameter may be needed, + for instance, when a device's IDevID certificate does + not include the 'hardwareModelName' value in its + subjectAltName field, as is allowed by 802.1AR."; + reference + "IEEE 802.1AR: IEEE Standard for Local and + metropolitan area networks - Secure + Device Identity"; + } + leaf os-name { + type string; + description + "This optional input parameter enables a device to + communicate to the bootstrap server the name of its + operating system. This parameter may be useful if + the device, as identified by its serial number, can + run more than one type of operating system (e.g., + on a white-box system."; + } + leaf os-version { + type string; + description + "This optional input parameter enables a device to + communicate to the bootstrap server the version of its + operating system. This parameter may be used by a + bootstrap server to return an operating-system-specific + response to the device, thus negating the need for a + potentially expensive boot image update."; + } + leaf nonce { + type binary { + length "16..32"; + } + description + "This optional input parameter enables a device to + communicate to the bootstrap server a nonce value. + This may be especially useful for devices lacking + an accurate clock, as then the bootstrap server + can dynamically obtain from the manufacturer a + voucher with the nonce value in it, as described + in RFC 8366."; + reference + "RFC 8366: + A Voucher Artifact for Bootstrapping Protocols"; + } + } + output { + leaf reporting-level { + if-feature "onboarding-server"; + type enumeration { + enum minimal { + description + "Send just the progress reports required by RFC 8572."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + enum verbose { + description + "Send additional progress reports that might help + troubleshooting an SZTP bootstrapping issue."; + } + } + default "minimal"; + description + "Specifies the reporting level for progress reports the + bootstrap server would like to receive when processing + onboarding information. Progress reports are not sent + when processing redirect information or when the + bootstrap server is untrusted (e.g., device sent the + '<signed-data-preferred>' input parameter)."; + } + leaf conveyed-information { + type cms; + mandatory true; + description + "An SZTP conveyed information artifact, as described in + Section 3.1 of RFC 8572."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + leaf owner-certificate { + type cms; + must '../ownership-voucher' { + description + "An ownership voucher must be present whenever an owner + certificate is presented."; + } + description + "An owner certificate artifact, as described in Section + 3.2 of RFC 8572. This leaf is optional because it is + only needed when the conveyed information artifact is + signed."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + leaf ownership-voucher { + type cms; + must '../owner-certificate' { + description + "An owner certificate must be present whenever an + ownership voucher is presented."; + } + description + "An ownership voucher artifact, as described by Section + 3.3 of RFC 8572. This leaf is optional because it is + only needed when the conveyed information artifact is + signed."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + } + } + + rpc report-progress { + if-feature "onboarding-server"; + description + "This RPC enables a device, as identified by the RESTCONF + username, to report its bootstrapping progress to the + bootstrap server. This RPC is expected to be used when + the device obtains onboarding-information from a trusted + bootstrap server."; + input { + leaf progress-type { + type enumeration { + enum bootstrap-initiated { + description + "Indicates that the device just used the + 'get-bootstrapping-data' RPC. The 'message' node + below MAY contain any additional information that + the manufacturer thinks might be useful."; + } + enum parsing-initiated { + description + "Indicates that the device is about to start parsing + the onboarding information. This progress type is + only for when parsing is implemented as a distinct + step."; + } + enum parsing-warning { + description + "Indicates that the device had a non-fatal error when + parsing the response from the bootstrap server. The + 'message' node below SHOULD indicate the specific + warning that occurred."; + } + enum parsing-error { + description + "Indicates that the device encountered a fatal error + when parsing the response from the bootstrap server. + For instance, this could be due to malformed encoding, + the device expecting signed data when only unsigned + data is provided, the ownership voucher not listing + the device's serial number, or because the signature + didn't match. The 'message' node below SHOULD + indicate the specific error. This progress type + also indicates that the device has abandoned trying + to bootstrap off this bootstrap server."; + } + enum parsing-complete { + description + "Indicates that the device successfully completed + parsing the onboarding information. This progress + type is only for when parsing is implemented as a + distinct step."; + } + enum boot-image-initiated { + description + "Indicates that the device is about to start + processing the boot image information."; + } + enum boot-image-warning { + description + "Indicates that the device encountered a non-fatal + error condition when trying to install a boot image. + A possible reason might include a need to reformat a + partition causing loss of data. The 'message' node + below SHOULD indicate any warning messages that were + generated."; + } + enum boot-image-error { + description + "Indicates that the device encountered an error when + trying to install a boot image, which could be for + reasons such as a file server being unreachable, + file not found, signature mismatch, etc. The + 'message' node SHOULD indicate the specific error + that occurred. This progress type also indicates + that the device has abandoned trying to bootstrap + off this bootstrap server."; + } + enum boot-image-mismatch { + description + "Indicates that the device has determined that + it is not running the correct boot image. This + message SHOULD precipitate trying to download + a boot image."; + } + enum boot-image-installed-rebooting { + description + "Indicates that the device successfully installed + a new boot image and is about to reboot. After + sending this progress type, the device is not + expected to access the bootstrap server again + for this bootstrapping attempt."; + } + enum boot-image-complete { + description + "Indicates that the device believes that it is + running the correct boot image."; + } + enum pre-script-initiated { + description + "Indicates that the device is about to execute the + 'pre-configuration-script'."; + } + enum pre-script-warning { + description + "Indicates that the device obtained a warning from the + 'pre-configuration-script' when it was executed. The + 'message' node below SHOULD capture any output the + script produces."; + } + enum pre-script-error { + description + "Indicates that the device obtained an error from the + 'pre-configuration-script' when it was executed. The + 'message' node below SHOULD capture any output the + script produces. This progress type also indicates + that the device has abandoned trying to bootstrap + off this bootstrap server."; + } + enum pre-script-complete { + description + "Indicates that the device successfully executed the + 'pre-configuration-script'."; + } + enum config-initiated { + description + "Indicates that the device is about to commit the + initial configuration."; + } + enum config-warning { + description + "Indicates that the device obtained warning messages + when it committed the initial configuration. The + 'message' node below SHOULD indicate any warning + messages that were generated."; + } + enum config-error { + description + "Indicates that the device obtained error messages + when it committed the initial configuration. The + 'message' node below SHOULD indicate the error + messages that were generated. This progress type + also indicates that the device has abandoned trying + to bootstrap off this bootstrap server."; + } + enum config-complete { + description + "Indicates that the device successfully committed + the initial configuration."; + } + enum post-script-initiated { + description + "Indicates that the device is about to execute the + 'post-configuration-script'."; + } + enum post-script-warning { + description + "Indicates that the device obtained a warning from the + 'post-configuration-script' when it was executed. The + 'message' node below SHOULD capture any output the + script produces."; + } + enum post-script-error { + description + "Indicates that the device obtained an error from the + 'post-configuration-script' when it was executed. The + 'message' node below SHOULD capture any output the + script produces. This progress type also indicates + that the device has abandoned trying to bootstrap + off this bootstrap server."; + } + enum post-script-complete { + description + "Indicates that the device successfully executed the + 'post-configuration-script'."; + } + enum bootstrap-warning { + description + "Indicates that a warning condition occurred for which + no other 'progress-type' enumeration is deemed + suitable. The 'message' node below SHOULD describe + the warning."; + } + enum bootstrap-error { + description + "Indicates that an error condition occurred for which + no other 'progress-type' enumeration is deemed + suitable. The 'message' node below SHOULD describe + the error. This progress type also indicates that + the device has abandoned trying to bootstrap off + this bootstrap server."; + } + enum bootstrap-complete { + description + "Indicates that the device successfully processed + all 'onboarding-information' provided and that it + is ready to be managed. The 'message' node below + MAY contain any additional information that the + manufacturer thinks might be useful. After sending + this progress type, the device is not expected to + access the bootstrap server again."; + } + enum informational { + description + "Indicates any additional information not captured + by any of the other progress types. For instance, + a message indicating that the device is about to + reboot after having installed a boot image could + be provided. The 'message' node below SHOULD + contain information that the manufacturer thinks + might be useful."; + } + } + mandatory true; + description + "The type of progress report provided."; + } + leaf message { + type string; + description + "An optional arbitrary value."; + } + container ssh-host-keys { + when "../progress-type = 'bootstrap-complete'" { + description + "SSH host keys are only sent when the progress type + is 'bootstrap-complete'."; + } + description + "A list of SSH host keys an NMS may use to authenticate + subsequent SSH-based connections to this device (e.g., + netconf-ssh, netconf-ch-ssh)."; + list ssh-host-key { + description + "An SSH host key an NMS may use to authenticate + subsequent SSH-based connections to this device + (e.g., netconf-ssh and netconf-ch-ssh)."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + leaf algorithm { + type string; + mandatory true; + description + "The public key algorithm name for this SSH key. + + Valid values are listed in the 'Public Key Algorithm + Names' subregistry of the 'Secure Shell (SSH) Protocol + Parameters' registry maintained by IANA."; + reference + "RFC 4250: The Secure Shell (SSH) Protocol Assigned + Numbers + IANA URL: <https://www.iana.org/assignments/ssh-para\\ + meters> + ('\\' added for formatting reasons)"; + } + leaf key-data { + type binary; + mandatory true; + description + "The binary public key data for this SSH key, as + specified by RFC 4253, Section 6.6; that is: + + string certificate or public key format + identifier + byte[n] key/certificate data."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + } + } + } + container trust-anchor-certs { + when "../progress-type = 'bootstrap-complete'" { + description + "Trust anchors are only sent when the progress type + is 'bootstrap-complete'."; + } + description + "A list of trust anchor certificates an NMS may use to + authenticate subsequent certificate-based connections + to this device (e.g., restconf-tls, netconf-tls, or + even netconf-ssh with X.509 support from RFC 6187). + In practice, trust anchors for IDevID certificates do + not need to be conveyed using this mechanism."; + reference + "RFC 6187: X.509v3 Certificates for Secure Shell + Authentication"; + leaf-list trust-anchor-cert { + type cms; + description + "A CMS structure whose topmost content type MUST be the + signed-data content type, as described by Section 5 of + RFC 5652. + + The CMS MUST contain the chain of X.509 certificates + needed to authenticate the certificate presented by + the device. + + The CMS MUST contain only a single chain of + certificates. The last certificate in the chain + MUST be the issuer for the device's end-entity + certificate. + + In all cases, the chain MUST include a self-signed + root certificate. In the case where the root + certificate is itself the issuer of the device's + end-entity certificate, only one certificate is + present. + + This CMS encodes the degenerate form of the SignedData + structure that is commonly used to disseminate X.509 + certificates and revocation objects (RFC 5280)."; + reference + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation List + (CRL) Profile + RFC 5652: Cryptographic Message Syntax (CMS)"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-sztp-conveyed-info.yang b/models/ietf/RFC/ietf-sztp-conveyed-info.yang new file mode 100644 index 0000000000000000000000000000000000000000..4e64db2e89e5a14414cf11928cfeab8ffc6efacc --- /dev/null +++ b/models/ietf/RFC/ietf-sztp-conveyed-info.yang @@ -0,0 +1,296 @@ +module ietf-sztp-conveyed-info { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-sztp-conveyed-info"; + prefix sztp-info; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-restconf { + prefix rc; + reference + "RFC 8040: RESTCONF Protocol"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + Author: Kent Watsen <mailto:kent+ietf@watsen.net>"; + description + "This module defines the data model for the conveyed + information artifact defined in RFC 8572 ('Secure Zero Touch + Provisioning (SZTP)'). + + 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. + Copyright (c) 2019 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 Simplified 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 8572; see the + RFC itself for full legal notices."; + + revision 2019-04-30 { + description + "Initial version"; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + + // identities + + identity hash-algorithm { + description + "A base identity for hash algorithm verification."; + } + + identity sha-256 { + base hash-algorithm; + description + "The SHA-256 algorithm."; + reference + "RFC 6234: US Secure Hash Algorithms"; + } + + // typedefs + + typedef cms { + type binary; + description + "A ContentInfo structure, as specified in RFC 5652, + encoded using ASN.1 distinguished encoding rules (DER), + as specified in ITU-T X.690."; + reference + "RFC 5652: + Cryptographic Message Syntax (CMS) + + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)"; + } + + // yang-data + rc:yang-data conveyed-information { + choice information-type { + mandatory true; + description + "This choice statement ensures the response contains + redirect-information or onboarding-information."; + container redirect-information { + description + "Redirect information is described in Section 2.1 of + RFC 8572. Its purpose is to redirect a device to + another bootstrap server."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + list bootstrap-server { + key "address"; + min-elements 1; + description + "A bootstrap server entry."; + leaf address { + type inet:host; + mandatory true; + description + "The IP address or hostname of the bootstrap server the + device should redirect to."; + } + leaf port { + type inet:port-number; + default "443"; + description + "The port number the bootstrap server listens on. If no + port is specified, the IANA-assigned port for 'https' + (443) is used."; + } + leaf trust-anchor { + type cms; + description + "A CMS structure that MUST contain the chain of + X.509 certificates needed to authenticate the TLS + certificate presented by this bootstrap server. + + The CMS MUST only contain a single chain of + certificates. The bootstrap server MUST only + authenticate to last intermediate CA certificate + listed in the chain. + + In all cases, the chain MUST include a self-signed + root certificate. In the case where the root + certificate is itself the issuer of the bootstrap + server's TLS certificate, only one certificate + is present. + + If needed by the device, this CMS structure MAY + also contain suitably fresh revocation objects + with which the device can verify the revocation + status of the certificates. + + This CMS encodes the degenerate form of the SignedData + structure that is commonly used to disseminate X.509 + certificates and revocation objects (RFC 5280)."; + reference + "RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile"; + } + } + } + container onboarding-information { + description + "Onboarding information is described in Section 2.2 of + RFC 8572. Its purpose is to provide the device everything + it needs to bootstrap itself."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + container boot-image { + description + "Specifies criteria for the boot image the device MUST + be running, as well as information enabling the device + to install the required boot image."; + leaf os-name { + type string; + description + "The name of the operating system software the device + MUST be running in order to not require a software + image upgrade (e.g., VendorOS)."; + } + leaf os-version { + type string; + + description + "The version of the operating system software the + device MUST be running in order to not require a + software image upgrade (e.g., 17.3R2.1)."; + } + leaf-list download-uri { + type inet:uri; + ordered-by user; + description + "An ordered list of URIs to where the same boot image + file may be obtained. How the URI schemes (http, ftp, + etc.) a device supports are known is vendor specific. + If a secure scheme (e.g., https) is provided, a device + MAY establish an untrusted connection to the remote + server, by blindly accepting the server's end-entity + certificate, to obtain the boot image."; + } + list image-verification { + must '../download-uri' { + description + "Download URIs must be provided if an image is to + be verified."; + } + key "hash-algorithm"; + description + "A list of hash values that a device can use to verify + boot image files with."; + leaf hash-algorithm { + type identityref { + base hash-algorithm; + } + description + "Identifies the hash algorithm used."; + } + leaf hash-value { + type yang:hex-string; + mandatory true; + description + "The hex-encoded value of the specified hash + algorithm over the contents of the boot image + file."; + } + } + } + leaf configuration-handling { + type enumeration { + enum merge { + + description + "Merge configuration into the running datastore."; + } + enum replace { + description + "Replace the existing running datastore with the + passed configuration."; + } + } + must '../configuration'; + description + "This enumeration indicates how the server should process + the provided configuration."; + } + leaf pre-configuration-script { + type script; + description + "A script that, when present, is executed before the + configuration has been processed."; + } + leaf configuration { + type binary; + must '../configuration-handling'; + description + "Any configuration known to the device. The use of + the 'binary' type enables content (e.g., XML) to be + embedded into a JSON document. The exact encoding + of the content, as with the scripts, is vendor + specific."; + } + leaf post-configuration-script { + type script; + description + "A script that, when present, is executed after the + configuration has been processed."; + } + } + } + } + + typedef script { + type binary; + description + "A device-specific script that enables the execution of + commands to perform actions not possible thru configuration + alone. + + No attempt is made to standardize the contents, running + context, or programming language of the script, other than + that it can indicate if any warnings or errors occurred and + can emit output. The contents of the script are considered + specific to the vendor, product line, and/or model of the + device. + + If the script execution indicates that a warning occurred, + then the device MUST assume that the script had a soft error + that the script believes will not affect manageability. + + If the script execution indicates that an error occurred, + the device MUST assume the script had a hard error that the + script believes will affect manageability. In this case, + the script is required to gracefully exit, removing any + state that might hinder the device's ability to continue + the bootstrapping sequence (e.g., process onboarding + information obtained from another bootstrap server)."; + } +} diff --git a/models/ietf/RFC/ietf-sztp-conveyed-info@2019-04-30.yang b/models/ietf/RFC/ietf-sztp-conveyed-info@2019-04-30.yang new file mode 100644 index 0000000000000000000000000000000000000000..4e64db2e89e5a14414cf11928cfeab8ffc6efacc --- /dev/null +++ b/models/ietf/RFC/ietf-sztp-conveyed-info@2019-04-30.yang @@ -0,0 +1,296 @@ +module ietf-sztp-conveyed-info { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-sztp-conveyed-info"; + prefix sztp-info; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-restconf { + prefix rc; + reference + "RFC 8040: RESTCONF Protocol"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + Author: Kent Watsen <mailto:kent+ietf@watsen.net>"; + description + "This module defines the data model for the conveyed + information artifact defined in RFC 8572 ('Secure Zero Touch + Provisioning (SZTP)'). + + 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. + Copyright (c) 2019 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 Simplified 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 8572; see the + RFC itself for full legal notices."; + + revision 2019-04-30 { + description + "Initial version"; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + } + + // identities + + identity hash-algorithm { + description + "A base identity for hash algorithm verification."; + } + + identity sha-256 { + base hash-algorithm; + description + "The SHA-256 algorithm."; + reference + "RFC 6234: US Secure Hash Algorithms"; + } + + // typedefs + + typedef cms { + type binary; + description + "A ContentInfo structure, as specified in RFC 5652, + encoded using ASN.1 distinguished encoding rules (DER), + as specified in ITU-T X.690."; + reference + "RFC 5652: + Cryptographic Message Syntax (CMS) + + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)"; + } + + // yang-data + rc:yang-data conveyed-information { + choice information-type { + mandatory true; + description + "This choice statement ensures the response contains + redirect-information or onboarding-information."; + container redirect-information { + description + "Redirect information is described in Section 2.1 of + RFC 8572. Its purpose is to redirect a device to + another bootstrap server."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + list bootstrap-server { + key "address"; + min-elements 1; + description + "A bootstrap server entry."; + leaf address { + type inet:host; + mandatory true; + description + "The IP address or hostname of the bootstrap server the + device should redirect to."; + } + leaf port { + type inet:port-number; + default "443"; + description + "The port number the bootstrap server listens on. If no + port is specified, the IANA-assigned port for 'https' + (443) is used."; + } + leaf trust-anchor { + type cms; + description + "A CMS structure that MUST contain the chain of + X.509 certificates needed to authenticate the TLS + certificate presented by this bootstrap server. + + The CMS MUST only contain a single chain of + certificates. The bootstrap server MUST only + authenticate to last intermediate CA certificate + listed in the chain. + + In all cases, the chain MUST include a self-signed + root certificate. In the case where the root + certificate is itself the issuer of the bootstrap + server's TLS certificate, only one certificate + is present. + + If needed by the device, this CMS structure MAY + also contain suitably fresh revocation objects + with which the device can verify the revocation + status of the certificates. + + This CMS encodes the degenerate form of the SignedData + structure that is commonly used to disseminate X.509 + certificates and revocation objects (RFC 5280)."; + reference + "RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile"; + } + } + } + container onboarding-information { + description + "Onboarding information is described in Section 2.2 of + RFC 8572. Its purpose is to provide the device everything + it needs to bootstrap itself."; + reference + "RFC 8572: Secure Zero Touch Provisioning (SZTP)"; + container boot-image { + description + "Specifies criteria for the boot image the device MUST + be running, as well as information enabling the device + to install the required boot image."; + leaf os-name { + type string; + description + "The name of the operating system software the device + MUST be running in order to not require a software + image upgrade (e.g., VendorOS)."; + } + leaf os-version { + type string; + + description + "The version of the operating system software the + device MUST be running in order to not require a + software image upgrade (e.g., 17.3R2.1)."; + } + leaf-list download-uri { + type inet:uri; + ordered-by user; + description + "An ordered list of URIs to where the same boot image + file may be obtained. How the URI schemes (http, ftp, + etc.) a device supports are known is vendor specific. + If a secure scheme (e.g., https) is provided, a device + MAY establish an untrusted connection to the remote + server, by blindly accepting the server's end-entity + certificate, to obtain the boot image."; + } + list image-verification { + must '../download-uri' { + description + "Download URIs must be provided if an image is to + be verified."; + } + key "hash-algorithm"; + description + "A list of hash values that a device can use to verify + boot image files with."; + leaf hash-algorithm { + type identityref { + base hash-algorithm; + } + description + "Identifies the hash algorithm used."; + } + leaf hash-value { + type yang:hex-string; + mandatory true; + description + "The hex-encoded value of the specified hash + algorithm over the contents of the boot image + file."; + } + } + } + leaf configuration-handling { + type enumeration { + enum merge { + + description + "Merge configuration into the running datastore."; + } + enum replace { + description + "Replace the existing running datastore with the + passed configuration."; + } + } + must '../configuration'; + description + "This enumeration indicates how the server should process + the provided configuration."; + } + leaf pre-configuration-script { + type script; + description + "A script that, when present, is executed before the + configuration has been processed."; + } + leaf configuration { + type binary; + must '../configuration-handling'; + description + "Any configuration known to the device. The use of + the 'binary' type enables content (e.g., XML) to be + embedded into a JSON document. The exact encoding + of the content, as with the scripts, is vendor + specific."; + } + leaf post-configuration-script { + type script; + description + "A script that, when present, is executed after the + configuration has been processed."; + } + } + } + } + + typedef script { + type binary; + description + "A device-specific script that enables the execution of + commands to perform actions not possible thru configuration + alone. + + No attempt is made to standardize the contents, running + context, or programming language of the script, other than + that it can indicate if any warnings or errors occurred and + can emit output. The contents of the script are considered + specific to the vendor, product line, and/or model of the + device. + + If the script execution indicates that a warning occurred, + then the device MUST assume that the script had a soft error + that the script believes will not affect manageability. + + If the script execution indicates that an error occurred, + the device MUST assume the script had a hard error that the + script believes will affect manageability. In this case, + the script is required to gracefully exit, removing any + state that might hinder the device's ability to continue + the bootstrapping sequence (e.g., process onboarding + information obtained from another bootstrap server)."; + } +} diff --git a/models/ietf/RFC/ietf-te-packet-types.yang b/models/ietf/RFC/ietf-te-packet-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..8e7d4aafadcc34ec21dbf553d72852dc64624c4a --- /dev/null +++ b/models/ietf/RFC/ietf-te-packet-types.yang @@ -0,0 +1,475 @@ +module ietf-te-packet-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-packet-types"; + prefix te-packet-types; + + /* Import TE generic types */ + + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Rakesh Gandhi + <mailto:rgandhi@cisco.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Igor Bryskin + <mailto:i_bryskin@yahoo.com>"; + description + "This YANG module contains a collection of generally useful YANG + data type definitions specific to MPLS TE. The model fully + conforms to the Network Management Datastore Architecture + (NMDA). + + Copyright (c) 2020 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 Simplified 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 8776; see the + RFC itself for full legal notices."; + + revision 2020-06-10 { + description + "Latest revision of TE MPLS types."; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + /** + * Typedefs + */ + + typedef te-bandwidth-requested-type { + type enumeration { + enum specified { + description + "Bandwidth is explicitly specified."; + } + enum auto { + description + "Bandwidth is automatically computed."; + } + } + description + "Enumerated type for specifying whether bandwidth is + explicitly specified or automatically computed."; + } + + typedef te-class-type { + type uint8; + description + "Diffserv-TE Class-Type. Defines a set of Traffic Trunks + crossing a link that is governed by a specific set of + bandwidth constraints. Class-Type is used for the purposes + of link bandwidth allocation, constraint-based routing, and + admission control."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + typedef bc-type { + type uint8 { + range "0..7"; + } + description + "Diffserv-TE bandwidth constraints as defined in RFC 4124."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + typedef bandwidth-kbps { + type uint64; + units "Kbps"; + description + "Bandwidth values, expressed in kilobits per second."; + } + + typedef bandwidth-mbps { + type uint64; + units "Mbps"; + description + "Bandwidth values, expressed in megabits per second."; + } + + typedef bandwidth-gbps { + type uint64; + units "Gbps"; + description + "Bandwidth values, expressed in gigabits per second."; + } + + identity backup-protection-type { + description + "Base identity for the backup protection type."; + } + + identity backup-protection-link { + base backup-protection-type; + description + "Backup provides link protection only."; + } + + identity backup-protection-node-link { + base backup-protection-type; + description + "Backup offers node (preferred) or link protection."; + } + + identity bc-model-type { + description + "Base identity for the Diffserv-TE Bandwidth Constraints + Model type."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + identity bc-model-rdm { + base bc-model-type; + description + "Russian Dolls Bandwidth Constraints Model type."; + reference + "RFC 4127: Russian Dolls Bandwidth Constraints Model for + Diffserv-aware MPLS Traffic Engineering"; + } + + identity bc-model-mam { + base bc-model-type; + description + "Maximum Allocation Bandwidth Constraints Model type."; + reference + "RFC 4125: Maximum Allocation Bandwidth Constraints Model for + Diffserv-aware MPLS Traffic Engineering"; + } + + identity bc-model-mar { + base bc-model-type; + description + "Maximum Allocation with Reservation Bandwidth Constraints + Model type."; + reference + "RFC 4126: Max Allocation with Reservation Bandwidth + Constraints Model for Diffserv-aware MPLS Traffic Engineering + & Performance Comparisons"; + } + + grouping performance-metrics-attributes-packet { + description + "Contains PM attributes."; + uses te-types:performance-metrics-attributes { + augment "performance-metrics-one-way" { + leaf one-way-min-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-min-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way minimum delay or latency normality."; + } + leaf one-way-max-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way maximum delay or latency in microseconds."; + } + leaf one-way-max-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way maximum delay or latency normality."; + } + leaf one-way-delay-variation { + type uint32 { + range "0..16777215"; + } + description + "One-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability + Statement, Section 4.2"; + } + leaf one-way-delay-variation-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way delay variation normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + description + "One-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision + is 0.000003%, where the maximum is 50.331642%."; + reference + "RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 4.4"; + } + leaf one-way-packet-loss-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Packet loss normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + description + "PM one-way packet-specific augmentation for a generic PM + grouping."; + } + augment "performance-metrics-two-way" { + leaf two-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way minimum delay or latency in microseconds."; + } + leaf two-way-min-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way minimum delay or latency normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way maximum delay or latency in microseconds."; + } + leaf two-way-max-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way maximum delay or latency normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability + Statement, Section 4.2"; + } + leaf two-way-delay-variation-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way delay variation normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "Two-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision + is 0.000003%."; + } + leaf two-way-packet-loss-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way packet loss normality."; + } + description + "PM two-way packet-specific augmentation for a generic PM + grouping."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + } + } + + grouping one-way-performance-metrics-packet { + description + "One-way packet PM throttle grouping."; + leaf one-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way maximum delay or latency in microseconds."; + } + leaf one-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way delay variation in microseconds."; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "One-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision is + 0.000003%."; + } + } + + grouping two-way-performance-metrics-packet { + description + "Two-way packet PM throttle grouping."; + leaf two-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way minimum delay or latency in microseconds."; + } + leaf two-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way maximum delay or latency in microseconds."; + } + leaf two-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay variation in microseconds."; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "Two-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision is + 0.000003%."; + } + } + + grouping performance-metrics-throttle-container-packet { + description + "Packet PM threshold grouping."; + uses te-types:performance-metrics-throttle-container { + augment "throttle/threshold-out" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM threshold-out packet augmentation for a + generic grouping."; + } + augment "throttle/threshold-in" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM threshold-in packet augmentation for a + generic grouping."; + } + augment "throttle/threshold-accelerated-advertisement" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM accelerated advertisement packet augmentation for a + generic grouping."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-te-packet-types@2020-06-10.yang b/models/ietf/RFC/ietf-te-packet-types@2020-06-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..8e7d4aafadcc34ec21dbf553d72852dc64624c4a --- /dev/null +++ b/models/ietf/RFC/ietf-te-packet-types@2020-06-10.yang @@ -0,0 +1,475 @@ +module ietf-te-packet-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-packet-types"; + prefix te-packet-types; + + /* Import TE generic types */ + + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Rakesh Gandhi + <mailto:rgandhi@cisco.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Igor Bryskin + <mailto:i_bryskin@yahoo.com>"; + description + "This YANG module contains a collection of generally useful YANG + data type definitions specific to MPLS TE. The model fully + conforms to the Network Management Datastore Architecture + (NMDA). + + Copyright (c) 2020 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 Simplified 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 8776; see the + RFC itself for full legal notices."; + + revision 2020-06-10 { + description + "Latest revision of TE MPLS types."; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + /** + * Typedefs + */ + + typedef te-bandwidth-requested-type { + type enumeration { + enum specified { + description + "Bandwidth is explicitly specified."; + } + enum auto { + description + "Bandwidth is automatically computed."; + } + } + description + "Enumerated type for specifying whether bandwidth is + explicitly specified or automatically computed."; + } + + typedef te-class-type { + type uint8; + description + "Diffserv-TE Class-Type. Defines a set of Traffic Trunks + crossing a link that is governed by a specific set of + bandwidth constraints. Class-Type is used for the purposes + of link bandwidth allocation, constraint-based routing, and + admission control."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + typedef bc-type { + type uint8 { + range "0..7"; + } + description + "Diffserv-TE bandwidth constraints as defined in RFC 4124."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + typedef bandwidth-kbps { + type uint64; + units "Kbps"; + description + "Bandwidth values, expressed in kilobits per second."; + } + + typedef bandwidth-mbps { + type uint64; + units "Mbps"; + description + "Bandwidth values, expressed in megabits per second."; + } + + typedef bandwidth-gbps { + type uint64; + units "Gbps"; + description + "Bandwidth values, expressed in gigabits per second."; + } + + identity backup-protection-type { + description + "Base identity for the backup protection type."; + } + + identity backup-protection-link { + base backup-protection-type; + description + "Backup provides link protection only."; + } + + identity backup-protection-node-link { + base backup-protection-type; + description + "Backup offers node (preferred) or link protection."; + } + + identity bc-model-type { + description + "Base identity for the Diffserv-TE Bandwidth Constraints + Model type."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + identity bc-model-rdm { + base bc-model-type; + description + "Russian Dolls Bandwidth Constraints Model type."; + reference + "RFC 4127: Russian Dolls Bandwidth Constraints Model for + Diffserv-aware MPLS Traffic Engineering"; + } + + identity bc-model-mam { + base bc-model-type; + description + "Maximum Allocation Bandwidth Constraints Model type."; + reference + "RFC 4125: Maximum Allocation Bandwidth Constraints Model for + Diffserv-aware MPLS Traffic Engineering"; + } + + identity bc-model-mar { + base bc-model-type; + description + "Maximum Allocation with Reservation Bandwidth Constraints + Model type."; + reference + "RFC 4126: Max Allocation with Reservation Bandwidth + Constraints Model for Diffserv-aware MPLS Traffic Engineering + & Performance Comparisons"; + } + + grouping performance-metrics-attributes-packet { + description + "Contains PM attributes."; + uses te-types:performance-metrics-attributes { + augment "performance-metrics-one-way" { + leaf one-way-min-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-min-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way minimum delay or latency normality."; + } + leaf one-way-max-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way maximum delay or latency in microseconds."; + } + leaf one-way-max-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way maximum delay or latency normality."; + } + leaf one-way-delay-variation { + type uint32 { + range "0..16777215"; + } + description + "One-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability + Statement, Section 4.2"; + } + leaf one-way-delay-variation-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way delay variation normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + description + "One-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision + is 0.000003%, where the maximum is 50.331642%."; + reference + "RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 4.4"; + } + leaf one-way-packet-loss-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Packet loss normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + description + "PM one-way packet-specific augmentation for a generic PM + grouping."; + } + augment "performance-metrics-two-way" { + leaf two-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way minimum delay or latency in microseconds."; + } + leaf two-way-min-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way minimum delay or latency normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way maximum delay or latency in microseconds."; + } + leaf two-way-max-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way maximum delay or latency normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability + Statement, Section 4.2"; + } + leaf two-way-delay-variation-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way delay variation normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "Two-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision + is 0.000003%."; + } + leaf two-way-packet-loss-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way packet loss normality."; + } + description + "PM two-way packet-specific augmentation for a generic PM + grouping."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + } + } + + grouping one-way-performance-metrics-packet { + description + "One-way packet PM throttle grouping."; + leaf one-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way maximum delay or latency in microseconds."; + } + leaf one-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way delay variation in microseconds."; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "One-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision is + 0.000003%."; + } + } + + grouping two-way-performance-metrics-packet { + description + "Two-way packet PM throttle grouping."; + leaf two-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way minimum delay or latency in microseconds."; + } + leaf two-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way maximum delay or latency in microseconds."; + } + leaf two-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay variation in microseconds."; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "Two-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision is + 0.000003%."; + } + } + + grouping performance-metrics-throttle-container-packet { + description + "Packet PM threshold grouping."; + uses te-types:performance-metrics-throttle-container { + augment "throttle/threshold-out" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM threshold-out packet augmentation for a + generic grouping."; + } + augment "throttle/threshold-in" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM threshold-in packet augmentation for a + generic grouping."; + } + augment "throttle/threshold-accelerated-advertisement" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM accelerated advertisement packet augmentation for a + generic grouping."; + } + } + } +} diff --git a/models/ietf/RFC/ietf-te-topology-state.yang b/models/ietf/RFC/ietf-te-topology-state.yang new file mode 100644 index 0000000000000000000000000000000000000000..6bfb01e65e12b84de27e6b907494d5be952f8ce1 --- /dev/null +++ b/models/ietf/RFC/ietf-te-topology-state.yang @@ -0,0 +1,312 @@ +module ietf-te-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-topology-state"; + prefix tet-s; + + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + import ietf-te-topology { + prefix tet; + reference + "RFC 8795: YANG Data Model for Traffic Engineering (TE) + Topologies"; + } + import ietf-network-state { + prefix nw-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology-state { + prefix nt-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Igor Bryskin + <mailto:i_bryskin@yahoo.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Himanshu Shah + <mailto:hshah@ciena.com> + + Editor: Oscar Gonzalez de Dios + <mailto:oscar.gonzalezdedios@telefonica.com>"; + description + "This YANG module defines a TE topology state model. + + Copyright (c) 2020 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 Simplified 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 8795; see the + RFC itself for full legal notices."; + + revision 2020-08-06 { + description + "Initial revision."; + reference + "RFC 8795: YANG Data Model for Traffic Engineering (TE) + Topologies"; + } + + /* + * Groupings + */ + + grouping te-node-connectivity-matrix-attributes { + description + "Termination point references of a connectivity matrix entry."; + container from { + description + "Reference to a source Link Termination Point (LTP)."; + leaf tp-ref { + type leafref { + path "../../../../../../nt-s:termination-point/nt-s:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + container to { + description + "Reference to a destination LTP."; + leaf tp-ref { + type leafref { + path "../../../../../../nt-s:termination-point/nt-s:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + uses tet:connectivity-matrix-entry-path-attributes; + } + // te-node-connectivity-matrix-attributes + + grouping te-node-tunnel-termination-point-llc-list { + description + "Local Link Connectivity List (LLCL) of a Tunnel Termination + Point (TTP) on a TE node."; + list local-link-connectivity { + key "link-tp-ref"; + description + "The termination capabilities between the TTP and the LTP. + This capability information can be used to compute + the tunnel path. + The Interface Adjustment Capability Descriptors (IACDs) + (defined in RFC 6001) on each LTP can be derived from + this list."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + leaf link-tp-ref { + type leafref { + path "../../../../../nt-s:termination-point/nt-s:tp-id"; + } + description + "LTP."; + } + uses te-types:label-set-info; + uses tet:connectivity-matrix-entry-path-attributes; + } + // local-link-connectivity + } + // te-node-tunnel-termination-point-llc-list + + /* + * Data nodes + */ + + augment "/nw-s:networks/nw-s:network/nw-s:network-types" { + description + "Introduces a new network type for a TE topology."; + container te-topology { + presence "Indicates a TE topology"; + description + "Its presence identifies the TE topology type."; + } + } + + augment "/nw-s:networks" { + description + "Augmentation parameters for TE topologies."; + uses tet:te-topologies-augment; + } + + augment "/nw-s:networks/nw-s:network" { + when 'nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for a TE topology."; + uses tet:te-topology-augment; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node" { + when '../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the node level."; + leaf te-node-id { + type te-types:te-node-id; + description + "The identifier of a node in the TE topology. + A node is specific to a topology to which it belongs."; + } + container te { + must '../te-node-id' { + description + "'te-node-id' is mandatory."; + } + must 'count(../nw-s:supporting-node)<=1' { + description + "For a node in a TE topology, there cannot be more + than one supporting node. If multiple nodes are + abstracted, the 'underlay-topology' field is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses tet:te-node-augment; + } + } + + augment "/nw-s:networks/nw-s:network/nt-s:link" { + when '../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the link level."; + container te { + must 'count(../nt-s:supporting-link)<=1' { + description + "For a link in a TE topology, there cannot be more + than one supporting link. If one or more link paths are + abstracted, the underlay is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses tet:te-link-augment; + } + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/" + + "nt-s:termination-point" { + when '../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the termination point + level."; + uses tet:te-termination-point-augment; + } + + augment "/nw-s:networks/nw-s:network/nt-s:link/te/" + + "bundle-stack-level/bundle/bundled-links/bundled-link" { + when '../../../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for a TE bundled link."; + leaf src-tp-ref { + type leafref { + path "../../../../../nw-s:node[nw-s:node-id = " + + "current()/../../../../nt-s:source/" + + "nt-s:source-node]/" + + "nt-s:termination-point/nt-s:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same source node."; + } + leaf des-tp-ref { + type leafref { + path "../../../../../nw-s:node[nw-s:node-id = " + + "current()/../../../../nt-s:destination/" + + "nt-s:dest-node]/" + + "nt-s:termination-point/nt-s:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same destination node."; + } + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/te/" + + "information-source-entry/connectivity-matrices/" + + "connectivity-matrix" { + when '../../../../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/te/" + + "te-node-attributes/connectivity-matrices/" + + "connectivity-matrix" { + when '../../../../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/te/" + + "tunnel-termination-point/local-link-connectivities" { + when '../../../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for TE node TTP LLCs (Local Link + Connectivities)."; + uses te-node-tunnel-termination-point-llc-list; + } +} diff --git a/models/ietf/RFC/ietf-te-topology-state@2020-08-06.yang b/models/ietf/RFC/ietf-te-topology-state@2020-08-06.yang new file mode 100644 index 0000000000000000000000000000000000000000..6bfb01e65e12b84de27e6b907494d5be952f8ce1 --- /dev/null +++ b/models/ietf/RFC/ietf-te-topology-state@2020-08-06.yang @@ -0,0 +1,312 @@ +module ietf-te-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-topology-state"; + prefix tet-s; + + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + import ietf-te-topology { + prefix tet; + reference + "RFC 8795: YANG Data Model for Traffic Engineering (TE) + Topologies"; + } + import ietf-network-state { + prefix nw-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology-state { + prefix nt-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Igor Bryskin + <mailto:i_bryskin@yahoo.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Himanshu Shah + <mailto:hshah@ciena.com> + + Editor: Oscar Gonzalez de Dios + <mailto:oscar.gonzalezdedios@telefonica.com>"; + description + "This YANG module defines a TE topology state model. + + Copyright (c) 2020 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 Simplified 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 8795; see the + RFC itself for full legal notices."; + + revision 2020-08-06 { + description + "Initial revision."; + reference + "RFC 8795: YANG Data Model for Traffic Engineering (TE) + Topologies"; + } + + /* + * Groupings + */ + + grouping te-node-connectivity-matrix-attributes { + description + "Termination point references of a connectivity matrix entry."; + container from { + description + "Reference to a source Link Termination Point (LTP)."; + leaf tp-ref { + type leafref { + path "../../../../../../nt-s:termination-point/nt-s:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + container to { + description + "Reference to a destination LTP."; + leaf tp-ref { + type leafref { + path "../../../../../../nt-s:termination-point/nt-s:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + uses tet:connectivity-matrix-entry-path-attributes; + } + // te-node-connectivity-matrix-attributes + + grouping te-node-tunnel-termination-point-llc-list { + description + "Local Link Connectivity List (LLCL) of a Tunnel Termination + Point (TTP) on a TE node."; + list local-link-connectivity { + key "link-tp-ref"; + description + "The termination capabilities between the TTP and the LTP. + This capability information can be used to compute + the tunnel path. + The Interface Adjustment Capability Descriptors (IACDs) + (defined in RFC 6001) on each LTP can be derived from + this list."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + leaf link-tp-ref { + type leafref { + path "../../../../../nt-s:termination-point/nt-s:tp-id"; + } + description + "LTP."; + } + uses te-types:label-set-info; + uses tet:connectivity-matrix-entry-path-attributes; + } + // local-link-connectivity + } + // te-node-tunnel-termination-point-llc-list + + /* + * Data nodes + */ + + augment "/nw-s:networks/nw-s:network/nw-s:network-types" { + description + "Introduces a new network type for a TE topology."; + container te-topology { + presence "Indicates a TE topology"; + description + "Its presence identifies the TE topology type."; + } + } + + augment "/nw-s:networks" { + description + "Augmentation parameters for TE topologies."; + uses tet:te-topologies-augment; + } + + augment "/nw-s:networks/nw-s:network" { + when 'nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for a TE topology."; + uses tet:te-topology-augment; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node" { + when '../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the node level."; + leaf te-node-id { + type te-types:te-node-id; + description + "The identifier of a node in the TE topology. + A node is specific to a topology to which it belongs."; + } + container te { + must '../te-node-id' { + description + "'te-node-id' is mandatory."; + } + must 'count(../nw-s:supporting-node)<=1' { + description + "For a node in a TE topology, there cannot be more + than one supporting node. If multiple nodes are + abstracted, the 'underlay-topology' field is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses tet:te-node-augment; + } + } + + augment "/nw-s:networks/nw-s:network/nt-s:link" { + when '../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the link level."; + container te { + must 'count(../nt-s:supporting-link)<=1' { + description + "For a link in a TE topology, there cannot be more + than one supporting link. If one or more link paths are + abstracted, the underlay is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses tet:te-link-augment; + } + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/" + + "nt-s:termination-point" { + when '../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the termination point + level."; + uses tet:te-termination-point-augment; + } + + augment "/nw-s:networks/nw-s:network/nt-s:link/te/" + + "bundle-stack-level/bundle/bundled-links/bundled-link" { + when '../../../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for a TE bundled link."; + leaf src-tp-ref { + type leafref { + path "../../../../../nw-s:node[nw-s:node-id = " + + "current()/../../../../nt-s:source/" + + "nt-s:source-node]/" + + "nt-s:termination-point/nt-s:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same source node."; + } + leaf des-tp-ref { + type leafref { + path "../../../../../nw-s:node[nw-s:node-id = " + + "current()/../../../../nt-s:destination/" + + "nt-s:dest-node]/" + + "nt-s:termination-point/nt-s:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same destination node."; + } + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/te/" + + "information-source-entry/connectivity-matrices/" + + "connectivity-matrix" { + when '../../../../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/te/" + + "te-node-attributes/connectivity-matrices/" + + "connectivity-matrix" { + when '../../../../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw-s:networks/nw-s:network/nw-s:node/te/" + + "tunnel-termination-point/local-link-connectivities" { + when '../../../../nw-s:network-types/tet-s:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for TE node TTP LLCs (Local Link + Connectivities)."; + uses te-node-tunnel-termination-point-llc-list; + } +} diff --git a/models/ietf/RFC/ietf-te-topology.yang b/models/ietf/RFC/ietf-te-topology.yang new file mode 100644 index 0000000000000000000000000000000000000000..6d76a77b21ba5609094a670290e5bd81562c3022 --- /dev/null +++ b/models/ietf/RFC/ietf-te-topology.yang @@ -0,0 +1,1952 @@ +module ietf-te-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-topology"; + prefix tet; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Igor Bryskin + <mailto:i_bryskin@yahoo.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Himanshu Shah + <mailto:hshah@ciena.com> + + Editor: Oscar Gonzalez de Dios + <mailto:oscar.gonzalezdedios@telefonica.com>"; + description + "This YANG module defines a TE topology model for representing, + retrieving, and manipulating technology-agnostic TE topologies. + + Copyright (c) 2020 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 Simplified 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 8795; see the + RFC itself for full legal notices."; + + revision 2020-08-06 { + description + "Initial revision."; + reference + "RFC 8795: YANG Data Model for Traffic Engineering (TE) + Topologies"; + } + + /* + * Features + */ + + feature nsrlg { + description + "This feature indicates that the system supports NSRLGs + (Non-Shared Risk Link Groups)."; + } + + feature te-topology-hierarchy { + description + "This feature indicates that the system allows an underlay + and/or overlay TE topology hierarchy."; + } + + feature template { + description + "This feature indicates that the system supports + template configuration."; + } + + /* + * Typedefs + */ + + typedef geographic-coordinate-degree { + type decimal64 { + fraction-digits 8; + } + description + "Decimal degree (DD) used to express latitude and longitude + geographic coordinates."; + } + // geographic-coordinate-degree + + typedef te-info-source { + type enumeration { + enum unknown { + description + "The source is unknown."; + } + enum locally-configured { + description + "Configured entity."; + } + enum ospfv2 { + description + "OSPFv2."; + } + enum ospfv3 { + description + "OSPFv3."; + } + enum isis { + description + "IS-IS."; + } + enum bgp-ls { + description + "BGP-LS."; + reference + "RFC 7752: North-Bound Distribution of Link-State and + Traffic Engineering (TE) Information Using BGP"; + } + enum system-processed { + description + "System-processed entity."; + } + enum other { + description + "Other source."; + } + } + description + "Describes the type of source that has provided the + related information, and the source's credibility."; + } + // te-info-source + + /* + * Groupings + */ + + grouping connectivity-matrix-entry-path-attributes { + description + "Attributes of a connectivity matrix entry."; + leaf is-allowed { + type boolean; + description + "'true' - switching is allowed; + 'false' - switching is disallowed."; + } + container underlay { + if-feature "te-topology-hierarchy"; + description + "Attributes of the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + uses te-link-underlay-attributes; + } + uses te-types:generic-path-constraints; + uses te-types:generic-path-optimization; + uses te-types:generic-path-properties; + } + // connectivity-matrix-entry-path-attributes + + grouping geolocation-container { + description + "Contains a GPS location."; + container geolocation { + config false; + description + "Contains a GPS location."; + leaf altitude { + type int64; + units "millimeters"; + description + "Distance above sea level."; + } + leaf latitude { + type geographic-coordinate-degree { + range "-90..90"; + } + description + "Relative position north or south on the Earth's surface."; + } + leaf longitude { + type geographic-coordinate-degree { + range "-180..180"; + } + description + "Angular distance east or west on the Earth's surface."; + } + } + // geolocation + } + // geolocation-container + + grouping information-source-state-attributes { + description + "The attributes identifying the source that has provided the + related information, and the source's credibility."; + leaf credibility-preference { + type uint16; + description + "The preference value for calculating the Traffic + Engineering database credibility value used for + tie-break selection between different information-source + values. A higher value is preferable."; + } + leaf logical-network-element { + type string; + description + "When applicable, this is the name of a logical network + element from which the information is learned."; + } + leaf network-instance { + type string; + description + "When applicable, this is the name of a network instance + from which the information is learned."; + } + } + // information-source-state-attributes + + grouping information-source-per-link-attributes { + description + "Per-node container of the attributes identifying the source + that has provided the related information, and the source's + credibility."; + leaf information-source { + type te-info-source; + config false; + description + "Indicates the type of information source."; + } + leaf information-source-instance { + type string; + config false; + description + "The name indicating the instance of the information + source."; + } + container information-source-state { + config false; + description + "Contains state attributes related to the information + source."; + uses information-source-state-attributes; + container topology { + description + "When the information is processed by the system, + the attributes in this container indicate which topology + is used to generate the result information."; + uses nt:link-ref; + } + } + } + // information-source-per-link-attributes + + grouping information-source-per-node-attributes { + description + "Per-node container of the attributes identifying the source + that has provided the related information, and the source's + credibility."; + leaf information-source { + type te-info-source; + config false; + description + "Indicates the type of information source."; + } + leaf information-source-instance { + type string; + config false; + description + "The name indicating the instance of the information + source."; + } + container information-source-state { + config false; + description + "Contains state attributes related to the information + source."; + uses information-source-state-attributes; + container topology { + description + "When the information is processed by the system, + the attributes in this container indicate which topology + is used to generate the result information."; + uses nw:node-ref; + } + } + } + // information-source-per-node-attributes + + grouping interface-switching-capability-list { + description + "List of Interface Switching Capability Descriptors (ISCDs)."; + list interface-switching-capability { + key "switching-capability encoding"; + description + "List of ISCDs for this link."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description + RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for this interface."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by this interface."; + } + uses te-link-iscd-attributes; + } + // interface-switching-capability + } + // interface-switching-capability-list + + grouping statistics-per-link { + description + "Statistics attributes per TE link."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + /* Administrative attributes */ + leaf disables { + type yang:counter32; + description + "Number of times that a link was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a link was enabled."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a link was taken out of maintenance."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a link was put in maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a link was modified."; + } + /* Operational attributes */ + leaf downs { + type yang:counter32; + description + "Number of times that a link was set to an operational state + of 'down'."; + } + leaf ups { + type yang:counter32; + description + "Number of times that a link was set to an operational state + of 'up'."; + } + /* Recovery attributes */ + leaf fault-clears { + type yang:counter32; + description + "Number of times that a link experienced a fault-clear + event."; + } + leaf fault-detects { + type yang:counter32; + description + "Number of times that a link experienced fault detection."; + } + leaf protection-switches { + type yang:counter32; + description + "Number of times that a link experienced protection + switchover."; + } + leaf protection-reverts { + type yang:counter32; + description + "Number of times that a link experienced protection + reversion."; + } + leaf restoration-failures { + type yang:counter32; + description + "Number of times that a link experienced restoration + failure."; + } + leaf restoration-starts { + type yang:counter32; + description + "Number of times that a link experienced restoration + start."; + } + leaf restoration-successes { + type yang:counter32; + description + "Number of times that a link experienced restoration + success."; + } + leaf restoration-reversion-failures { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion failure."; + } + leaf restoration-reversion-starts { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion start."; + } + leaf restoration-reversion-successes { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion success."; + } + } + // statistics-per-link + + grouping statistics-per-node { + description + "Statistics attributes per TE node."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + container node { + description + "Contains statistics attributes at the TE node level."; + leaf disables { + type yang:counter32; + description + "Number of times that a node was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a node was enabled."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a node was put in maintenance."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a node was taken out of + maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a node was modified."; + } + } + // node + container connectivity-matrix-entry { + description + "Contains statistics attributes at the level of a + connectivity matrix entry."; + leaf creates { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + created."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'create' operation"; + } + leaf deletes { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + deleted."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'delete' operation"; + } + leaf disables { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + enabled."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + modified."; + } + } + // connectivity-matrix-entry + } + // statistics-per-node + + grouping statistics-per-ttp { + description + "Statistics attributes per TE TTP (Tunnel Termination Point)."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + container tunnel-termination-point { + description + "Contains statistics attributes at the TE TTP level."; + /* Administrative attributes */ + leaf disables { + type yang:counter32; + description + "Number of times that a TTP was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a TTP was enabled."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a TTP was taken out of maintenance."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a TTP was put in maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a TTP was modified."; + } + /* Operational attributes */ + leaf downs { + type yang:counter32; + description + "Number of times that a TTP was set to an operational state + of 'down'."; + } + leaf ups { + type yang:counter32; + description + "Number of times that a TTP was set to an operational state + of 'up'."; + } + leaf in-service-clears { + type yang:counter32; + description + "Number of times that a TTP was taken out of service + (TE tunnel was released)."; + } + leaf in-service-sets { + type yang:counter32; + description + "Number of times that a TTP was put in service by a TE + tunnel (TE tunnel was set up)."; + } + } + // tunnel-termination-point + container local-link-connectivity { + description + "Contains statistics attributes at the TE LLCL (Local Link + Connectivity List) level."; + leaf creates { + type yang:counter32; + description + "Number of times that an LLCL entry was created."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'create' operation"; + } + leaf deletes { + type yang:counter32; + description + "Number of times that an LLCL entry was deleted."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'delete' operation"; + } + leaf disables { + type yang:counter32; + description + "Number of times that an LLCL entry was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that an LLCL entry was enabled."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that an LLCL entry was modified."; + } + } + // local-link-connectivity + } + // statistics-per-ttp + + grouping te-link-augment { + description + "Augmentation for a TE link."; + uses te-link-config; + uses te-link-state-derived; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-link; + } + } + // te-link-augment + + grouping te-link-config { + description + "TE link configuration grouping."; + choice bundle-stack-level { + description + "The TE link can be partitioned into bundled links or + component links."; + case bundle { + container bundled-links { + description + "A set of bundled links."; + reference + "RFC 4201: Link Bundling in MPLS Traffic + Engineering (TE)"; + list bundled-link { + key "sequence"; + description + "Specifies a bundled interface that is + further partitioned."; + leaf sequence { + type uint32; + description + "Identifies the sequence in the bundle."; + } + } + } + } + case component { + container component-links { + description + "A set of component links."; + list component-link { + key "sequence"; + description + "Specifies a component interface that is + sufficient to unambiguously identify the + appropriate resources."; + leaf sequence { + type uint32; + description + "Identifies the sequence in the bundle."; + } + leaf src-interface-ref { + type string; + description + "Reference to a component link interface on the + source node."; + } + leaf des-interface-ref { + type string; + description + "Reference to a component link interface on the + destination node."; + } + } + } + } + } + // bundle-stack-level + leaf-list te-link-template { + if-feature "template"; + type leafref { + path "../../../../te/templates/link-template/name"; + } + description + "The reference to a TE link template."; + } + uses te-link-config-attributes; + } + // te-link-config + + grouping te-link-config-attributes { + description + "Link configuration attributes in a TE topology."; + container te-link-attributes { + description + "Link attributes in a TE topology."; + leaf access-type { + type te-types:te-link-access-type; + description + "Link access type, which can be point-to-point or + multi-access."; + } + container external-domain { + description + "For an inter-domain link, specifies the attributes of + the remote end of the link, to facilitate the signaling at + the local end."; + uses nw:network-ref; + leaf remote-te-node-id { + type te-types:te-node-id; + description + "Remote TE node identifier, used together with + 'remote-te-link-tp-id' to identify the remote Link + Termination Point (LTP) in a different domain."; + } + leaf remote-te-link-tp-id { + type te-types:te-tp-id; + description + "Remote TE LTP identifier, used together with + 'remote-te-node-id' to identify the remote LTP in a + different domain."; + } + } + leaf is-abstract { + type empty; + description + "Present if the link is abstract."; + } + leaf name { + type string; + description + "Link name."; + } + container underlay { + if-feature "te-topology-hierarchy"; + description + "Attributes of the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + uses te-link-underlay-attributes; + } + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-link-info-attributes; + } + // te-link-attributes + } + // te-link-config-attributes + + grouping te-link-info-attributes { + description + "Advertised TE information attributes."; + leaf link-index { + type uint64; + description + "The link identifier. If OSPF is used, this object + represents an ospfLsdbID. If IS-IS is used, this object + represents an isisLSPID. If a locally configured link is + used, this object represents a unique value, which is + locally defined in a router."; + } + leaf administrative-group { + type te-types:admin-groups; + description + "Administrative group or color of the link. + This attribute covers both administrative groups (defined + in RFCs 3630 and 5305) and Extended Administrative Groups + (defined in RFC 7308)."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering + RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + uses interface-switching-capability-list; + uses te-types:label-set-info; + leaf link-protection-type { + type identityref { + base te-types:link-protection-type; + } + description + "Link Protection Type desired for this link."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + container max-link-bandwidth { + uses te-types:te-bandwidth; + description + "Maximum bandwidth that can be seen on this link in this + direction. Units are in bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + container max-resv-link-bandwidth { + uses te-types:te-bandwidth; + description + "Maximum amount of bandwidth that can be reserved in this + direction in this link. Units are in bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + list unreserved-bandwidth { + key "priority"; + max-elements 8; + description + "Unreserved bandwidth for priority levels 0-7. Units are in + bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + leaf priority { + type uint8 { + range "0..7"; + } + description + "Priority."; + } + uses te-types:te-bandwidth; + } + leaf te-default-metric { + type uint32; + description + "Traffic Engineering metric."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + leaf te-delay-metric { + type uint32; + description + "Traffic Engineering delay metric."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + leaf te-igp-metric { + type uint32; + description + "IGP metric used for Traffic Engineering."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + container te-srlgs { + description + "Contains a list of SRLGs."; + leaf-list value { + type te-types:srlg; + description + "SRLG value."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + } + container te-nsrlgs { + if-feature "nsrlg"; + description + "Contains a list of NSRLGs (Non-Shared Risk Link Groups). + When an abstract TE link is configured, this list specifies + the request that underlay TE paths need to be mutually + disjoint with other TE links in the same groups."; + leaf-list id { + type uint32; + description + "NSRLG ID, uniquely configured within a topology."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + } + } + // te-link-info-attributes + + grouping te-link-iscd-attributes { + description + "TE link ISCD attributes."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS), Section 1.4"; + list max-lsp-bandwidth { + key "priority"; + max-elements 8; + description + "Maximum Label Switched Path (LSP) bandwidth at + priorities 0-7."; + leaf priority { + type uint8 { + range "0..7"; + } + description + "Priority."; + } + uses te-types:te-bandwidth; + } + } + // te-link-iscd-attributes + + grouping te-link-state-derived { + description + "Link state attributes in a TE topology."; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the link."; + } + leaf is-transitional { + type empty; + config false; + description + "Present if the link is transitional; used as an + alternative approach in lieu of 'inter-layer-lock-id' + for path computation in a TE topology covering multiple + layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + uses information-source-per-link-attributes; + list information-source-entry { + key "information-source information-source-instance"; + config false; + description + "A list of information sources learned, including the source + that is used."; + uses information-source-per-link-attributes; + uses te-link-info-attributes; + } + container recovery { + config false; + description + "Status of the recovery process."; + leaf restoration-status { + type te-types:te-recovery-status; + description + "Restoration status."; + } + leaf protection-status { + type te-types:te-recovery-status; + description + "Protection status."; + } + } + container underlay { + if-feature "te-topology-hierarchy"; + config false; + description + "State attributes for the TE link underlay."; + leaf dynamic { + type boolean; + description + "'true' if the underlay is dynamically created."; + } + leaf committed { + type boolean; + description + "'true' if the underlay is committed."; + } + } + } + // te-link-state-derived + + grouping te-link-underlay-attributes { + description + "Attributes for the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + leaf enabled { + type boolean; + description + "'true' if the underlay is enabled. + 'false' if the underlay is disabled."; + } + container primary-path { + description + "The service path on the underlay topology that + supports this link."; + uses nw:network-ref; + list path-element { + key "path-element-id"; + description + "A list of path elements describing the service path."; + leaf path-element-id { + type uint32; + description + "To identify the element in a path."; + } + uses te-path-element; + } + } + // primary-path + list backup-path { + key "index"; + description + "A list of backup service paths on the underlay topology that + protect the underlay primary path. If the primary path is + not protected, the list contains zero elements. If the + primary path is protected, the list contains one or more + elements."; + leaf index { + type uint32; + description + "A sequence number to identify a backup path."; + } + uses nw:network-ref; + list path-element { + key "path-element-id"; + description + "A list of path elements describing the backup service + path."; + leaf path-element-id { + type uint32; + description + "To identify the element in a path."; + } + uses te-path-element; + } + } + // backup-path + leaf protection-type { + type identityref { + base te-types:lsp-protection-type; + } + description + "Underlay protection type desired for this link."; + } + container tunnel-termination-points { + description + "Underlay TTPs desired for this link."; + leaf source { + type binary; + description + "Source TTP identifier."; + } + leaf destination { + type binary; + description + "Destination TTP identifier."; + } + } + container tunnels { + description + "Underlay TE tunnels supporting this TE link."; + leaf sharing { + type boolean; + default "true"; + description + "'true' if the underlay tunnel can be shared with other + TE links; + 'false' if the underlay tunnel is dedicated to this + TE link. + This leaf is the default option for all TE tunnels + and may be overridden by the per-TE-tunnel value."; + } + list tunnel { + key "tunnel-name"; + description + "Zero, one, or more underlay TE tunnels that support this + TE link."; + leaf tunnel-name { + type string; + description + "A tunnel name uniquely identifies an underlay TE tunnel, + used together with the 'source-node' value for this + link."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf sharing { + type boolean; + description + "'true' if the underlay tunnel can be shared with other + TE links; + 'false' if the underlay tunnel is dedicated to this + TE link."; + } + } + // tunnel + } + // tunnels + } + // te-link-underlay-attributes + + grouping te-node-augment { + description + "Augmentation for a TE node."; + uses te-node-config; + uses te-node-state-derived; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-node; + } + list tunnel-termination-point { + key "tunnel-tp-id"; + description + "A termination point can terminate a tunnel."; + leaf tunnel-tp-id { + type binary; + description + "TTP identifier."; + } + uses te-node-tunnel-termination-point-config; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the TTP."; + } + uses geolocation-container; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-ttp; + } + // Relationship to other TTPs + list supporting-tunnel-termination-point { + key "node-ref tunnel-tp-ref"; + description + "Identifies the TTPs on which this TTP depends."; + leaf node-ref { + type inet:uri; + description + "This leaf identifies the node in which the supporting + TTP is present. + This node is either the supporting node or a node in + an underlay topology."; + } + leaf tunnel-tp-ref { + type binary; + description + "Reference to a TTP that is in either the supporting node + or a node in an underlay topology."; + } + } + // supporting-tunnel-termination-point + } + // tunnel-termination-point + } + // te-node-augment + + grouping te-node-config { + description + "TE node configuration grouping."; + leaf-list te-node-template { + if-feature "template"; + type leafref { + path "../../../../te/templates/node-template/name"; + } + description + "The reference to a TE node template."; + } + uses te-node-config-attributes; + } + // te-node-config + + grouping te-node-config-attributes { + description + "Configuration node attributes in a TE topology."; + container te-node-attributes { + description + "Contains node attributes in a TE topology."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-node-connectivity-matrices; + uses te-node-info-attributes; + } + } + // te-node-config-attributes + + grouping te-node-config-attributes-template { + description + "Configuration node attributes for a template in a TE + topology."; + container te-node-attributes { + description + "Contains node attributes in a TE topology."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-node-info-attributes; + } + } + // te-node-config-attributes-template + + grouping te-node-connectivity-matrices { + description + "Connectivity matrix on a TE node."; + container connectivity-matrices { + description + "Contains a connectivity matrix on a TE node."; + leaf number-of-entries { + type uint16; + description + "The number of connectivity matrix entries. + If this number is specified in the configuration request, + the number is the requested number of entries, which may + not all be listed in the list; + if this number is reported in the state data, + the number is the current number of operational entries."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + list connectivity-matrix { + key "id"; + description + "Represents a node's switching limitations, i.e., + limitations in the interconnecting network TE links + across the node."; + reference + "RFC 7579: General Network Element Constraint Encoding + for GMPLS-Controlled Networks"; + leaf id { + type uint32; + description + "Identifies the connectivity matrix entry."; + } + } + // connectivity-matrix + } + // connectivity-matrices + } + // te-node-connectivity-matrices + + grouping te-node-connectivity-matrix-attributes { + description + "Termination point references of a connectivity matrix entry."; + container from { + description + "Reference to a source LTP."; + leaf tp-ref { + type leafref { + path "../../../../../../nt:termination-point/nt:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + container to { + description + "Reference to a destination LTP."; + leaf tp-ref { + type leafref { + path "../../../../../../nt:termination-point/nt:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + uses connectivity-matrix-entry-path-attributes; + } + // te-node-connectivity-matrix-attributes + + grouping te-node-info-attributes { + description + "Advertised TE information attributes."; + leaf domain-id { + type uint32; + description + "Identifies the domain to which this node belongs. + This attribute is used to support inter-domain links."; + reference + "RFC 5152: A Per-Domain Path Computation Method for + Establishing Inter-Domain Traffic Engineering (TE) + Label Switched Paths (LSPs) + RFC 5316: ISIS Extensions in Support of Inter-Autonomous + System (AS) MPLS and GMPLS Traffic Engineering + RFC 5392: OSPF Extensions in Support of Inter-Autonomous + System (AS) MPLS and GMPLS Traffic Engineering"; + } + leaf is-abstract { + type empty; + description + "Present if the node is abstract; not present if the node + is actual."; + } + leaf name { + type string; + description + "Node name."; + } + leaf-list signaling-address { + type inet:ip-address; + description + "The node's signaling address."; + } + container underlay-topology { + if-feature "te-topology-hierarchy"; + description + "When an abstract node encapsulates a topology, the + attributes in this container point to said topology."; + uses nw:network-ref; + } + } + // te-node-info-attributes + + grouping te-node-state-derived { + description + "Node state attributes in a TE topology."; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the node."; + } + uses geolocation-container; + leaf is-multi-access-dr { + type empty; + config false; + description + "The presence of this attribute indicates that this TE node + is a pseudonode elected as a designated router."; + reference + "RFC 1195: Use of OSI IS-IS for Routing in TCP/IP and Dual + Environments + RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + uses information-source-per-node-attributes; + list information-source-entry { + key "information-source information-source-instance"; + config false; + description + "A list of information sources learned, including the source + that is used."; + uses information-source-per-node-attributes; + uses te-node-connectivity-matrices; + uses te-node-info-attributes; + } + } + // te-node-state-derived + + grouping te-node-tunnel-termination-point-config { + description + "Termination capability of a TTP on a TE node."; + uses te-node-tunnel-termination-point-config-attributes; + container local-link-connectivities { + description + "Contains an LLCL for a TTP on a TE node."; + leaf number-of-entries { + type uint16; + description + "The number of LLCL entries. + If this number is specified in the configuration request, + the number is the requested number of entries, which may + not all be listed in the list; + if this number is reported in the state data, + the number is the current number of operational entries."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + } + } + // te-node-tunnel-termination-point-config + + grouping te-node-tunnel-termination-point-config-attributes { + description + "Configuration attributes of a TTP on a TE node."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the TTP."; + } + leaf name { + type string; + description + "A descriptive name for the TTP."; + } + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for this interface."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by this interface."; + } + leaf-list inter-layer-lock-id { + type uint32; + description + "Inter-layer lock ID, used for path computation in a TE + topology covering multiple layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + leaf protection-type { + type identityref { + base te-types:lsp-protection-type; + } + description + "The protection type that this TTP is capable of."; + } + container client-layer-adaptation { + description + "Contains capability information to support a client-layer + adaptation in a multi-layer topology."; + list switching-capability { + key "switching-capability encoding"; + description + "List of supported switching capabilities."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for the client-layer adaptation."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by the client-layer adaptation."; + } + uses te-types:te-bandwidth; + } + } + } + // te-node-tunnel-termination-point-config-attributes + + grouping te-node-tunnel-termination-point-llc-list { + description + "LLCL of a TTP on a TE node."; + list local-link-connectivity { + key "link-tp-ref"; + description + "The termination capabilities between the TTP and the LTP. + This capability information can be used to compute + the tunnel path. + The Interface Adjustment Capability Descriptors (IACDs) + (defined in RFC 6001) on each LTP can be derived from + this list."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + leaf link-tp-ref { + type leafref { + path "../../../../../nt:termination-point/nt:tp-id"; + } + description + "LTP."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + } + } + // te-node-tunnel-termination-point-llc-list + + grouping te-path-element { + description + "A group of attributes defining an element in a TE path, + such as a TE node, TE link, TE atomic resource, or label."; + uses te-types:explicit-route-hop; + } + // te-path-element + + grouping te-termination-point-augment { + description + "Augmentation for a TE termination point."; + leaf te-tp-id { + type te-types:te-tp-id; + description + "An identifier that uniquely identifies a TE termination + point."; + } + container te { + must '../te-tp-id'; + presence "TE support"; + description + "Indicates TE support."; + uses te-termination-point-config; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the LTP."; + } + uses geolocation-container; + } + } + // te-termination-point-augment + + grouping te-termination-point-config { + description + "TE termination point configuration grouping."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the LTP."; + } + leaf name { + type string; + description + "A descriptive name for the LTP."; + } + uses interface-switching-capability-list; + leaf inter-domain-plug-id { + type binary; + description + "A network-wide unique number that identifies on the + network a connection that supports a given inter-domain + TE link. This is a more flexible alternative to specifying + 'remote-te-node-id' and 'remote-te-link-tp-id' on a TE link + when the provider either does not know 'remote-te-node-id' + and 'remote-te-link-tp-id' or needs to give the client the + flexibility to mix and match multiple topologies."; + } + leaf-list inter-layer-lock-id { + type uint32; + description + "Inter-layer lock ID, used for path computation in a TE + topology covering multiple layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + } + // te-termination-point-config + + grouping te-topologies-augment { + description + "Augmentation for TE topologies."; + container te { + presence "TE support"; + description + "Indicates TE support."; + container templates { + description + "Configuration parameters for templates used for a TE + topology."; + list node-template { + if-feature "template"; + key "name"; + leaf name { + type te-types:te-template-name; + description + "The name to identify a TE node template."; + } + description + "The list of TE node templates used to define sharable + and reusable TE node attributes."; + uses template-attributes; + uses te-node-config-attributes-template; + } + // node-template + list link-template { + if-feature "template"; + key "name"; + leaf name { + type te-types:te-template-name; + description + "The name to identify a TE link template."; + } + description + "The list of TE link templates used to define sharable + and reusable TE link attributes."; + uses template-attributes; + uses te-link-config-attributes; + } + // link-template + } + // templates + } + // te + } + // te-topologies-augment + + grouping te-topology-augment { + description + "Augmentation for a TE topology."; + uses te-types:te-topology-identifier; + container te { + must '../te-topology-identifier/provider-id' + + ' and ../te-topology-identifier/client-id' + + ' and ../te-topology-identifier/topology-id'; + presence "TE support"; + description + "Indicates TE support."; + uses te-topology-config; + uses geolocation-container; + } + } + // te-topology-augment + + grouping te-topology-config { + description + "TE topology configuration grouping."; + leaf name { + type string; + description + "Name of the TE topology. This attribute is optional and can + be specified by the operator to describe the TE topology, + which can be useful when 'network-id' (RFC 8345) is not + descriptive and not modifiable because of being generated + by the system."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + leaf preference { + type uint8 { + range "1..255"; + } + description + "Specifies a preference for this topology. A lower number + indicates a higher preference."; + } + leaf optimization-criterion { + type identityref { + base te-types:objective-function-type; + } + description + "Optimization criterion applied to this topology."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + list nsrlg { + if-feature "nsrlg"; + key "id"; + description + "List of NSRLGs (Non-Shared Risk Link Groups)."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + leaf id { + type uint32; + description + "Identifies the NSRLG entry."; + } + leaf disjointness { + type te-types:te-path-disjointness; + description + "The type of resource disjointness."; + } + } + // nsrlg + } + // te-topology-config + + grouping template-attributes { + description + "Common attributes for all templates."; + leaf priority { + type uint16; + description + "The preference value for resolving conflicts between + different templates. When two or more templates specify + values for one configuration attribute, the value from the + template with the highest priority is used. + A lower number indicates a higher priority. The highest + priority is 0."; + } + leaf reference-change-policy { + type enumeration { + enum no-action { + description + "When an attribute changes in this template, the + configuration node referring to this template does + not take any action."; + } + enum not-allowed { + description + "When any configuration object has a reference to this + template, changing this template is not allowed."; + } + enum cascade { + description + "When an attribute changes in this template, the + configuration object referring to this template applies + the new attribute value to the corresponding + configuration."; + } + } + description + "This attribute specifies the action taken for a + configuration node that has a reference to this template."; + } + } + // template-attributes + + /* + * Data nodes + */ + + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduces a new network type for a TE topology."; + container te-topology { + presence "Indicates a TE topology"; + description + "Its presence identifies the TE topology type."; + } + } + + augment "/nw:networks" { + description + "Augmentation parameters for TE topologies."; + uses te-topologies-augment; + } + + augment "/nw:networks/nw:network" { + when 'nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for a TE topology."; + uses te-topology-augment; + } + + augment "/nw:networks/nw:network/nw:node" { + when '../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the node level."; + leaf te-node-id { + type te-types:te-node-id; + description + "The identifier of a node in the TE topology. + A node is specific to a topology to which it belongs."; + } + container te { + must '../te-node-id' { + description + "'te-node-id' is mandatory."; + } + must 'count(../nw:supporting-node)<=1' { + description + "For a node in a TE topology, there cannot be more + than one supporting node. If multiple nodes are + abstracted, the 'underlay-topology' field is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses te-node-augment; + } + } + + augment "/nw:networks/nw:network/nt:link" { + when '../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the link level."; + container te { + must 'count(../nt:supporting-link)<=1' { + description + "For a link in a TE topology, there cannot be more + than one supporting link. If one or more link paths are + abstracted, the underlay is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses te-link-augment; + } + } + + augment "/nw:networks/nw:network/nw:node/" + + "nt:termination-point" { + when '../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the termination point + level."; + uses te-termination-point-augment; + } + + augment "/nw:networks/nw:network/nt:link/te/bundle-stack-level/" + + "bundle/bundled-links/bundled-link" { + when '../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for a TE bundled link."; + leaf src-tp-ref { + type leafref { + path "../../../../../nw:node[nw:node-id = " + + "current()/../../../../nt:source/" + + "nt:source-node]/" + + "nt:termination-point/nt:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same source node."; + } + leaf des-tp-ref { + type leafref { + path "../../../../../nw:node[nw:node-id = " + + "current()/../../../../nt:destination/" + + "nt:dest-node]/" + + "nt:termination-point/nt:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same destination node."; + } + } + + augment "/nw:networks/nw:network/nw:node/te/" + + "information-source-entry/connectivity-matrices/" + + "connectivity-matrix" { + when '../../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw:networks/nw:network/nw:node/te/te-node-attributes/" + + "connectivity-matrices/connectivity-matrix" { + when '../../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw:networks/nw:network/nw:node/te/" + + "tunnel-termination-point/local-link-connectivities" { + when '../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for TE node TTP LLCs (Local Link + Connectivities)."; + uses te-node-tunnel-termination-point-llc-list; + } +} diff --git a/models/ietf/RFC/ietf-te-topology@2020-08-06.yang b/models/ietf/RFC/ietf-te-topology@2020-08-06.yang new file mode 100644 index 0000000000000000000000000000000000000000..6d76a77b21ba5609094a670290e5bd81562c3022 --- /dev/null +++ b/models/ietf/RFC/ietf-te-topology@2020-08-06.yang @@ -0,0 +1,1952 @@ +module ietf-te-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-topology"; + prefix tet; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Igor Bryskin + <mailto:i_bryskin@yahoo.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Himanshu Shah + <mailto:hshah@ciena.com> + + Editor: Oscar Gonzalez de Dios + <mailto:oscar.gonzalezdedios@telefonica.com>"; + description + "This YANG module defines a TE topology model for representing, + retrieving, and manipulating technology-agnostic TE topologies. + + Copyright (c) 2020 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 Simplified 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 8795; see the + RFC itself for full legal notices."; + + revision 2020-08-06 { + description + "Initial revision."; + reference + "RFC 8795: YANG Data Model for Traffic Engineering (TE) + Topologies"; + } + + /* + * Features + */ + + feature nsrlg { + description + "This feature indicates that the system supports NSRLGs + (Non-Shared Risk Link Groups)."; + } + + feature te-topology-hierarchy { + description + "This feature indicates that the system allows an underlay + and/or overlay TE topology hierarchy."; + } + + feature template { + description + "This feature indicates that the system supports + template configuration."; + } + + /* + * Typedefs + */ + + typedef geographic-coordinate-degree { + type decimal64 { + fraction-digits 8; + } + description + "Decimal degree (DD) used to express latitude and longitude + geographic coordinates."; + } + // geographic-coordinate-degree + + typedef te-info-source { + type enumeration { + enum unknown { + description + "The source is unknown."; + } + enum locally-configured { + description + "Configured entity."; + } + enum ospfv2 { + description + "OSPFv2."; + } + enum ospfv3 { + description + "OSPFv3."; + } + enum isis { + description + "IS-IS."; + } + enum bgp-ls { + description + "BGP-LS."; + reference + "RFC 7752: North-Bound Distribution of Link-State and + Traffic Engineering (TE) Information Using BGP"; + } + enum system-processed { + description + "System-processed entity."; + } + enum other { + description + "Other source."; + } + } + description + "Describes the type of source that has provided the + related information, and the source's credibility."; + } + // te-info-source + + /* + * Groupings + */ + + grouping connectivity-matrix-entry-path-attributes { + description + "Attributes of a connectivity matrix entry."; + leaf is-allowed { + type boolean; + description + "'true' - switching is allowed; + 'false' - switching is disallowed."; + } + container underlay { + if-feature "te-topology-hierarchy"; + description + "Attributes of the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + uses te-link-underlay-attributes; + } + uses te-types:generic-path-constraints; + uses te-types:generic-path-optimization; + uses te-types:generic-path-properties; + } + // connectivity-matrix-entry-path-attributes + + grouping geolocation-container { + description + "Contains a GPS location."; + container geolocation { + config false; + description + "Contains a GPS location."; + leaf altitude { + type int64; + units "millimeters"; + description + "Distance above sea level."; + } + leaf latitude { + type geographic-coordinate-degree { + range "-90..90"; + } + description + "Relative position north or south on the Earth's surface."; + } + leaf longitude { + type geographic-coordinate-degree { + range "-180..180"; + } + description + "Angular distance east or west on the Earth's surface."; + } + } + // geolocation + } + // geolocation-container + + grouping information-source-state-attributes { + description + "The attributes identifying the source that has provided the + related information, and the source's credibility."; + leaf credibility-preference { + type uint16; + description + "The preference value for calculating the Traffic + Engineering database credibility value used for + tie-break selection between different information-source + values. A higher value is preferable."; + } + leaf logical-network-element { + type string; + description + "When applicable, this is the name of a logical network + element from which the information is learned."; + } + leaf network-instance { + type string; + description + "When applicable, this is the name of a network instance + from which the information is learned."; + } + } + // information-source-state-attributes + + grouping information-source-per-link-attributes { + description + "Per-node container of the attributes identifying the source + that has provided the related information, and the source's + credibility."; + leaf information-source { + type te-info-source; + config false; + description + "Indicates the type of information source."; + } + leaf information-source-instance { + type string; + config false; + description + "The name indicating the instance of the information + source."; + } + container information-source-state { + config false; + description + "Contains state attributes related to the information + source."; + uses information-source-state-attributes; + container topology { + description + "When the information is processed by the system, + the attributes in this container indicate which topology + is used to generate the result information."; + uses nt:link-ref; + } + } + } + // information-source-per-link-attributes + + grouping information-source-per-node-attributes { + description + "Per-node container of the attributes identifying the source + that has provided the related information, and the source's + credibility."; + leaf information-source { + type te-info-source; + config false; + description + "Indicates the type of information source."; + } + leaf information-source-instance { + type string; + config false; + description + "The name indicating the instance of the information + source."; + } + container information-source-state { + config false; + description + "Contains state attributes related to the information + source."; + uses information-source-state-attributes; + container topology { + description + "When the information is processed by the system, + the attributes in this container indicate which topology + is used to generate the result information."; + uses nw:node-ref; + } + } + } + // information-source-per-node-attributes + + grouping interface-switching-capability-list { + description + "List of Interface Switching Capability Descriptors (ISCDs)."; + list interface-switching-capability { + key "switching-capability encoding"; + description + "List of ISCDs for this link."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description + RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for this interface."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by this interface."; + } + uses te-link-iscd-attributes; + } + // interface-switching-capability + } + // interface-switching-capability-list + + grouping statistics-per-link { + description + "Statistics attributes per TE link."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + /* Administrative attributes */ + leaf disables { + type yang:counter32; + description + "Number of times that a link was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a link was enabled."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a link was taken out of maintenance."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a link was put in maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a link was modified."; + } + /* Operational attributes */ + leaf downs { + type yang:counter32; + description + "Number of times that a link was set to an operational state + of 'down'."; + } + leaf ups { + type yang:counter32; + description + "Number of times that a link was set to an operational state + of 'up'."; + } + /* Recovery attributes */ + leaf fault-clears { + type yang:counter32; + description + "Number of times that a link experienced a fault-clear + event."; + } + leaf fault-detects { + type yang:counter32; + description + "Number of times that a link experienced fault detection."; + } + leaf protection-switches { + type yang:counter32; + description + "Number of times that a link experienced protection + switchover."; + } + leaf protection-reverts { + type yang:counter32; + description + "Number of times that a link experienced protection + reversion."; + } + leaf restoration-failures { + type yang:counter32; + description + "Number of times that a link experienced restoration + failure."; + } + leaf restoration-starts { + type yang:counter32; + description + "Number of times that a link experienced restoration + start."; + } + leaf restoration-successes { + type yang:counter32; + description + "Number of times that a link experienced restoration + success."; + } + leaf restoration-reversion-failures { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion failure."; + } + leaf restoration-reversion-starts { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion start."; + } + leaf restoration-reversion-successes { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion success."; + } + } + // statistics-per-link + + grouping statistics-per-node { + description + "Statistics attributes per TE node."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + container node { + description + "Contains statistics attributes at the TE node level."; + leaf disables { + type yang:counter32; + description + "Number of times that a node was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a node was enabled."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a node was put in maintenance."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a node was taken out of + maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a node was modified."; + } + } + // node + container connectivity-matrix-entry { + description + "Contains statistics attributes at the level of a + connectivity matrix entry."; + leaf creates { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + created."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'create' operation"; + } + leaf deletes { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + deleted."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'delete' operation"; + } + leaf disables { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + enabled."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + modified."; + } + } + // connectivity-matrix-entry + } + // statistics-per-node + + grouping statistics-per-ttp { + description + "Statistics attributes per TE TTP (Tunnel Termination Point)."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + container tunnel-termination-point { + description + "Contains statistics attributes at the TE TTP level."; + /* Administrative attributes */ + leaf disables { + type yang:counter32; + description + "Number of times that a TTP was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a TTP was enabled."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a TTP was taken out of maintenance."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a TTP was put in maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a TTP was modified."; + } + /* Operational attributes */ + leaf downs { + type yang:counter32; + description + "Number of times that a TTP was set to an operational state + of 'down'."; + } + leaf ups { + type yang:counter32; + description + "Number of times that a TTP was set to an operational state + of 'up'."; + } + leaf in-service-clears { + type yang:counter32; + description + "Number of times that a TTP was taken out of service + (TE tunnel was released)."; + } + leaf in-service-sets { + type yang:counter32; + description + "Number of times that a TTP was put in service by a TE + tunnel (TE tunnel was set up)."; + } + } + // tunnel-termination-point + container local-link-connectivity { + description + "Contains statistics attributes at the TE LLCL (Local Link + Connectivity List) level."; + leaf creates { + type yang:counter32; + description + "Number of times that an LLCL entry was created."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'create' operation"; + } + leaf deletes { + type yang:counter32; + description + "Number of times that an LLCL entry was deleted."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'delete' operation"; + } + leaf disables { + type yang:counter32; + description + "Number of times that an LLCL entry was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that an LLCL entry was enabled."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that an LLCL entry was modified."; + } + } + // local-link-connectivity + } + // statistics-per-ttp + + grouping te-link-augment { + description + "Augmentation for a TE link."; + uses te-link-config; + uses te-link-state-derived; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-link; + } + } + // te-link-augment + + grouping te-link-config { + description + "TE link configuration grouping."; + choice bundle-stack-level { + description + "The TE link can be partitioned into bundled links or + component links."; + case bundle { + container bundled-links { + description + "A set of bundled links."; + reference + "RFC 4201: Link Bundling in MPLS Traffic + Engineering (TE)"; + list bundled-link { + key "sequence"; + description + "Specifies a bundled interface that is + further partitioned."; + leaf sequence { + type uint32; + description + "Identifies the sequence in the bundle."; + } + } + } + } + case component { + container component-links { + description + "A set of component links."; + list component-link { + key "sequence"; + description + "Specifies a component interface that is + sufficient to unambiguously identify the + appropriate resources."; + leaf sequence { + type uint32; + description + "Identifies the sequence in the bundle."; + } + leaf src-interface-ref { + type string; + description + "Reference to a component link interface on the + source node."; + } + leaf des-interface-ref { + type string; + description + "Reference to a component link interface on the + destination node."; + } + } + } + } + } + // bundle-stack-level + leaf-list te-link-template { + if-feature "template"; + type leafref { + path "../../../../te/templates/link-template/name"; + } + description + "The reference to a TE link template."; + } + uses te-link-config-attributes; + } + // te-link-config + + grouping te-link-config-attributes { + description + "Link configuration attributes in a TE topology."; + container te-link-attributes { + description + "Link attributes in a TE topology."; + leaf access-type { + type te-types:te-link-access-type; + description + "Link access type, which can be point-to-point or + multi-access."; + } + container external-domain { + description + "For an inter-domain link, specifies the attributes of + the remote end of the link, to facilitate the signaling at + the local end."; + uses nw:network-ref; + leaf remote-te-node-id { + type te-types:te-node-id; + description + "Remote TE node identifier, used together with + 'remote-te-link-tp-id' to identify the remote Link + Termination Point (LTP) in a different domain."; + } + leaf remote-te-link-tp-id { + type te-types:te-tp-id; + description + "Remote TE LTP identifier, used together with + 'remote-te-node-id' to identify the remote LTP in a + different domain."; + } + } + leaf is-abstract { + type empty; + description + "Present if the link is abstract."; + } + leaf name { + type string; + description + "Link name."; + } + container underlay { + if-feature "te-topology-hierarchy"; + description + "Attributes of the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + uses te-link-underlay-attributes; + } + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-link-info-attributes; + } + // te-link-attributes + } + // te-link-config-attributes + + grouping te-link-info-attributes { + description + "Advertised TE information attributes."; + leaf link-index { + type uint64; + description + "The link identifier. If OSPF is used, this object + represents an ospfLsdbID. If IS-IS is used, this object + represents an isisLSPID. If a locally configured link is + used, this object represents a unique value, which is + locally defined in a router."; + } + leaf administrative-group { + type te-types:admin-groups; + description + "Administrative group or color of the link. + This attribute covers both administrative groups (defined + in RFCs 3630 and 5305) and Extended Administrative Groups + (defined in RFC 7308)."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering + RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + uses interface-switching-capability-list; + uses te-types:label-set-info; + leaf link-protection-type { + type identityref { + base te-types:link-protection-type; + } + description + "Link Protection Type desired for this link."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + container max-link-bandwidth { + uses te-types:te-bandwidth; + description + "Maximum bandwidth that can be seen on this link in this + direction. Units are in bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + container max-resv-link-bandwidth { + uses te-types:te-bandwidth; + description + "Maximum amount of bandwidth that can be reserved in this + direction in this link. Units are in bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + list unreserved-bandwidth { + key "priority"; + max-elements 8; + description + "Unreserved bandwidth for priority levels 0-7. Units are in + bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + leaf priority { + type uint8 { + range "0..7"; + } + description + "Priority."; + } + uses te-types:te-bandwidth; + } + leaf te-default-metric { + type uint32; + description + "Traffic Engineering metric."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + leaf te-delay-metric { + type uint32; + description + "Traffic Engineering delay metric."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + leaf te-igp-metric { + type uint32; + description + "IGP metric used for Traffic Engineering."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + container te-srlgs { + description + "Contains a list of SRLGs."; + leaf-list value { + type te-types:srlg; + description + "SRLG value."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + } + container te-nsrlgs { + if-feature "nsrlg"; + description + "Contains a list of NSRLGs (Non-Shared Risk Link Groups). + When an abstract TE link is configured, this list specifies + the request that underlay TE paths need to be mutually + disjoint with other TE links in the same groups."; + leaf-list id { + type uint32; + description + "NSRLG ID, uniquely configured within a topology."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + } + } + // te-link-info-attributes + + grouping te-link-iscd-attributes { + description + "TE link ISCD attributes."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS), Section 1.4"; + list max-lsp-bandwidth { + key "priority"; + max-elements 8; + description + "Maximum Label Switched Path (LSP) bandwidth at + priorities 0-7."; + leaf priority { + type uint8 { + range "0..7"; + } + description + "Priority."; + } + uses te-types:te-bandwidth; + } + } + // te-link-iscd-attributes + + grouping te-link-state-derived { + description + "Link state attributes in a TE topology."; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the link."; + } + leaf is-transitional { + type empty; + config false; + description + "Present if the link is transitional; used as an + alternative approach in lieu of 'inter-layer-lock-id' + for path computation in a TE topology covering multiple + layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + uses information-source-per-link-attributes; + list information-source-entry { + key "information-source information-source-instance"; + config false; + description + "A list of information sources learned, including the source + that is used."; + uses information-source-per-link-attributes; + uses te-link-info-attributes; + } + container recovery { + config false; + description + "Status of the recovery process."; + leaf restoration-status { + type te-types:te-recovery-status; + description + "Restoration status."; + } + leaf protection-status { + type te-types:te-recovery-status; + description + "Protection status."; + } + } + container underlay { + if-feature "te-topology-hierarchy"; + config false; + description + "State attributes for the TE link underlay."; + leaf dynamic { + type boolean; + description + "'true' if the underlay is dynamically created."; + } + leaf committed { + type boolean; + description + "'true' if the underlay is committed."; + } + } + } + // te-link-state-derived + + grouping te-link-underlay-attributes { + description + "Attributes for the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + leaf enabled { + type boolean; + description + "'true' if the underlay is enabled. + 'false' if the underlay is disabled."; + } + container primary-path { + description + "The service path on the underlay topology that + supports this link."; + uses nw:network-ref; + list path-element { + key "path-element-id"; + description + "A list of path elements describing the service path."; + leaf path-element-id { + type uint32; + description + "To identify the element in a path."; + } + uses te-path-element; + } + } + // primary-path + list backup-path { + key "index"; + description + "A list of backup service paths on the underlay topology that + protect the underlay primary path. If the primary path is + not protected, the list contains zero elements. If the + primary path is protected, the list contains one or more + elements."; + leaf index { + type uint32; + description + "A sequence number to identify a backup path."; + } + uses nw:network-ref; + list path-element { + key "path-element-id"; + description + "A list of path elements describing the backup service + path."; + leaf path-element-id { + type uint32; + description + "To identify the element in a path."; + } + uses te-path-element; + } + } + // backup-path + leaf protection-type { + type identityref { + base te-types:lsp-protection-type; + } + description + "Underlay protection type desired for this link."; + } + container tunnel-termination-points { + description + "Underlay TTPs desired for this link."; + leaf source { + type binary; + description + "Source TTP identifier."; + } + leaf destination { + type binary; + description + "Destination TTP identifier."; + } + } + container tunnels { + description + "Underlay TE tunnels supporting this TE link."; + leaf sharing { + type boolean; + default "true"; + description + "'true' if the underlay tunnel can be shared with other + TE links; + 'false' if the underlay tunnel is dedicated to this + TE link. + This leaf is the default option for all TE tunnels + and may be overridden by the per-TE-tunnel value."; + } + list tunnel { + key "tunnel-name"; + description + "Zero, one, or more underlay TE tunnels that support this + TE link."; + leaf tunnel-name { + type string; + description + "A tunnel name uniquely identifies an underlay TE tunnel, + used together with the 'source-node' value for this + link."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf sharing { + type boolean; + description + "'true' if the underlay tunnel can be shared with other + TE links; + 'false' if the underlay tunnel is dedicated to this + TE link."; + } + } + // tunnel + } + // tunnels + } + // te-link-underlay-attributes + + grouping te-node-augment { + description + "Augmentation for a TE node."; + uses te-node-config; + uses te-node-state-derived; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-node; + } + list tunnel-termination-point { + key "tunnel-tp-id"; + description + "A termination point can terminate a tunnel."; + leaf tunnel-tp-id { + type binary; + description + "TTP identifier."; + } + uses te-node-tunnel-termination-point-config; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the TTP."; + } + uses geolocation-container; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-ttp; + } + // Relationship to other TTPs + list supporting-tunnel-termination-point { + key "node-ref tunnel-tp-ref"; + description + "Identifies the TTPs on which this TTP depends."; + leaf node-ref { + type inet:uri; + description + "This leaf identifies the node in which the supporting + TTP is present. + This node is either the supporting node or a node in + an underlay topology."; + } + leaf tunnel-tp-ref { + type binary; + description + "Reference to a TTP that is in either the supporting node + or a node in an underlay topology."; + } + } + // supporting-tunnel-termination-point + } + // tunnel-termination-point + } + // te-node-augment + + grouping te-node-config { + description + "TE node configuration grouping."; + leaf-list te-node-template { + if-feature "template"; + type leafref { + path "../../../../te/templates/node-template/name"; + } + description + "The reference to a TE node template."; + } + uses te-node-config-attributes; + } + // te-node-config + + grouping te-node-config-attributes { + description + "Configuration node attributes in a TE topology."; + container te-node-attributes { + description + "Contains node attributes in a TE topology."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-node-connectivity-matrices; + uses te-node-info-attributes; + } + } + // te-node-config-attributes + + grouping te-node-config-attributes-template { + description + "Configuration node attributes for a template in a TE + topology."; + container te-node-attributes { + description + "Contains node attributes in a TE topology."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-node-info-attributes; + } + } + // te-node-config-attributes-template + + grouping te-node-connectivity-matrices { + description + "Connectivity matrix on a TE node."; + container connectivity-matrices { + description + "Contains a connectivity matrix on a TE node."; + leaf number-of-entries { + type uint16; + description + "The number of connectivity matrix entries. + If this number is specified in the configuration request, + the number is the requested number of entries, which may + not all be listed in the list; + if this number is reported in the state data, + the number is the current number of operational entries."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + list connectivity-matrix { + key "id"; + description + "Represents a node's switching limitations, i.e., + limitations in the interconnecting network TE links + across the node."; + reference + "RFC 7579: General Network Element Constraint Encoding + for GMPLS-Controlled Networks"; + leaf id { + type uint32; + description + "Identifies the connectivity matrix entry."; + } + } + // connectivity-matrix + } + // connectivity-matrices + } + // te-node-connectivity-matrices + + grouping te-node-connectivity-matrix-attributes { + description + "Termination point references of a connectivity matrix entry."; + container from { + description + "Reference to a source LTP."; + leaf tp-ref { + type leafref { + path "../../../../../../nt:termination-point/nt:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + container to { + description + "Reference to a destination LTP."; + leaf tp-ref { + type leafref { + path "../../../../../../nt:termination-point/nt:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + uses connectivity-matrix-entry-path-attributes; + } + // te-node-connectivity-matrix-attributes + + grouping te-node-info-attributes { + description + "Advertised TE information attributes."; + leaf domain-id { + type uint32; + description + "Identifies the domain to which this node belongs. + This attribute is used to support inter-domain links."; + reference + "RFC 5152: A Per-Domain Path Computation Method for + Establishing Inter-Domain Traffic Engineering (TE) + Label Switched Paths (LSPs) + RFC 5316: ISIS Extensions in Support of Inter-Autonomous + System (AS) MPLS and GMPLS Traffic Engineering + RFC 5392: OSPF Extensions in Support of Inter-Autonomous + System (AS) MPLS and GMPLS Traffic Engineering"; + } + leaf is-abstract { + type empty; + description + "Present if the node is abstract; not present if the node + is actual."; + } + leaf name { + type string; + description + "Node name."; + } + leaf-list signaling-address { + type inet:ip-address; + description + "The node's signaling address."; + } + container underlay-topology { + if-feature "te-topology-hierarchy"; + description + "When an abstract node encapsulates a topology, the + attributes in this container point to said topology."; + uses nw:network-ref; + } + } + // te-node-info-attributes + + grouping te-node-state-derived { + description + "Node state attributes in a TE topology."; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the node."; + } + uses geolocation-container; + leaf is-multi-access-dr { + type empty; + config false; + description + "The presence of this attribute indicates that this TE node + is a pseudonode elected as a designated router."; + reference + "RFC 1195: Use of OSI IS-IS for Routing in TCP/IP and Dual + Environments + RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + uses information-source-per-node-attributes; + list information-source-entry { + key "information-source information-source-instance"; + config false; + description + "A list of information sources learned, including the source + that is used."; + uses information-source-per-node-attributes; + uses te-node-connectivity-matrices; + uses te-node-info-attributes; + } + } + // te-node-state-derived + + grouping te-node-tunnel-termination-point-config { + description + "Termination capability of a TTP on a TE node."; + uses te-node-tunnel-termination-point-config-attributes; + container local-link-connectivities { + description + "Contains an LLCL for a TTP on a TE node."; + leaf number-of-entries { + type uint16; + description + "The number of LLCL entries. + If this number is specified in the configuration request, + the number is the requested number of entries, which may + not all be listed in the list; + if this number is reported in the state data, + the number is the current number of operational entries."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + } + } + // te-node-tunnel-termination-point-config + + grouping te-node-tunnel-termination-point-config-attributes { + description + "Configuration attributes of a TTP on a TE node."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the TTP."; + } + leaf name { + type string; + description + "A descriptive name for the TTP."; + } + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for this interface."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by this interface."; + } + leaf-list inter-layer-lock-id { + type uint32; + description + "Inter-layer lock ID, used for path computation in a TE + topology covering multiple layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + leaf protection-type { + type identityref { + base te-types:lsp-protection-type; + } + description + "The protection type that this TTP is capable of."; + } + container client-layer-adaptation { + description + "Contains capability information to support a client-layer + adaptation in a multi-layer topology."; + list switching-capability { + key "switching-capability encoding"; + description + "List of supported switching capabilities."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for the client-layer adaptation."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by the client-layer adaptation."; + } + uses te-types:te-bandwidth; + } + } + } + // te-node-tunnel-termination-point-config-attributes + + grouping te-node-tunnel-termination-point-llc-list { + description + "LLCL of a TTP on a TE node."; + list local-link-connectivity { + key "link-tp-ref"; + description + "The termination capabilities between the TTP and the LTP. + This capability information can be used to compute + the tunnel path. + The Interface Adjustment Capability Descriptors (IACDs) + (defined in RFC 6001) on each LTP can be derived from + this list."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + leaf link-tp-ref { + type leafref { + path "../../../../../nt:termination-point/nt:tp-id"; + } + description + "LTP."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + } + } + // te-node-tunnel-termination-point-llc-list + + grouping te-path-element { + description + "A group of attributes defining an element in a TE path, + such as a TE node, TE link, TE atomic resource, or label."; + uses te-types:explicit-route-hop; + } + // te-path-element + + grouping te-termination-point-augment { + description + "Augmentation for a TE termination point."; + leaf te-tp-id { + type te-types:te-tp-id; + description + "An identifier that uniquely identifies a TE termination + point."; + } + container te { + must '../te-tp-id'; + presence "TE support"; + description + "Indicates TE support."; + uses te-termination-point-config; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the LTP."; + } + uses geolocation-container; + } + } + // te-termination-point-augment + + grouping te-termination-point-config { + description + "TE termination point configuration grouping."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the LTP."; + } + leaf name { + type string; + description + "A descriptive name for the LTP."; + } + uses interface-switching-capability-list; + leaf inter-domain-plug-id { + type binary; + description + "A network-wide unique number that identifies on the + network a connection that supports a given inter-domain + TE link. This is a more flexible alternative to specifying + 'remote-te-node-id' and 'remote-te-link-tp-id' on a TE link + when the provider either does not know 'remote-te-node-id' + and 'remote-te-link-tp-id' or needs to give the client the + flexibility to mix and match multiple topologies."; + } + leaf-list inter-layer-lock-id { + type uint32; + description + "Inter-layer lock ID, used for path computation in a TE + topology covering multiple layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + } + // te-termination-point-config + + grouping te-topologies-augment { + description + "Augmentation for TE topologies."; + container te { + presence "TE support"; + description + "Indicates TE support."; + container templates { + description + "Configuration parameters for templates used for a TE + topology."; + list node-template { + if-feature "template"; + key "name"; + leaf name { + type te-types:te-template-name; + description + "The name to identify a TE node template."; + } + description + "The list of TE node templates used to define sharable + and reusable TE node attributes."; + uses template-attributes; + uses te-node-config-attributes-template; + } + // node-template + list link-template { + if-feature "template"; + key "name"; + leaf name { + type te-types:te-template-name; + description + "The name to identify a TE link template."; + } + description + "The list of TE link templates used to define sharable + and reusable TE link attributes."; + uses template-attributes; + uses te-link-config-attributes; + } + // link-template + } + // templates + } + // te + } + // te-topologies-augment + + grouping te-topology-augment { + description + "Augmentation for a TE topology."; + uses te-types:te-topology-identifier; + container te { + must '../te-topology-identifier/provider-id' + + ' and ../te-topology-identifier/client-id' + + ' and ../te-topology-identifier/topology-id'; + presence "TE support"; + description + "Indicates TE support."; + uses te-topology-config; + uses geolocation-container; + } + } + // te-topology-augment + + grouping te-topology-config { + description + "TE topology configuration grouping."; + leaf name { + type string; + description + "Name of the TE topology. This attribute is optional and can + be specified by the operator to describe the TE topology, + which can be useful when 'network-id' (RFC 8345) is not + descriptive and not modifiable because of being generated + by the system."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + leaf preference { + type uint8 { + range "1..255"; + } + description + "Specifies a preference for this topology. A lower number + indicates a higher preference."; + } + leaf optimization-criterion { + type identityref { + base te-types:objective-function-type; + } + description + "Optimization criterion applied to this topology."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + list nsrlg { + if-feature "nsrlg"; + key "id"; + description + "List of NSRLGs (Non-Shared Risk Link Groups)."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + leaf id { + type uint32; + description + "Identifies the NSRLG entry."; + } + leaf disjointness { + type te-types:te-path-disjointness; + description + "The type of resource disjointness."; + } + } + // nsrlg + } + // te-topology-config + + grouping template-attributes { + description + "Common attributes for all templates."; + leaf priority { + type uint16; + description + "The preference value for resolving conflicts between + different templates. When two or more templates specify + values for one configuration attribute, the value from the + template with the highest priority is used. + A lower number indicates a higher priority. The highest + priority is 0."; + } + leaf reference-change-policy { + type enumeration { + enum no-action { + description + "When an attribute changes in this template, the + configuration node referring to this template does + not take any action."; + } + enum not-allowed { + description + "When any configuration object has a reference to this + template, changing this template is not allowed."; + } + enum cascade { + description + "When an attribute changes in this template, the + configuration object referring to this template applies + the new attribute value to the corresponding + configuration."; + } + } + description + "This attribute specifies the action taken for a + configuration node that has a reference to this template."; + } + } + // template-attributes + + /* + * Data nodes + */ + + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduces a new network type for a TE topology."; + container te-topology { + presence "Indicates a TE topology"; + description + "Its presence identifies the TE topology type."; + } + } + + augment "/nw:networks" { + description + "Augmentation parameters for TE topologies."; + uses te-topologies-augment; + } + + augment "/nw:networks/nw:network" { + when 'nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for a TE topology."; + uses te-topology-augment; + } + + augment "/nw:networks/nw:network/nw:node" { + when '../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the node level."; + leaf te-node-id { + type te-types:te-node-id; + description + "The identifier of a node in the TE topology. + A node is specific to a topology to which it belongs."; + } + container te { + must '../te-node-id' { + description + "'te-node-id' is mandatory."; + } + must 'count(../nw:supporting-node)<=1' { + description + "For a node in a TE topology, there cannot be more + than one supporting node. If multiple nodes are + abstracted, the 'underlay-topology' field is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses te-node-augment; + } + } + + augment "/nw:networks/nw:network/nt:link" { + when '../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the link level."; + container te { + must 'count(../nt:supporting-link)<=1' { + description + "For a link in a TE topology, there cannot be more + than one supporting link. If one or more link paths are + abstracted, the underlay is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses te-link-augment; + } + } + + augment "/nw:networks/nw:network/nw:node/" + + "nt:termination-point" { + when '../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the termination point + level."; + uses te-termination-point-augment; + } + + augment "/nw:networks/nw:network/nt:link/te/bundle-stack-level/" + + "bundle/bundled-links/bundled-link" { + when '../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for a TE bundled link."; + leaf src-tp-ref { + type leafref { + path "../../../../../nw:node[nw:node-id = " + + "current()/../../../../nt:source/" + + "nt:source-node]/" + + "nt:termination-point/nt:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same source node."; + } + leaf des-tp-ref { + type leafref { + path "../../../../../nw:node[nw:node-id = " + + "current()/../../../../nt:destination/" + + "nt:dest-node]/" + + "nt:termination-point/nt:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same destination node."; + } + } + + augment "/nw:networks/nw:network/nw:node/te/" + + "information-source-entry/connectivity-matrices/" + + "connectivity-matrix" { + when '../../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw:networks/nw:network/nw:node/te/te-node-attributes/" + + "connectivity-matrices/connectivity-matrix" { + when '../../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw:networks/nw:network/nw:node/te/" + + "tunnel-termination-point/local-link-connectivities" { + when '../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for TE node TTP LLCs (Local Link + Connectivities)."; + uses te-node-tunnel-termination-point-llc-list; + } +} diff --git a/models/ietf/RFC/ietf-te-types.yang b/models/ietf/RFC/ietf-te-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..6fc0544dede2128f3e91f8cf5a39caa8cc49ab6e --- /dev/null +++ b/models/ietf/RFC/ietf-te-types.yang @@ -0,0 +1,3379 @@ +module ietf-te-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-types"; + prefix te-types; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Rakesh Gandhi + <mailto:rgandhi@cisco.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Igor Bryskin + <mailto:i_bryskin@yahoo.com>"; + description + "This YANG module contains a collection of generally useful + YANG data type definitions specific to TE. The model fully + conforms to the Network Management Datastore Architecture + (NMDA). + + 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. + + Copyright (c) 2020 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 Simplified 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 8776; see the + RFC itself for full legal notices."; + + revision 2020-06-10 { + description + "Latest revision of TE types."; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + /** + * Typedefs + */ + + typedef admin-group { + type yang:hex-string { + /* 01:02:03:04 */ + length "1..11"; + } + description + "Administrative group / resource class / color representation + in 'hex-string' type. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering + RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + typedef admin-groups { + type union { + type admin-group; + type extended-admin-group; + } + description + "Derived types for TE administrative groups."; + } + + typedef extended-admin-group { + type yang:hex-string; + description + "Extended administrative group / resource class / color + representation in 'hex-string' type. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity."; + reference + "RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + typedef path-attribute-flags { + type union { + type identityref { + base session-attributes-flags; + } + type identityref { + base lsp-attributes-flags; + } + } + description + "Path attributes flags type."; + } + + typedef performance-metrics-normality { + type enumeration { + enum unknown { + value 0; + description + "Unknown."; + } + enum normal { + value 1; + description + "Normal. Indicates that the anomalous bit is not set."; + } + enum abnormal { + value 2; + description + "Abnormal. Indicates that the anomalous bit is set."; + } + } + description + "Indicates whether a performance metric is normal (anomalous + bit not set), abnormal (anomalous bit set), or unknown."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + } + + typedef srlg { + type uint32; + description + "SRLG type."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS) + RFC 5307: IS-IS Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + } + + typedef te-common-status { + type enumeration { + enum up { + description + "Enabled."; + } + enum down { + description + "Disabled."; + } + enum testing { + description + "In some test mode."; + } + enum preparing-maintenance { + description + "The resource is disabled in the control plane to prepare + for a graceful shutdown for maintenance purposes."; + reference + "RFC 5817: Graceful Shutdown in MPLS and Generalized MPLS + Traffic Engineering Networks"; + } + enum maintenance { + description + "The resource is disabled in the data plane for maintenance + purposes."; + } + enum unknown { + description + "Status is unknown."; + } + } + description + "Defines a type representing the common states of a TE + resource."; + } + + typedef te-bandwidth { + type string { + pattern '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?' + + '[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+' + + '(,(0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?' + + '[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+))*'; + } + description + "This is the generic bandwidth type. It is a string containing + a list of numbers separated by commas, where each of these + numbers can be non-negative decimal, hex integer, or + hex float: + + (dec | hex | float)[*(','(dec | hex | float))] + + For the packet-switching type, the string encoding follows + the type 'bandwidth-ieee-float32' as defined in RFC 8294 + (e.g., 0x1p10), where the units are in bytes per second. + + For the Optical Transport Network (OTN) switching type, + a list of integers can be used, such as '0,2,3,1', indicating + two ODU0s and one ODU3. ('ODU' stands for 'Optical Data + Unit'.) For Dense Wavelength Division Multiplexing (DWDM), + a list of pairs of slot numbers and widths can be used, + such as '0,2,3,3', indicating a frequency slot 0 with + slot width 2 and a frequency slot 3 with slot width 3. + Canonically, the string is represented as all lowercase and in + hex, where the prefix '0x' precedes the hex number."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area + ITU-T Recommendation G.709: Interfaces for the + optical transport network"; + } + + typedef te-ds-class { + type uint8 { + range "0..7"; + } + description + "The Differentiated Services Class-Type of traffic."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering, Section 4.3.1"; + } + + typedef te-global-id { + type uint32; + description + "An identifier to uniquely identify an operator, which can be + either a provider or a client. + The definition of this type is taken from RFCs 6370 and 5003. + This attribute type is used solely to provide a globally + unique context for TE topologies."; + reference + "RFC 5003: Attachment Individual Identifier (AII) Types for + Aggregation + RFC 6370: MPLS Transport Profile (MPLS-TP) Identifiers"; + } + + typedef te-hop-type { + type enumeration { + enum loose { + description + "A loose hop in an explicit path."; + } + enum strict { + description + "A strict hop in an explicit path."; + } + } + description + "Enumerated type for specifying loose or strict paths."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3.3"; + } + + typedef te-link-access-type { + type enumeration { + enum point-to-point { + description + "The link is point-to-point."; + } + enum multi-access { + description + "The link is multi-access, including broadcast and NBMA."; + } + } + description + "Defines a type representing the access type of a TE link."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + + typedef te-label-direction { + type enumeration { + enum forward { + description + "Label allocated for the forward LSP direction."; + } + enum reverse { + description + "Label allocated for the reverse LSP direction."; + } + } + description + "Enumerated type for specifying the forward or reverse + label."; + } + + typedef te-link-direction { + type enumeration { + enum incoming { + description + "The explicit route represents an incoming link on + a node."; + } + enum outgoing { + description + "The explicit route represents an outgoing link on + a node."; + } + } + description + "Enumerated type for specifying the direction of a link on + a node."; + } + + typedef te-metric { + type uint32; + description + "TE metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + typedef te-node-id { + type yang:dotted-quad; + description + "A type representing the identifier for a node in a TE + topology. + The identifier is represented as 4 octets in dotted-quad + notation. + This attribute MAY be mapped to the Router Address TLV + described in Section 2.4.1 of RFC 3630, the TE Router ID + described in Section 3 of RFC 6827, the Traffic Engineering + Router ID TLV described in Section 4.3 of RFC 5305, or the + TE Router ID TLV described in Section 3.2.1 of RFC 6119. + The reachability of such a TE node MAY be achieved by a + mechanism such as that described in Section 6.2 of RFC 6827."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2, Section 2.4.1 + RFC 5305: IS-IS Extensions for Traffic Engineering, + Section 4.3 + RFC 6119: IPv6 Traffic Engineering in IS-IS, Section 3.2.1 + RFC 6827: Automatically Switched Optical Network (ASON) + Routing for OSPFv2 Protocols, Section 3"; + } + + typedef te-oper-status { + type te-common-status; + description + "Defines a type representing the operational status of + a TE resource."; + } + + typedef te-admin-status { + type te-common-status; + description + "Defines a type representing the administrative status of + a TE resource."; + } + + typedef te-path-disjointness { + type bits { + bit node { + position 0; + description + "Node disjoint."; + } + bit link { + position 1; + description + "Link disjoint."; + } + bit srlg { + position 2; + description + "SRLG (Shared Risk Link Group) disjoint."; + } + } + description + "Type of the resource disjointness for a TE tunnel path."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + typedef te-recovery-status { + type enumeration { + enum normal { + description + "Both the recovery span and the working span are fully + allocated and active, data traffic is being + transported over (or selected from) the working + span, and no trigger events are reported."; + } + enum recovery-started { + description + "The recovery action has been started but not completed."; + } + enum recovery-succeeded { + description + "The recovery action has succeeded. The working span has + reported a failure/degrade condition, and the user traffic + is being transported (or selected) on the recovery span."; + } + enum recovery-failed { + description + "The recovery action has failed."; + } + enum reversion-started { + description + "The reversion has started."; + } + enum reversion-succeeded { + description + "The reversion action has succeeded."; + } + enum reversion-failed { + description + "The reversion has failed."; + } + enum recovery-unavailable { + description + "The recovery is unavailable, as a result of either an + operator's lockout command or a failure condition + detected on the recovery span."; + } + enum recovery-admin { + description + "The operator has issued a command to switch the user + traffic to the recovery span."; + } + enum wait-to-restore { + description + "The recovery domain is recovering from a failure/degrade + condition on the working span that is being controlled by + the Wait-to-Restore (WTR) timer."; + } + } + description + "Defines the status of a recovery action."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS) + RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection"; + } + + typedef te-template-name { + type string { + pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + description + "A type for the name of a TE node template or TE link + template."; + } + + typedef te-topology-event-type { + type enumeration { + enum add { + value 0; + description + "A TE node or TE link has been added."; + } + enum remove { + value 1; + description + "A TE node or TE link has been removed."; + } + enum update { + value 2; + description + "A TE node or TE link has been updated."; + } + } + description + "TE event type for notifications."; + } + + typedef te-topology-id { + type union { + type string { + length "0"; + // empty string + } + type string { + pattern '([a-zA-Z0-9\-_.]+:)*' + + '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + } + description + "An identifier for a topology. + It is optional to have one or more prefixes at the beginning, + separated by colons. The prefixes can be 'network-types' as + defined in the 'ietf-network' module in RFC 8345, to help the + user better understand the topology before further inquiry + is made."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef te-tp-id { + type union { + type uint32; + // Unnumbered + type inet:ip-address; + // IPv4 or IPv6 address + } + description + "An identifier for a TE link endpoint on a node. + This attribute is mapped to a local or remote link identifier + as defined in RFCs 3630 and 5305."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + + /* TE features */ + + feature p2mp-te { + description + "Indicates support for Point-to-Multipoint TE (P2MP-TE)."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs)"; + } + + feature frr-te { + description + "Indicates support for TE Fast Reroute (FRR)."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + feature extended-admin-groups { + description + "Indicates support for TE link extended administrative + groups."; + reference + "RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + feature named-path-affinities { + description + "Indicates support for named path affinities."; + } + + feature named-extended-admin-groups { + description + "Indicates support for named extended administrative groups."; + } + + feature named-srlg-groups { + description + "Indicates support for named SRLG groups."; + } + + feature named-path-constraints { + description + "Indicates support for named path constraints."; + } + + feature path-optimization-metric { + description + "Indicates support for path optimization metrics."; + } + + feature path-optimization-objective-function { + description + "Indicates support for path optimization objective functions."; + } + + /* + * Identities + */ + + identity session-attributes-flags { + description + "Base identity for the RSVP-TE session attributes flags."; + } + + identity local-protection-desired { + base session-attributes-flags; + description + "Local protection is desired."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.7.1"; + } + + identity se-style-desired { + base session-attributes-flags; + description + "Shared explicit style, to allow the LSP to be established + and share resources with the old LSP."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity local-recording-desired { + base session-attributes-flags; + description + "Label recording is desired."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.7.1"; + } + + identity bandwidth-protection-desired { + base session-attributes-flags; + description + "Requests FRR bandwidth protection on LSRs, if present."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + identity node-protection-desired { + base session-attributes-flags; + description + "Requests FRR node protection on LSRs, if present."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + identity path-reevaluation-request { + base session-attributes-flags; + description + "This flag indicates that a path re-evaluation (of the + current path in use) is requested. Note that this does + not trigger any LSP reroutes but instead just signals a + request to evaluate whether a preferable path exists."; + reference + "RFC 4736: Reoptimization of Multiprotocol Label Switching + (MPLS) Traffic Engineering (TE) Loosely Routed Label Switched + Path (LSP)"; + } + + identity soft-preemption-desired { + base session-attributes-flags; + description + "Soft preemption of LSP resources is desired."; + reference + "RFC 5712: MPLS Traffic Engineering Soft Preemption"; + } + + identity lsp-attributes-flags { + description + "Base identity for LSP attributes flags."; + } + + identity end-to-end-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates end-to-end rerouting behavior for an LSP + undergoing establishment. This MAY also be used to + specify the behavior of end-to-end LSP recovery for + established LSPs."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity boundary-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates boundary rerouting behavior for an LSP undergoing + establishment. This MAY also be used to specify + segment-based LSP recovery through nested crankback for + established LSPs. The boundary Area Border Router (ABR) / + Autonomous System Border Router (ASBR) can decide to forward + the PathErr message upstream to either an upstream boundary + ABR/ASBR or the ingress LSR. Alternatively, it can try to + select another egress boundary LSR."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity segment-based-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates segment-based rerouting behavior for an LSP + undergoing establishment. This MAY also be used to specify + segment-based LSP recovery for established LSPs."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity lsp-integrity-required { + base lsp-attributes-flags; + description + "Indicates that LSP integrity is required."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity contiguous-lsp-desired { + base lsp-attributes-flags; + description + "Indicates that a contiguous LSP is desired."; + reference + "RFC 5151: Inter-Domain MPLS and GMPLS Traffic Engineering -- + Resource Reservation Protocol-Traffic Engineering (RSVP-TE) + Extensions + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity lsp-stitching-desired { + base lsp-attributes-flags; + description + "Indicates that LSP stitching is desired."; + reference + "RFC 5150: Label Switched Path Stitching with Generalized + Multiprotocol Label Switching Traffic Engineering (GMPLS TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity pre-planned-lsp-flag { + base lsp-attributes-flags; + description + "Indicates that the LSP MUST be provisioned in the + control plane only."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions for + Multi-Layer and Multi-Region Networks (MLN/MRN) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity non-php-behavior-flag { + base lsp-attributes-flags; + description + "Indicates that non-PHP (non-Penultimate Hop Popping) behavior + for the LSP is desired."; + reference + "RFC 6511: Non-Penultimate Hop Popping Behavior and Out-of-Band + Mapping for RSVP-TE Label Switched Paths + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity oob-mapping-flag { + base lsp-attributes-flags; + description + "Indicates that signaling of the egress binding information is + out of band (e.g., via the Border Gateway Protocol (BGP))."; + reference + "RFC 6511: Non-Penultimate Hop Popping Behavior and Out-of-Band + Mapping for RSVP-TE Label Switched Paths + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity entropy-label-capability { + base lsp-attributes-flags; + description + "Indicates entropy label capability."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity oam-mep-entity-desired { + base lsp-attributes-flags; + description + "OAM Maintenance Entity Group End Point (MEP) entities + desired."; + reference + "RFC 7260: GMPLS RSVP-TE Extensions for Operations, + Administration, and Maintenance (OAM) Configuration"; + } + + identity oam-mip-entity-desired { + base lsp-attributes-flags; + description + "OAM Maintenance Entity Group Intermediate Points (MIP) + entities desired."; + reference + "RFC 7260: GMPLS RSVP-TE Extensions for Operations, + Administration, and Maintenance (OAM) Configuration"; + } + + identity srlg-collection-desired { + base lsp-attributes-flags; + description + "SRLG collection desired."; + reference + "RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO) + RFC 8001: RSVP-TE Extensions for Collecting Shared Risk + Link Group (SRLG) Information"; + } + + identity loopback-desired { + base lsp-attributes-flags; + description + "This flag indicates that a particular node on the LSP is + required to enter loopback mode. This can also be + used to specify the loopback state of the node."; + reference + "RFC 7571: GMPLS RSVP-TE Extensions for Lock Instruct and + Loopback"; + } + + identity p2mp-te-tree-eval-request { + base lsp-attributes-flags; + description + "P2MP-TE tree re-evaluation request."; + reference + "RFC 8149: RSVP Extensions for Reoptimization of Loosely Routed + Point-to-Multipoint Traffic Engineering Label Switched Paths + (LSPs)"; + } + + identity rtm-set-desired { + base lsp-attributes-flags; + description + "Residence Time Measurement (RTM) attribute flag requested."; + reference + "RFC 8169: Residence Time Measurement in MPLS Networks"; + } + + identity link-protection-type { + description + "Base identity for the link protection type."; + } + + identity link-protection-unprotected { + base link-protection-type; + description + "Unprotected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-extra-traffic { + base link-protection-type; + description + "Extra-Traffic protected link type."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity link-protection-shared { + base link-protection-type; + description + "Shared protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-1-for-1 { + base link-protection-type; + description + "One-for-one (1:1) protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-1-plus-1 { + base link-protection-type; + description + "One-plus-one (1+1) protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-enhanced { + base link-protection-type; + description + "A compound link protection type derived from the underlay + TE tunnel protection configuration supporting the TE link."; + } + + identity association-type { + description + "Base identity for the tunnel association."; + } + + identity association-type-recovery { + base association-type; + description + "Association type for recovery, used to associate LSPs of the + same tunnel for recovery."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery + RFC 6780: RSVP ASSOCIATION Object Extensions"; + } + + identity association-type-resource-sharing { + base association-type; + description + "Association type for resource sharing, used to enable + resource sharing during make-before-break."; + reference + "RFC 4873: GMPLS Segment Recovery + RFC 6780: RSVP ASSOCIATION Object Extensions"; + } + + identity association-type-double-sided-bidir { + base association-type; + description + "Association type for double-sided bidirectional LSPs, + used to associate two LSPs of two tunnels that are + independently configured on either endpoint."; + reference + "RFC 7551: RSVP-TE Extensions for Associated Bidirectional + Label Switched Paths (LSPs)"; + } + + identity association-type-single-sided-bidir { + base association-type; + description + "Association type for single-sided bidirectional LSPs, + used to associate two LSPs of two tunnels, where one + tunnel is configured on one side/endpoint and the other + tunnel is dynamically created on the other endpoint."; + reference + "RFC 6780: RSVP ASSOCIATION Object Extensions + RFC 7551: RSVP-TE Extensions for Associated Bidirectional + Label Switched Paths (LSPs)"; + } + + identity objective-function-type { + description + "Base objective function type."; + } + + identity of-minimize-cost-path { + base objective-function-type; + description + "Objective function for minimizing path cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-load-path { + base objective-function-type; + description + "Objective function for minimizing the load on one or more + paths."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-maximize-residual-bandwidth { + base objective-function-type; + description + "Objective function for maximizing residual bandwidth."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-agg-bandwidth-consumption { + base objective-function-type; + description + "Objective function for minimizing aggregate bandwidth + consumption."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-load-most-loaded-link { + base objective-function-type; + description + "Objective function for minimizing the load on the link that + is carrying the highest load."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-cost-path-set { + base objective-function-type; + description + "Objective function for minimizing the cost on a path set."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity path-computation-method { + description + "Base identity for supported path computation mechanisms."; + } + + identity path-locally-computed { + base path-computation-method; + description + "Indicates a constrained-path LSP in which the + path is computed by the local LER."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering, Section 5.4"; + } + + identity path-externally-queried { + base path-computation-method; + description + "Constrained-path LSP in which the path is obtained by + querying an external source, such as a PCE server. + In the case that an LSP is defined to be externally queried, + it may also have associated explicit definitions (provided + to the external source to aid computation). The path that is + returned by the external source may require further local + computation on the device."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering + RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity path-explicitly-defined { + base path-computation-method; + description + "Constrained-path LSP in which the path is + explicitly specified as a collection of strict and/or loose + hops."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + + identity lsp-metric-type { + description + "Base identity for the LSP metric specification types."; + } + + identity lsp-metric-relative { + base lsp-metric-type; + description + "The metric specified for the LSPs to which this identity + refers is specified as a value relative to the IGP metric + cost to the LSP's tail end."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity lsp-metric-absolute { + base lsp-metric-type; + description + "The metric specified for the LSPs to which this identity + refers is specified as an absolute value."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity lsp-metric-inherited { + base lsp-metric-type; + description + "The metric for the LSPs to which this identity refers is + not specified explicitly; rather, it is directly inherited + from the IGP cost."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity te-tunnel-type { + description + "Base identity from which specific tunnel types are derived."; + } + + identity te-tunnel-p2p { + base te-tunnel-type; + description + "TE Point-to-Point (P2P) tunnel type."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity te-tunnel-p2mp { + base te-tunnel-type; + description + "TE P2MP tunnel type."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs)"; + } + + identity tunnel-action-type { + description + "Base identity from which specific tunnel action types + are derived."; + } + + identity tunnel-action-resetup { + base tunnel-action-type; + description + "TE tunnel action that tears down the tunnel's current LSP + (if any) and attempts to re-establish a new LSP."; + } + + identity tunnel-action-reoptimize { + base tunnel-action-type; + description + "TE tunnel action that reoptimizes the placement of the + tunnel LSP(s)."; + } + + identity tunnel-action-switchpath { + base tunnel-action-type; + description + "TE tunnel action that switches the tunnel's LSP to use the + specified path."; + } + + identity te-action-result { + description + "Base identity from which specific TE action results + are derived."; + } + + identity te-action-success { + base te-action-result; + description + "TE action was successful."; + } + + identity te-action-fail { + base te-action-result; + description + "TE action failed."; + } + + identity tunnel-action-inprogress { + base te-action-result; + description + "TE action is in progress."; + } + + identity tunnel-admin-state-type { + description + "Base identity for TE tunnel administrative states."; + } + + identity tunnel-admin-state-up { + base tunnel-admin-state-type; + description + "Tunnel's administrative state is up."; + } + + identity tunnel-admin-state-down { + base tunnel-admin-state-type; + description + "Tunnel's administrative state is down."; + } + + identity tunnel-state-type { + description + "Base identity for TE tunnel states."; + } + + identity tunnel-state-up { + base tunnel-state-type; + description + "Tunnel's state is up."; + } + + identity tunnel-state-down { + base tunnel-state-type; + description + "Tunnel's state is down."; + } + + identity lsp-state-type { + description + "Base identity for TE LSP states."; + } + + identity lsp-path-computing { + base lsp-state-type; + description + "State path computation is in progress."; + } + + identity lsp-path-computation-ok { + base lsp-state-type; + description + "State path computation was successful."; + } + + identity lsp-path-computation-failed { + base lsp-state-type; + description + "State path computation failed."; + } + + identity lsp-state-setting-up { + base lsp-state-type; + description + "State is being set up."; + } + + identity lsp-state-setup-ok { + base lsp-state-type; + description + "State setup was successful."; + } + + identity lsp-state-setup-failed { + base lsp-state-type; + description + "State setup failed."; + } + + identity lsp-state-up { + base lsp-state-type; + description + "State is up."; + } + + identity lsp-state-tearing-down { + base lsp-state-type; + description + "State is being torn down."; + } + + identity lsp-state-down { + base lsp-state-type; + description + "State is down."; + } + + identity path-invalidation-action-type { + description + "Base identity for TE path invalidation action types."; + } + + identity path-invalidation-action-drop { + base path-invalidation-action-type; + description + "Upon invalidation of the TE tunnel path, the tunnel remains + valid, but any packet mapped over the tunnel is dropped."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 2.5"; + } + + identity path-invalidation-action-teardown { + base path-invalidation-action-type; + description + "TE path invalidation action teardown."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 2.5"; + } + + identity lsp-restoration-type { + description + "Base identity from which LSP restoration types are derived."; + } + + identity lsp-restoration-restore-any { + base lsp-restoration-type; + description + "Any LSP affected by a failure is restored."; + } + + identity lsp-restoration-restore-all { + base lsp-restoration-type; + description + "Affected LSPs are restored after all LSPs of the tunnel are + broken."; + } + + identity restoration-scheme-type { + description + "Base identity for LSP restoration schemes."; + } + + identity restoration-scheme-preconfigured { + base restoration-scheme-type; + description + "Restoration LSP is preconfigured prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity restoration-scheme-precomputed { + base restoration-scheme-type; + description + "Restoration LSP is precomputed prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity restoration-scheme-presignaled { + base restoration-scheme-type; + description + "Restoration LSP is presignaled prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lsp-protection-type { + description + "Base identity from which LSP protection types are derived."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-unprotected { + base lsp-protection-type; + description + "'Unprotected' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-reroute-extra { + base lsp-protection-type; + description + "'(Full) Rerouting' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-reroute { + base lsp-protection-type; + description + "'Rerouting without Extra-Traffic' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-1-for-n { + base lsp-protection-type; + description + "'1:N Protection with Extra-Traffic' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-1-for-1 { + base lsp-protection-type; + description + "LSP protection '1:1 Protection Type'."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-unidir-1-plus-1 { + base lsp-protection-type; + description + "'1+1 Unidirectional Protection' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-bidir-1-plus-1 { + base lsp-protection-type; + description + "'1+1 Bidirectional Protection' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-extra-traffic { + base lsp-protection-type; + description + "Extra-Traffic LSP protection type."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lsp-protection-state { + description + "Base identity of protection states for reporting purposes."; + } + + identity normal { + base lsp-protection-state; + description + "Normal state."; + } + + identity signal-fail-of-protection { + base lsp-protection-state; + description + "The protection transport entity has a signal fail condition + that is of higher priority than the forced switchover + command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lockout-of-protection { + base lsp-protection-state; + description + "A Loss of Protection (LoP) command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity forced-switch { + base lsp-protection-state; + description + "A forced switchover command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity signal-fail { + base lsp-protection-state; + description + "There is a signal fail condition on either the working path + or the protection path."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity signal-degrade { + base lsp-protection-state; + description + "There is a signal degrade condition on either the working + path or the protection path."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity manual-switch { + base lsp-protection-state; + description + "A manual switchover command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity wait-to-restore { + base lsp-protection-state; + description + "A WTR timer is running."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity do-not-revert { + base lsp-protection-state; + description + "A Do Not Revert (DNR) condition is active because of + non-revertive behavior."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity failure-of-protocol { + base lsp-protection-state; + description + "LSP protection is not working because of a protocol failure + condition."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity protection-external-commands { + description + "Base identity from which protection-related external commands + used for troubleshooting purposes are derived."; + } + + identity action-freeze { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command that prevents any switchover action from being taken + and, as such, freezes the current state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear-freeze { + base protection-external-commands; + description + "An action that clears the active freeze state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-lockout-of-normal { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the normal traffic is not allowed + to use the protection transport entity."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear-lockout-of-normal { + base protection-external-commands; + description + "An action that clears the active lockout of the + normal state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-lockout-of-protection { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the protection transport entity is + temporarily not available to transport a traffic signal + (either normal or Extra-Traffic)."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-forced-switch { + base protection-external-commands; + description + "A switchover action initiated by an operator command to switch + the Extra-Traffic signal, the normal traffic signal, or the + null signal to the protection transport entity, unless a + switchover command of equal or higher priority is in effect."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-manual-switch { + base protection-external-commands; + description + "A switchover action initiated by an operator command to switch + the Extra-Traffic signal, the normal traffic signal, or + the null signal to the protection transport entity, unless + a fault condition exists on other transport entities or a + switchover command of equal or higher priority is in effect."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-exercise { + base protection-external-commands; + description + "An action that starts testing whether or not APS communication + is operating correctly. It is of lower priority than any + other state or command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear { + base protection-external-commands; + description + "An action that clears the active near-end lockout of a + protection, forced switchover, manual switchover, WTR state, + or exercise command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity switching-capabilities { + description + "Base identity for interface switching capabilities."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-psc1 { + base switching-capabilities; + description + "Packet-Switch Capable-1 (PSC-1)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-evpl { + base switching-capabilities; + description + "Ethernet Virtual Private Line (EVPL)."; + reference + "RFC 6004: Generalized MPLS (GMPLS) Support for Metro Ethernet + Forum and G.8011 Ethernet Service Switching"; + } + + identity switching-l2sc { + base switching-capabilities; + description + "Layer-2 Switch Capable (L2SC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-tdm { + base switching-capabilities; + description + "Time-Division-Multiplex Capable (TDM)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-otn { + base switching-capabilities; + description + "OTN-TDM capable."; + reference + "RFC 7138: Traffic Engineering Extensions to OSPF for GMPLS + Control of Evolving G.709 Optical Transport Networks"; + } + + identity switching-dcsc { + base switching-capabilities; + description + "Data Channel Switching Capable (DCSC)."; + reference + "RFC 6002: Generalized MPLS (GMPLS) Data Channel + Switching Capable (DCSC) and Channel Set Label Extensions"; + } + + identity switching-lsc { + base switching-capabilities; + description + "Lambda-Switch Capable (LSC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-fsc { + base switching-capabilities; + description + "Fiber-Switch Capable (FSC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-types { + description + "Base identity for encoding types."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-packet { + base lsp-encoding-types; + description + "Packet LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-ethernet { + base lsp-encoding-types; + description + "Ethernet LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-pdh { + base lsp-encoding-types; + description + "ANSI/ETSI PDH LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-sdh { + base lsp-encoding-types; + description + "SDH ITU-T G.707 / SONET ANSI T1.105 LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-digital-wrapper { + base lsp-encoding-types; + description + "Digital Wrapper LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-lambda { + base lsp-encoding-types; + description + "Lambda (photonic) LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-fiber { + base lsp-encoding-types; + description + "Fiber LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-fiber-channel { + base lsp-encoding-types; + description + "FiberChannel LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-oduk { + base lsp-encoding-types; + description + "G.709 ODUk (Digital Path) LSP encoding."; + reference + "RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Extensions for G.709 Optical Transport Networks + Control"; + } + + identity lsp-encoding-optical-channel { + base lsp-encoding-types; + description + "G.709 Optical Channel LSP encoding."; + reference + "RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Extensions for G.709 Optical Transport Networks + Control"; + } + + identity lsp-encoding-line { + base lsp-encoding-types; + description + "Line (e.g., 8B/10B) LSP encoding."; + reference + "RFC 6004: Generalized MPLS (GMPLS) Support for Metro + Ethernet Forum and G.8011 Ethernet Service Switching"; + } + + identity path-signaling-type { + description + "Base identity from which specific LSP path setup types + are derived."; + } + + identity path-setup-static { + base path-signaling-type; + description + "Static LSP provisioning path setup."; + } + + identity path-setup-rsvp { + base path-signaling-type; + description + "RSVP-TE signaling path setup."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity path-setup-sr { + base path-signaling-type; + description + "Segment-routing path setup."; + } + + identity path-scope-type { + description + "Base identity from which specific path scope types are + derived."; + } + + identity path-scope-segment { + base path-scope-type; + description + "Path scope segment."; + reference + "RFC 4873: GMPLS Segment Recovery"; + } + + identity path-scope-end-to-end { + base path-scope-type; + description + "Path scope end to end."; + reference + "RFC 4873: GMPLS Segment Recovery"; + } + + identity route-usage-type { + description + "Base identity for route usage."; + } + + identity route-include-object { + base route-usage-type; + description + "'Include route' object."; + } + + identity route-exclude-object { + base route-usage-type; + description + "'Exclude route' object."; + reference + "RFC 4874: Exclude Routes - Extension to Resource ReserVation + Protocol-Traffic Engineering (RSVP-TE)"; + } + + identity route-exclude-srlg { + base route-usage-type; + description + "Excludes SRLGs."; + reference + "RFC 4874: Exclude Routes - Extension to Resource ReserVation + Protocol-Traffic Engineering (RSVP-TE)"; + } + + identity path-metric-type { + description + "Base identity for the path metric type."; + } + + identity path-metric-te { + base path-metric-type; + description + "TE path metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + identity path-metric-igp { + base path-metric-type; + description + "IGP path metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + identity path-metric-hop { + base path-metric-type; + description + "Hop path metric."; + } + + identity path-metric-delay-average { + base path-metric-type; + description + "Average unidirectional link delay."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-delay-minimum { + base path-metric-type; + description + "Minimum unidirectional link delay."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-residual-bandwidth { + base path-metric-type; + description + "Unidirectional Residual Bandwidth, which is defined to be + Maximum Bandwidth (RFC 3630) minus the bandwidth currently + allocated to LSPs."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-optimize-includes { + base path-metric-type; + description + "A metric that optimizes the number of included resources + specified in a set."; + } + + identity path-metric-optimize-excludes { + base path-metric-type; + description + "A metric that optimizes to a maximum the number of excluded + resources specified in a set."; + } + + identity path-tiebreaker-type { + description + "Base identity for the path tiebreaker type."; + } + + identity path-tiebreaker-minfill { + base path-tiebreaker-type; + description + "Min-Fill LSP path placement."; + } + + identity path-tiebreaker-maxfill { + base path-tiebreaker-type; + description + "Max-Fill LSP path placement."; + } + + identity path-tiebreaker-random { + base path-tiebreaker-type; + description + "Random LSP path placement."; + } + + identity resource-affinities-type { + description + "Base identity for resource class affinities."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS"; + } + + identity resource-aff-include-all { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, all of which must be present for a link + to be acceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity resource-aff-include-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, any of which must be present for a link + to be acceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity resource-aff-exclude-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, any of which renders a link unacceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity te-optimization-criterion { + description + "Base identity for the TE optimization criteria."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + + identity not-optimized { + base te-optimization-criterion; + description + "Optimization is not applied."; + } + + identity cost { + base te-optimization-criterion; + description + "Optimized on cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity delay { + base te-optimization-criterion; + description + "Optimized on delay."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity path-computation-srlg-type { + description + "Base identity for SRLG path computation."; + } + + identity srlg-ignore { + base path-computation-srlg-type; + description + "Ignores SRLGs in the path computation."; + } + + identity srlg-strict { + base path-computation-srlg-type; + description + "Includes a strict SRLG check in the path computation."; + } + + identity srlg-preferred { + base path-computation-srlg-type; + description + "Includes a preferred SRLG check in the path computation."; + } + + identity srlg-weighted { + base path-computation-srlg-type; + description + "Includes a weighted SRLG check in the path computation."; + } + + /** + * TE bandwidth groupings + **/ + + grouping te-bandwidth { + description + "This grouping defines the generic TE bandwidth. + For some known data-plane technologies, specific modeling + structures are specified. The string-encoded 'te-bandwidth' + type is used for unspecified technologies. + The modeling structure can be augmented later for other + technologies."; + container te-bandwidth { + description + "Container that specifies TE bandwidth. The choices + can be augmented for specific data-plane technologies."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type te-bandwidth; + description + "Bandwidth specified in a generic format."; + } + } + } + } + } + + /** + * TE label groupings + **/ + + grouping te-label { + description + "This grouping defines the generic TE label. + The modeling structure can be augmented for each technology. + For unspecified technologies, 'rt-types:generalized-label' + is used."; + container te-label { + description + "Container that specifies the TE label. The choices can + be augmented for specific data-plane technologies."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type rt-types:generalized-label; + description + "TE label specified in a generic format."; + } + } + } + leaf direction { + type te-label-direction; + default "forward"; + description + "Label direction."; + } + } + } + + grouping te-topology-identifier { + description + "Augmentation for a TE topology."; + container te-topology-identifier { + description + "TE topology identifier container."; + leaf provider-id { + type te-global-id; + default "0"; + description + "An identifier to uniquely identify a provider. + If omitted, it assumes that the topology provider ID + value = 0 (the default)."; + } + leaf client-id { + type te-global-id; + default "0"; + description + "An identifier to uniquely identify a client. + If omitted, it assumes that the topology client ID + value = 0 (the default)."; + } + leaf topology-id { + type te-topology-id; + default ""; + description + "When the datastore contains several topologies, + 'topology-id' distinguishes between them. If omitted, + the default (empty) string for this leaf is assumed."; + } + } + } + + /** + * TE performance metrics groupings + **/ + + grouping performance-metrics-one-way-delay-loss { + description + "Performance Metrics (PM) information in real time that can + be applicable to links or connections. PM defined in this + grouping are applicable to generic TE PM as well as packet TE + PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way delay or latency in microseconds."; + } + leaf one-way-delay-normality { + type te-types:performance-metrics-normality; + description + "One-way delay normality."; + } + } + + grouping performance-metrics-two-way-delay-loss { + description + "PM information in real time that can be applicable to links or + connections. PM defined in this grouping are applicable to + generic TE PM as well as packet TE PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf two-way-delay { + type uint32 { + range "0..16777215"; + } + description + "Two-way delay or latency in microseconds."; + } + leaf two-way-delay-normality { + type te-types:performance-metrics-normality; + description + "Two-way delay normality."; + } + } + + grouping performance-metrics-one-way-bandwidth { + description + "PM information in real time that can be applicable to links. + PM defined in this grouping are applicable to generic TE PM + as well as packet TE PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Residual bandwidth that subtracts tunnel reservations from + Maximum Bandwidth (or link capacity) (RFC 3630) and + provides an aggregated remainder across QoS classes."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + leaf one-way-residual-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Residual bandwidth normality."; + } + leaf one-way-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf one-way-available-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Available bandwidth normality."; + } + leaf one-way-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e., as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth utilizations."; + } + leaf one-way-utilized-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Bandwidth utilization normality."; + } + } + + grouping one-way-performance-metrics { + description + "One-way PM throttle grouping."; + leaf one-way-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way delay or latency in microseconds."; + } + leaf one-way-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Residual bandwidth that subtracts tunnel reservations from + Maximum Bandwidth (or link capacity) (RFC 3630) and + provides an aggregated remainder across QoS classes."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + leaf one-way-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf one-way-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e., as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth utilizations."; + } + } + + grouping two-way-performance-metrics { + description + "Two-way PM throttle grouping."; + leaf two-way-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay or latency in microseconds."; + } + } + + grouping performance-metrics-thresholds { + description + "Grouping for configurable thresholds for measured + attributes."; + uses one-way-performance-metrics; + uses two-way-performance-metrics; + } + + grouping performance-metrics-attributes { + description + "Contains PM attributes."; + container performance-metrics-one-way { + description + "One-way link performance information in real time."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + uses performance-metrics-one-way-delay-loss; + uses performance-metrics-one-way-bandwidth; + } + container performance-metrics-two-way { + description + "Two-way link performance information in real time."; + reference + "RFC 6374: Packet Loss and Delay Measurement for MPLS + Networks"; + uses performance-metrics-two-way-delay-loss; + } + } + + grouping performance-metrics-throttle-container { + description + "Controls PM throttling."; + container throttle { + must 'suppression-interval >= measure-interval' { + error-message "'suppression-interval' cannot be less than " + + "'measure-interval'."; + description + "Constraint on 'suppression-interval' and + 'measure-interval'."; + } + description + "Link performance information in real time."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-delay-offset { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Offset value to be added to the measured delay value."; + } + leaf measure-interval { + type uint32; + default "30"; + description + "Interval, in seconds, to measure the extended metric + values."; + } + leaf advertisement-interval { + type uint32; + default "0"; + description + "Interval, in seconds, to advertise the extended metric + values."; + } + leaf suppression-interval { + type uint32 { + range "1..max"; + } + default "120"; + description + "Interval, in seconds, to suppress advertisement of the + extended metric values."; + reference + "RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 6"; + } + container threshold-out { + uses performance-metrics-thresholds; + description + "If the measured parameter falls outside an upper bound + for all but the minimum-delay metric (or a lower bound + for the minimum-delay metric only) and the advertised + value is not already outside that bound, an 'anomalous' + announcement (anomalous bit set) will be triggered."; + } + container threshold-in { + uses performance-metrics-thresholds; + description + "If the measured parameter falls inside an upper bound + for all but the minimum-delay metric (or a lower bound + for the minimum-delay metric only) and the advertised + value is not already inside that bound, a 'normal' + announcement (anomalous bit cleared) will be triggered."; + } + container threshold-accelerated-advertisement { + description + "When the difference between the last advertised value and + the current measured value exceeds this threshold, an + 'anomalous' announcement (anomalous bit set) will be + triggered."; + uses performance-metrics-thresholds; + } + } + } + + /** + * TE tunnel generic groupings + **/ + + grouping explicit-route-hop { + description + "The explicit route entry grouping."; + choice type { + description + "The explicit route entry type."; + case numbered-node-hop { + container numbered-node-hop { + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + description + "Numbered node route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case numbered-link-hop { + container numbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE Link Termination Point (LTP) identifier."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + leaf direction { + type te-link-direction; + default "outgoing"; + description + "Link route object direction."; + } + description + "Numbered link explicit route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case unnumbered-link-hop { + container unnumbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE LTP identifier. The combination of the TE link ID + and the TE node ID is used to identify an unnumbered + TE link."; + } + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + leaf direction { + type te-link-direction; + default "outgoing"; + description + "Link route object direction."; + } + description + "Unnumbered link explicit route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case as-number { + container as-number-hop { + leaf as-number { + type inet:as-number; + mandatory true; + description + "The Autonomous System (AS) number."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + description + "AS explicit route hop."; + } + } + case label { + container label-hop { + description + "Label hop type."; + uses te-label; + } + description + "The label explicit route hop type."; + } + } + } + + grouping record-route-state { + description + "The Record Route grouping."; + leaf index { + type uint32; + description + "Record Route hop index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + choice type { + description + "The Record Route entry type."; + case numbered-node-hop { + container numbered-node-hop { + description + "Numbered node route hop container."; + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "Numbered node route hop."; + } + case numbered-link-hop { + container numbered-link-hop { + description + "Numbered link route hop container."; + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "Numbered TE LTP identifier."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "Numbered link route hop."; + } + case unnumbered-link-hop { + container unnumbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE LTP identifier. The combination of the TE link ID + and the TE node ID is used to identify an unnumbered + TE link."; + } + leaf node-id { + type te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + description + "Unnumbered link Record Route hop."; + reference + "RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + description + "Unnumbered link route hop."; + } + case label { + container label-hop { + description + "Label route hop type."; + uses te-label; + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "The label Record Route entry types."; + } + } + } + + grouping label-restriction-info { + description + "Label set item information."; + leaf restriction { + type enumeration { + enum inclusive { + description + "The label or label range is inclusive."; + } + enum exclusive { + description + "The label or label range is exclusive."; + } + } + default "inclusive"; + description + "Indicates whether the list item is inclusive or exclusive."; + } + leaf index { + type uint32; + description + "The index of the label restriction list entry."; + } + container label-start { + must "(not(../label-end/te-label/direction) and" + + " not(te-label/direction))" + + " or " + + "(../label-end/te-label/direction = te-label/direction)" + + " or " + + "(not(te-label/direction) and" + + " (../label-end/te-label/direction = 'forward'))" + + " or " + + "(not(../label-end/te-label/direction) and" + + " (te-label/direction = 'forward'))" { + error-message "'label-start' and 'label-end' must have the " + + "same direction."; + } + description + "This is the starting label if a label range is specified. + This is the label value if a single label is specified, + in which case the 'label-end' attribute is not set."; + uses te-label; + } + container label-end { + must "(not(../label-start/te-label/direction) and" + + " not(te-label/direction))" + + " or " + + "(../label-start/te-label/direction = te-label/direction)" + + " or " + + "(not(te-label/direction) and" + + " (../label-start/te-label/direction = 'forward'))" + + " or " + + "(not(../label-start/te-label/direction) and" + + " (te-label/direction = 'forward'))" { + error-message "'label-start' and 'label-end' must have the " + + "same direction."; + } + description + "This is the ending label if a label range is specified. + This attribute is not set if a single label is specified."; + uses te-label; + } + container label-step { + description + "The step increment between labels in the label range. + The label start/end values will have to be consistent + with the sign of label step. For example, + 'label-start' < 'label-end' enforces 'label-step' > 0 + 'label-start' > 'label-end' enforces 'label-step' < 0."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type int32; + default "1"; + description + "Label range step."; + } + } + } + } + leaf range-bitmap { + type yang:hex-string; + description + "When there are gaps between 'label-start' and 'label-end', + this attribute is used to specify the positions + of the used labels. This is represented in big endian as + 'hex-string'. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity. + Each bit position in the 'range-bitmap' 'hex-string' maps + to a label in the range derived from 'label-start'. + + For example, assuming that 'label-start' = 16000 and + 'range-bitmap' = 0x01000001, then: + + - bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. + - bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1."; + } + } + + grouping label-set-info { + description + "Grouping for the list of label restrictions specifying what + labels may or may not be used."; + container label-restrictions { + description + "The label restrictions container."; + list label-restriction { + key "index"; + description + "The absence of the label restrictions container implies + that all labels are acceptable; otherwise, only restricted + labels are available."; + reference + "RFC 7579: General Network Element Constraint Encoding + for GMPLS-Controlled Networks"; + uses label-restriction-info; + } + } + } + + grouping optimization-metric-entry { + description + "Optimization metrics configuration grouping."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "Identifies the 'metric-type' that the path computation + process uses for optimization."; + } + leaf weight { + type uint8; + default "1"; + description + "TE path metric normalization weight."; + } + container explicit-route-exclude-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-excludes'"; + description + "Container for the 'exclude route' object list."; + uses path-route-exclude-objects; + } + container explicit-route-include-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-includes'"; + description + "Container for the 'include route' object list."; + uses path-route-include-objects; + } + } + + grouping common-constraints { + description + "Common constraints grouping that can be set on + a constraint set or directly on the tunnel."; + uses te-bandwidth { + description + "A requested bandwidth to use for path computation."; + } + leaf link-protection { + type identityref { + base link-protection-type; + } + default "te-types:link-protection-unprotected"; + description + "Link protection type required for the links included + in the computed path."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + leaf setup-priority { + type uint8 { + range "0..7"; + } + default "7"; + description + "TE LSP requested setup priority."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf hold-priority { + type uint8 { + range "0..7"; + } + default "7"; + description + "TE LSP requested hold priority."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf signaling-type { + type identityref { + base path-signaling-type; + } + default "te-types:path-setup-rsvp"; + description + "TE tunnel path signaling type."; + } + } + + grouping tunnel-constraints { + description + "Tunnel constraints grouping that can be set on + a constraint set or directly on the tunnel."; + uses te-topology-identifier; + uses common-constraints; + } + + grouping path-constraints-route-objects { + description + "List of route entries to be included or excluded when + performing the path computation."; + container explicit-route-objects-always { + description + "Container for the 'exclude route' object list."; + list route-object-exclude-always { + key "index"; + ordered-by user; + description + "List of route objects to always exclude from the path + computation."; + leaf index { + type uint32; + description + "Explicit Route Object index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop; + } + list route-object-include-exclude { + key "index"; + ordered-by user; + description + "List of route objects to include or exclude in the path + computation."; + leaf explicit-route-usage { + type identityref { + base route-usage-type; + } + default "te-types:route-include-object"; + description + "Indicates whether to include or exclude the + route object. The default is to include it."; + } + leaf index { + type uint32; + description + "Route object include-exclude index. The index is used + to identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description + "SRLG container."; + leaf srlg { + type uint32; + description + "SRLG value."; + } + } + description + "An SRLG value to be included or excluded."; + } + description + "Augmentation for a generic explicit route for SRLG + exclusion."; + } + } + } + } + } + + grouping path-route-include-objects { + description + "List of route objects to be included when performing + the path computation."; + list route-object-include-object { + key "index"; + ordered-by user; + description + "List of Explicit Route Objects to be included in the + path computation."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop; + } + } + + grouping path-route-exclude-objects { + description + "List of route objects to be excluded when performing + the path computation."; + list route-object-exclude-object { + key "index"; + ordered-by user; + description + "List of Explicit Route Objects to be excluded in the + path computation."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description + "SRLG container."; + leaf srlg { + type uint32; + description + "SRLG value."; + } + } + description + "An SRLG value to be included or excluded."; + } + description + "Augmentation for a generic explicit route for SRLG + exclusion."; + } + } + } + } + + grouping generic-path-metric-bounds { + description + "TE path metric bounds grouping."; + container path-metric-bounds { + description + "TE path metric bounds container."; + list path-metric-bound { + key "metric-type"; + description + "List of TE path metric bounds."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "Identifies an entry in the list of 'metric-type' items + bound for the TE path."; + } + leaf upper-bound { + type uint64; + default "0"; + description + "Upper bound on the end-to-end TE path metric. A zero + indicates an unbounded upper limit for the specific + 'metric-type'."; + } + } + } + } + + grouping generic-path-optimization { + description + "TE generic path optimization grouping."; + container optimizations { + description + "The objective function container that includes + attributes to impose when computing a TE path."; + choice algorithm { + description + "Optimizations algorithm."; + case metric { + if-feature "path-optimization-metric"; + /* Optimize by metric */ + list optimization-metric { + key "metric-type"; + description + "TE path metric type."; + uses optimization-metric-entry; + } + /* Tiebreakers */ + container tiebreakers { + description + "Container for the list of tiebreakers."; + list tiebreaker { + key "tiebreaker-type"; + description + "The list of tiebreaker criteria to apply on an + equally favored set of paths, in order to pick + the best."; + leaf tiebreaker-type { + type identityref { + base path-metric-type; + } + description + "Identifies an entry in the list of tiebreakers."; + } + } + } + } + case objective-function { + if-feature "path-optimization-objective-function"; + /* Objective functions */ + container objective-function { + description + "The objective function container that includes + attributes to impose when computing a TE path."; + leaf objective-function-type { + type identityref { + base objective-function-type; + } + default "te-types:of-minimize-cost-path"; + description + "Objective function entry."; + } + } + } + } + } + } + + grouping generic-path-affinities { + description + "Path affinities grouping."; + container path-affinities-values { + description + "Path affinities represented as values."; + list path-affinities-value { + key "usage"; + description + "List of named affinity constraints."; + leaf usage { + type identityref { + base resource-affinities-type; + } + description + "Identifies an entry in the list of value affinity + constraints."; + } + leaf value { + type admin-groups; + default ""; + description + "The affinity value. The default is empty."; + } + } + } + container path-affinity-names { + description + "Path affinities represented as names."; + list path-affinity-name { + key "usage"; + description + "List of named affinity constraints."; + leaf usage { + type identityref { + base resource-affinities-type; + } + description + "Identifies an entry in the list of named affinity + constraints."; + } + list affinity-name { + key "name"; + leaf name { + type string; + description + "Identifies a named affinity entry."; + } + description + "List of named affinities."; + } + } + } + } + + grouping generic-path-srlgs { + description + "Path SRLG grouping."; + container path-srlgs-lists { + description + "Path SRLG properties container."; + list path-srlgs-list { + key "usage"; + description + "List of SRLG values to be included or excluded."; + leaf usage { + type identityref { + base route-usage-type; + } + description + "Identifies an entry in a list of SRLGs to either + include or exclude."; + } + leaf-list values { + type srlg; + description + "List of SRLG values."; + } + } + } + container path-srlgs-names { + description + "Container for the list of named SRLGs."; + list path-srlgs-name { + key "usage"; + description + "List of named SRLGs to be included or excluded."; + leaf usage { + type identityref { + base route-usage-type; + } + description + "Identifies an entry in a list of named SRLGs to either + include or exclude."; + } + leaf-list names { + type string; + description + "List of named SRLGs."; + } + } + } + } + + grouping generic-path-disjointness { + description + "Path disjointness grouping."; + leaf disjointness { + type te-path-disjointness; + description + "The type of resource disjointness. + When configured for a primary path, the disjointness level + applies to all secondary LSPs. When configured for a + secondary path, the disjointness level overrides the level + configured for the primary path."; + } + } + + grouping common-path-constraints-attributes { + description + "Common path constraints configuration grouping."; + uses common-constraints; + uses generic-path-metric-bounds; + uses generic-path-affinities; + uses generic-path-srlgs; + } + + grouping generic-path-constraints { + description + "Global named path constraints configuration grouping."; + container path-constraints { + description + "TE named path constraints container."; + uses common-path-constraints-attributes; + uses generic-path-disjointness; + } + } + + grouping generic-path-properties { + description + "TE generic path properties grouping."; + container path-properties { + config false; + description + "The TE path properties."; + list path-metric { + key "metric-type"; + description + "TE path metric type."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "TE path metric type."; + } + leaf accumulative-value { + type uint64; + description + "TE path metric accumulative value."; + } + } + uses generic-path-affinities; + uses generic-path-srlgs; + container path-route-objects { + description + "Container for the list of route objects either returned by + the computation engine or actually used by an LSP."; + list path-route-object { + key "index"; + ordered-by user; + description + "List of route objects either returned by the computation + engine or actually used by an LSP."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key + values."; + } + uses explicit-route-hop; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-te-types@2020-06-10.yang b/models/ietf/RFC/ietf-te-types@2020-06-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..6fc0544dede2128f3e91f8cf5a39caa8cc49ab6e --- /dev/null +++ b/models/ietf/RFC/ietf-te-types@2020-06-10.yang @@ -0,0 +1,3379 @@ +module ietf-te-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-types"; + prefix te-types; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + + Editor: Tarek Saad + <mailto:tsaad@juniper.net> + + Editor: Rakesh Gandhi + <mailto:rgandhi@cisco.com> + + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Igor Bryskin + <mailto:i_bryskin@yahoo.com>"; + description + "This YANG module contains a collection of generally useful + YANG data type definitions specific to TE. The model fully + conforms to the Network Management Datastore Architecture + (NMDA). + + 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. + + Copyright (c) 2020 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 Simplified 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 8776; see the + RFC itself for full legal notices."; + + revision 2020-06-10 { + description + "Latest revision of TE types."; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + /** + * Typedefs + */ + + typedef admin-group { + type yang:hex-string { + /* 01:02:03:04 */ + length "1..11"; + } + description + "Administrative group / resource class / color representation + in 'hex-string' type. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering + RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + typedef admin-groups { + type union { + type admin-group; + type extended-admin-group; + } + description + "Derived types for TE administrative groups."; + } + + typedef extended-admin-group { + type yang:hex-string; + description + "Extended administrative group / resource class / color + representation in 'hex-string' type. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity."; + reference + "RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + typedef path-attribute-flags { + type union { + type identityref { + base session-attributes-flags; + } + type identityref { + base lsp-attributes-flags; + } + } + description + "Path attributes flags type."; + } + + typedef performance-metrics-normality { + type enumeration { + enum unknown { + value 0; + description + "Unknown."; + } + enum normal { + value 1; + description + "Normal. Indicates that the anomalous bit is not set."; + } + enum abnormal { + value 2; + description + "Abnormal. Indicates that the anomalous bit is set."; + } + } + description + "Indicates whether a performance metric is normal (anomalous + bit not set), abnormal (anomalous bit set), or unknown."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + } + + typedef srlg { + type uint32; + description + "SRLG type."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS) + RFC 5307: IS-IS Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + } + + typedef te-common-status { + type enumeration { + enum up { + description + "Enabled."; + } + enum down { + description + "Disabled."; + } + enum testing { + description + "In some test mode."; + } + enum preparing-maintenance { + description + "The resource is disabled in the control plane to prepare + for a graceful shutdown for maintenance purposes."; + reference + "RFC 5817: Graceful Shutdown in MPLS and Generalized MPLS + Traffic Engineering Networks"; + } + enum maintenance { + description + "The resource is disabled in the data plane for maintenance + purposes."; + } + enum unknown { + description + "Status is unknown."; + } + } + description + "Defines a type representing the common states of a TE + resource."; + } + + typedef te-bandwidth { + type string { + pattern '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?' + + '[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+' + + '(,(0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?' + + '[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+))*'; + } + description + "This is the generic bandwidth type. It is a string containing + a list of numbers separated by commas, where each of these + numbers can be non-negative decimal, hex integer, or + hex float: + + (dec | hex | float)[*(','(dec | hex | float))] + + For the packet-switching type, the string encoding follows + the type 'bandwidth-ieee-float32' as defined in RFC 8294 + (e.g., 0x1p10), where the units are in bytes per second. + + For the Optical Transport Network (OTN) switching type, + a list of integers can be used, such as '0,2,3,1', indicating + two ODU0s and one ODU3. ('ODU' stands for 'Optical Data + Unit'.) For Dense Wavelength Division Multiplexing (DWDM), + a list of pairs of slot numbers and widths can be used, + such as '0,2,3,3', indicating a frequency slot 0 with + slot width 2 and a frequency slot 3 with slot width 3. + Canonically, the string is represented as all lowercase and in + hex, where the prefix '0x' precedes the hex number."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area + ITU-T Recommendation G.709: Interfaces for the + optical transport network"; + } + + typedef te-ds-class { + type uint8 { + range "0..7"; + } + description + "The Differentiated Services Class-Type of traffic."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering, Section 4.3.1"; + } + + typedef te-global-id { + type uint32; + description + "An identifier to uniquely identify an operator, which can be + either a provider or a client. + The definition of this type is taken from RFCs 6370 and 5003. + This attribute type is used solely to provide a globally + unique context for TE topologies."; + reference + "RFC 5003: Attachment Individual Identifier (AII) Types for + Aggregation + RFC 6370: MPLS Transport Profile (MPLS-TP) Identifiers"; + } + + typedef te-hop-type { + type enumeration { + enum loose { + description + "A loose hop in an explicit path."; + } + enum strict { + description + "A strict hop in an explicit path."; + } + } + description + "Enumerated type for specifying loose or strict paths."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3.3"; + } + + typedef te-link-access-type { + type enumeration { + enum point-to-point { + description + "The link is point-to-point."; + } + enum multi-access { + description + "The link is multi-access, including broadcast and NBMA."; + } + } + description + "Defines a type representing the access type of a TE link."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + + typedef te-label-direction { + type enumeration { + enum forward { + description + "Label allocated for the forward LSP direction."; + } + enum reverse { + description + "Label allocated for the reverse LSP direction."; + } + } + description + "Enumerated type for specifying the forward or reverse + label."; + } + + typedef te-link-direction { + type enumeration { + enum incoming { + description + "The explicit route represents an incoming link on + a node."; + } + enum outgoing { + description + "The explicit route represents an outgoing link on + a node."; + } + } + description + "Enumerated type for specifying the direction of a link on + a node."; + } + + typedef te-metric { + type uint32; + description + "TE metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + typedef te-node-id { + type yang:dotted-quad; + description + "A type representing the identifier for a node in a TE + topology. + The identifier is represented as 4 octets in dotted-quad + notation. + This attribute MAY be mapped to the Router Address TLV + described in Section 2.4.1 of RFC 3630, the TE Router ID + described in Section 3 of RFC 6827, the Traffic Engineering + Router ID TLV described in Section 4.3 of RFC 5305, or the + TE Router ID TLV described in Section 3.2.1 of RFC 6119. + The reachability of such a TE node MAY be achieved by a + mechanism such as that described in Section 6.2 of RFC 6827."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2, Section 2.4.1 + RFC 5305: IS-IS Extensions for Traffic Engineering, + Section 4.3 + RFC 6119: IPv6 Traffic Engineering in IS-IS, Section 3.2.1 + RFC 6827: Automatically Switched Optical Network (ASON) + Routing for OSPFv2 Protocols, Section 3"; + } + + typedef te-oper-status { + type te-common-status; + description + "Defines a type representing the operational status of + a TE resource."; + } + + typedef te-admin-status { + type te-common-status; + description + "Defines a type representing the administrative status of + a TE resource."; + } + + typedef te-path-disjointness { + type bits { + bit node { + position 0; + description + "Node disjoint."; + } + bit link { + position 1; + description + "Link disjoint."; + } + bit srlg { + position 2; + description + "SRLG (Shared Risk Link Group) disjoint."; + } + } + description + "Type of the resource disjointness for a TE tunnel path."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + typedef te-recovery-status { + type enumeration { + enum normal { + description + "Both the recovery span and the working span are fully + allocated and active, data traffic is being + transported over (or selected from) the working + span, and no trigger events are reported."; + } + enum recovery-started { + description + "The recovery action has been started but not completed."; + } + enum recovery-succeeded { + description + "The recovery action has succeeded. The working span has + reported a failure/degrade condition, and the user traffic + is being transported (or selected) on the recovery span."; + } + enum recovery-failed { + description + "The recovery action has failed."; + } + enum reversion-started { + description + "The reversion has started."; + } + enum reversion-succeeded { + description + "The reversion action has succeeded."; + } + enum reversion-failed { + description + "The reversion has failed."; + } + enum recovery-unavailable { + description + "The recovery is unavailable, as a result of either an + operator's lockout command or a failure condition + detected on the recovery span."; + } + enum recovery-admin { + description + "The operator has issued a command to switch the user + traffic to the recovery span."; + } + enum wait-to-restore { + description + "The recovery domain is recovering from a failure/degrade + condition on the working span that is being controlled by + the Wait-to-Restore (WTR) timer."; + } + } + description + "Defines the status of a recovery action."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS) + RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection"; + } + + typedef te-template-name { + type string { + pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + description + "A type for the name of a TE node template or TE link + template."; + } + + typedef te-topology-event-type { + type enumeration { + enum add { + value 0; + description + "A TE node or TE link has been added."; + } + enum remove { + value 1; + description + "A TE node or TE link has been removed."; + } + enum update { + value 2; + description + "A TE node or TE link has been updated."; + } + } + description + "TE event type for notifications."; + } + + typedef te-topology-id { + type union { + type string { + length "0"; + // empty string + } + type string { + pattern '([a-zA-Z0-9\-_.]+:)*' + + '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + } + description + "An identifier for a topology. + It is optional to have one or more prefixes at the beginning, + separated by colons. The prefixes can be 'network-types' as + defined in the 'ietf-network' module in RFC 8345, to help the + user better understand the topology before further inquiry + is made."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef te-tp-id { + type union { + type uint32; + // Unnumbered + type inet:ip-address; + // IPv4 or IPv6 address + } + description + "An identifier for a TE link endpoint on a node. + This attribute is mapped to a local or remote link identifier + as defined in RFCs 3630 and 5305."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + + /* TE features */ + + feature p2mp-te { + description + "Indicates support for Point-to-Multipoint TE (P2MP-TE)."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs)"; + } + + feature frr-te { + description + "Indicates support for TE Fast Reroute (FRR)."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + feature extended-admin-groups { + description + "Indicates support for TE link extended administrative + groups."; + reference + "RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + feature named-path-affinities { + description + "Indicates support for named path affinities."; + } + + feature named-extended-admin-groups { + description + "Indicates support for named extended administrative groups."; + } + + feature named-srlg-groups { + description + "Indicates support for named SRLG groups."; + } + + feature named-path-constraints { + description + "Indicates support for named path constraints."; + } + + feature path-optimization-metric { + description + "Indicates support for path optimization metrics."; + } + + feature path-optimization-objective-function { + description + "Indicates support for path optimization objective functions."; + } + + /* + * Identities + */ + + identity session-attributes-flags { + description + "Base identity for the RSVP-TE session attributes flags."; + } + + identity local-protection-desired { + base session-attributes-flags; + description + "Local protection is desired."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.7.1"; + } + + identity se-style-desired { + base session-attributes-flags; + description + "Shared explicit style, to allow the LSP to be established + and share resources with the old LSP."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity local-recording-desired { + base session-attributes-flags; + description + "Label recording is desired."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.7.1"; + } + + identity bandwidth-protection-desired { + base session-attributes-flags; + description + "Requests FRR bandwidth protection on LSRs, if present."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + identity node-protection-desired { + base session-attributes-flags; + description + "Requests FRR node protection on LSRs, if present."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + identity path-reevaluation-request { + base session-attributes-flags; + description + "This flag indicates that a path re-evaluation (of the + current path in use) is requested. Note that this does + not trigger any LSP reroutes but instead just signals a + request to evaluate whether a preferable path exists."; + reference + "RFC 4736: Reoptimization of Multiprotocol Label Switching + (MPLS) Traffic Engineering (TE) Loosely Routed Label Switched + Path (LSP)"; + } + + identity soft-preemption-desired { + base session-attributes-flags; + description + "Soft preemption of LSP resources is desired."; + reference + "RFC 5712: MPLS Traffic Engineering Soft Preemption"; + } + + identity lsp-attributes-flags { + description + "Base identity for LSP attributes flags."; + } + + identity end-to-end-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates end-to-end rerouting behavior for an LSP + undergoing establishment. This MAY also be used to + specify the behavior of end-to-end LSP recovery for + established LSPs."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity boundary-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates boundary rerouting behavior for an LSP undergoing + establishment. This MAY also be used to specify + segment-based LSP recovery through nested crankback for + established LSPs. The boundary Area Border Router (ABR) / + Autonomous System Border Router (ASBR) can decide to forward + the PathErr message upstream to either an upstream boundary + ABR/ASBR or the ingress LSR. Alternatively, it can try to + select another egress boundary LSR."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity segment-based-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates segment-based rerouting behavior for an LSP + undergoing establishment. This MAY also be used to specify + segment-based LSP recovery for established LSPs."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity lsp-integrity-required { + base lsp-attributes-flags; + description + "Indicates that LSP integrity is required."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity contiguous-lsp-desired { + base lsp-attributes-flags; + description + "Indicates that a contiguous LSP is desired."; + reference + "RFC 5151: Inter-Domain MPLS and GMPLS Traffic Engineering -- + Resource Reservation Protocol-Traffic Engineering (RSVP-TE) + Extensions + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity lsp-stitching-desired { + base lsp-attributes-flags; + description + "Indicates that LSP stitching is desired."; + reference + "RFC 5150: Label Switched Path Stitching with Generalized + Multiprotocol Label Switching Traffic Engineering (GMPLS TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity pre-planned-lsp-flag { + base lsp-attributes-flags; + description + "Indicates that the LSP MUST be provisioned in the + control plane only."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions for + Multi-Layer and Multi-Region Networks (MLN/MRN) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity non-php-behavior-flag { + base lsp-attributes-flags; + description + "Indicates that non-PHP (non-Penultimate Hop Popping) behavior + for the LSP is desired."; + reference + "RFC 6511: Non-Penultimate Hop Popping Behavior and Out-of-Band + Mapping for RSVP-TE Label Switched Paths + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity oob-mapping-flag { + base lsp-attributes-flags; + description + "Indicates that signaling of the egress binding information is + out of band (e.g., via the Border Gateway Protocol (BGP))."; + reference + "RFC 6511: Non-Penultimate Hop Popping Behavior and Out-of-Band + Mapping for RSVP-TE Label Switched Paths + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity entropy-label-capability { + base lsp-attributes-flags; + description + "Indicates entropy label capability."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity oam-mep-entity-desired { + base lsp-attributes-flags; + description + "OAM Maintenance Entity Group End Point (MEP) entities + desired."; + reference + "RFC 7260: GMPLS RSVP-TE Extensions for Operations, + Administration, and Maintenance (OAM) Configuration"; + } + + identity oam-mip-entity-desired { + base lsp-attributes-flags; + description + "OAM Maintenance Entity Group Intermediate Points (MIP) + entities desired."; + reference + "RFC 7260: GMPLS RSVP-TE Extensions for Operations, + Administration, and Maintenance (OAM) Configuration"; + } + + identity srlg-collection-desired { + base lsp-attributes-flags; + description + "SRLG collection desired."; + reference + "RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO) + RFC 8001: RSVP-TE Extensions for Collecting Shared Risk + Link Group (SRLG) Information"; + } + + identity loopback-desired { + base lsp-attributes-flags; + description + "This flag indicates that a particular node on the LSP is + required to enter loopback mode. This can also be + used to specify the loopback state of the node."; + reference + "RFC 7571: GMPLS RSVP-TE Extensions for Lock Instruct and + Loopback"; + } + + identity p2mp-te-tree-eval-request { + base lsp-attributes-flags; + description + "P2MP-TE tree re-evaluation request."; + reference + "RFC 8149: RSVP Extensions for Reoptimization of Loosely Routed + Point-to-Multipoint Traffic Engineering Label Switched Paths + (LSPs)"; + } + + identity rtm-set-desired { + base lsp-attributes-flags; + description + "Residence Time Measurement (RTM) attribute flag requested."; + reference + "RFC 8169: Residence Time Measurement in MPLS Networks"; + } + + identity link-protection-type { + description + "Base identity for the link protection type."; + } + + identity link-protection-unprotected { + base link-protection-type; + description + "Unprotected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-extra-traffic { + base link-protection-type; + description + "Extra-Traffic protected link type."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity link-protection-shared { + base link-protection-type; + description + "Shared protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-1-for-1 { + base link-protection-type; + description + "One-for-one (1:1) protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-1-plus-1 { + base link-protection-type; + description + "One-plus-one (1+1) protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-enhanced { + base link-protection-type; + description + "A compound link protection type derived from the underlay + TE tunnel protection configuration supporting the TE link."; + } + + identity association-type { + description + "Base identity for the tunnel association."; + } + + identity association-type-recovery { + base association-type; + description + "Association type for recovery, used to associate LSPs of the + same tunnel for recovery."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery + RFC 6780: RSVP ASSOCIATION Object Extensions"; + } + + identity association-type-resource-sharing { + base association-type; + description + "Association type for resource sharing, used to enable + resource sharing during make-before-break."; + reference + "RFC 4873: GMPLS Segment Recovery + RFC 6780: RSVP ASSOCIATION Object Extensions"; + } + + identity association-type-double-sided-bidir { + base association-type; + description + "Association type for double-sided bidirectional LSPs, + used to associate two LSPs of two tunnels that are + independently configured on either endpoint."; + reference + "RFC 7551: RSVP-TE Extensions for Associated Bidirectional + Label Switched Paths (LSPs)"; + } + + identity association-type-single-sided-bidir { + base association-type; + description + "Association type for single-sided bidirectional LSPs, + used to associate two LSPs of two tunnels, where one + tunnel is configured on one side/endpoint and the other + tunnel is dynamically created on the other endpoint."; + reference + "RFC 6780: RSVP ASSOCIATION Object Extensions + RFC 7551: RSVP-TE Extensions for Associated Bidirectional + Label Switched Paths (LSPs)"; + } + + identity objective-function-type { + description + "Base objective function type."; + } + + identity of-minimize-cost-path { + base objective-function-type; + description + "Objective function for minimizing path cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-load-path { + base objective-function-type; + description + "Objective function for minimizing the load on one or more + paths."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-maximize-residual-bandwidth { + base objective-function-type; + description + "Objective function for maximizing residual bandwidth."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-agg-bandwidth-consumption { + base objective-function-type; + description + "Objective function for minimizing aggregate bandwidth + consumption."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-load-most-loaded-link { + base objective-function-type; + description + "Objective function for minimizing the load on the link that + is carrying the highest load."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-cost-path-set { + base objective-function-type; + description + "Objective function for minimizing the cost on a path set."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity path-computation-method { + description + "Base identity for supported path computation mechanisms."; + } + + identity path-locally-computed { + base path-computation-method; + description + "Indicates a constrained-path LSP in which the + path is computed by the local LER."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering, Section 5.4"; + } + + identity path-externally-queried { + base path-computation-method; + description + "Constrained-path LSP in which the path is obtained by + querying an external source, such as a PCE server. + In the case that an LSP is defined to be externally queried, + it may also have associated explicit definitions (provided + to the external source to aid computation). The path that is + returned by the external source may require further local + computation on the device."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering + RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity path-explicitly-defined { + base path-computation-method; + description + "Constrained-path LSP in which the path is + explicitly specified as a collection of strict and/or loose + hops."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + + identity lsp-metric-type { + description + "Base identity for the LSP metric specification types."; + } + + identity lsp-metric-relative { + base lsp-metric-type; + description + "The metric specified for the LSPs to which this identity + refers is specified as a value relative to the IGP metric + cost to the LSP's tail end."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity lsp-metric-absolute { + base lsp-metric-type; + description + "The metric specified for the LSPs to which this identity + refers is specified as an absolute value."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity lsp-metric-inherited { + base lsp-metric-type; + description + "The metric for the LSPs to which this identity refers is + not specified explicitly; rather, it is directly inherited + from the IGP cost."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity te-tunnel-type { + description + "Base identity from which specific tunnel types are derived."; + } + + identity te-tunnel-p2p { + base te-tunnel-type; + description + "TE Point-to-Point (P2P) tunnel type."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity te-tunnel-p2mp { + base te-tunnel-type; + description + "TE P2MP tunnel type."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs)"; + } + + identity tunnel-action-type { + description + "Base identity from which specific tunnel action types + are derived."; + } + + identity tunnel-action-resetup { + base tunnel-action-type; + description + "TE tunnel action that tears down the tunnel's current LSP + (if any) and attempts to re-establish a new LSP."; + } + + identity tunnel-action-reoptimize { + base tunnel-action-type; + description + "TE tunnel action that reoptimizes the placement of the + tunnel LSP(s)."; + } + + identity tunnel-action-switchpath { + base tunnel-action-type; + description + "TE tunnel action that switches the tunnel's LSP to use the + specified path."; + } + + identity te-action-result { + description + "Base identity from which specific TE action results + are derived."; + } + + identity te-action-success { + base te-action-result; + description + "TE action was successful."; + } + + identity te-action-fail { + base te-action-result; + description + "TE action failed."; + } + + identity tunnel-action-inprogress { + base te-action-result; + description + "TE action is in progress."; + } + + identity tunnel-admin-state-type { + description + "Base identity for TE tunnel administrative states."; + } + + identity tunnel-admin-state-up { + base tunnel-admin-state-type; + description + "Tunnel's administrative state is up."; + } + + identity tunnel-admin-state-down { + base tunnel-admin-state-type; + description + "Tunnel's administrative state is down."; + } + + identity tunnel-state-type { + description + "Base identity for TE tunnel states."; + } + + identity tunnel-state-up { + base tunnel-state-type; + description + "Tunnel's state is up."; + } + + identity tunnel-state-down { + base tunnel-state-type; + description + "Tunnel's state is down."; + } + + identity lsp-state-type { + description + "Base identity for TE LSP states."; + } + + identity lsp-path-computing { + base lsp-state-type; + description + "State path computation is in progress."; + } + + identity lsp-path-computation-ok { + base lsp-state-type; + description + "State path computation was successful."; + } + + identity lsp-path-computation-failed { + base lsp-state-type; + description + "State path computation failed."; + } + + identity lsp-state-setting-up { + base lsp-state-type; + description + "State is being set up."; + } + + identity lsp-state-setup-ok { + base lsp-state-type; + description + "State setup was successful."; + } + + identity lsp-state-setup-failed { + base lsp-state-type; + description + "State setup failed."; + } + + identity lsp-state-up { + base lsp-state-type; + description + "State is up."; + } + + identity lsp-state-tearing-down { + base lsp-state-type; + description + "State is being torn down."; + } + + identity lsp-state-down { + base lsp-state-type; + description + "State is down."; + } + + identity path-invalidation-action-type { + description + "Base identity for TE path invalidation action types."; + } + + identity path-invalidation-action-drop { + base path-invalidation-action-type; + description + "Upon invalidation of the TE tunnel path, the tunnel remains + valid, but any packet mapped over the tunnel is dropped."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 2.5"; + } + + identity path-invalidation-action-teardown { + base path-invalidation-action-type; + description + "TE path invalidation action teardown."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 2.5"; + } + + identity lsp-restoration-type { + description + "Base identity from which LSP restoration types are derived."; + } + + identity lsp-restoration-restore-any { + base lsp-restoration-type; + description + "Any LSP affected by a failure is restored."; + } + + identity lsp-restoration-restore-all { + base lsp-restoration-type; + description + "Affected LSPs are restored after all LSPs of the tunnel are + broken."; + } + + identity restoration-scheme-type { + description + "Base identity for LSP restoration schemes."; + } + + identity restoration-scheme-preconfigured { + base restoration-scheme-type; + description + "Restoration LSP is preconfigured prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity restoration-scheme-precomputed { + base restoration-scheme-type; + description + "Restoration LSP is precomputed prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity restoration-scheme-presignaled { + base restoration-scheme-type; + description + "Restoration LSP is presignaled prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lsp-protection-type { + description + "Base identity from which LSP protection types are derived."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-unprotected { + base lsp-protection-type; + description + "'Unprotected' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-reroute-extra { + base lsp-protection-type; + description + "'(Full) Rerouting' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-reroute { + base lsp-protection-type; + description + "'Rerouting without Extra-Traffic' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-1-for-n { + base lsp-protection-type; + description + "'1:N Protection with Extra-Traffic' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-1-for-1 { + base lsp-protection-type; + description + "LSP protection '1:1 Protection Type'."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-unidir-1-plus-1 { + base lsp-protection-type; + description + "'1+1 Unidirectional Protection' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-bidir-1-plus-1 { + base lsp-protection-type; + description + "'1+1 Bidirectional Protection' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-extra-traffic { + base lsp-protection-type; + description + "Extra-Traffic LSP protection type."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lsp-protection-state { + description + "Base identity of protection states for reporting purposes."; + } + + identity normal { + base lsp-protection-state; + description + "Normal state."; + } + + identity signal-fail-of-protection { + base lsp-protection-state; + description + "The protection transport entity has a signal fail condition + that is of higher priority than the forced switchover + command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lockout-of-protection { + base lsp-protection-state; + description + "A Loss of Protection (LoP) command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity forced-switch { + base lsp-protection-state; + description + "A forced switchover command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity signal-fail { + base lsp-protection-state; + description + "There is a signal fail condition on either the working path + or the protection path."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity signal-degrade { + base lsp-protection-state; + description + "There is a signal degrade condition on either the working + path or the protection path."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity manual-switch { + base lsp-protection-state; + description + "A manual switchover command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity wait-to-restore { + base lsp-protection-state; + description + "A WTR timer is running."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity do-not-revert { + base lsp-protection-state; + description + "A Do Not Revert (DNR) condition is active because of + non-revertive behavior."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity failure-of-protocol { + base lsp-protection-state; + description + "LSP protection is not working because of a protocol failure + condition."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity protection-external-commands { + description + "Base identity from which protection-related external commands + used for troubleshooting purposes are derived."; + } + + identity action-freeze { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command that prevents any switchover action from being taken + and, as such, freezes the current state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear-freeze { + base protection-external-commands; + description + "An action that clears the active freeze state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-lockout-of-normal { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the normal traffic is not allowed + to use the protection transport entity."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear-lockout-of-normal { + base protection-external-commands; + description + "An action that clears the active lockout of the + normal state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-lockout-of-protection { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the protection transport entity is + temporarily not available to transport a traffic signal + (either normal or Extra-Traffic)."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-forced-switch { + base protection-external-commands; + description + "A switchover action initiated by an operator command to switch + the Extra-Traffic signal, the normal traffic signal, or the + null signal to the protection transport entity, unless a + switchover command of equal or higher priority is in effect."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-manual-switch { + base protection-external-commands; + description + "A switchover action initiated by an operator command to switch + the Extra-Traffic signal, the normal traffic signal, or + the null signal to the protection transport entity, unless + a fault condition exists on other transport entities or a + switchover command of equal or higher priority is in effect."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-exercise { + base protection-external-commands; + description + "An action that starts testing whether or not APS communication + is operating correctly. It is of lower priority than any + other state or command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear { + base protection-external-commands; + description + "An action that clears the active near-end lockout of a + protection, forced switchover, manual switchover, WTR state, + or exercise command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity switching-capabilities { + description + "Base identity for interface switching capabilities."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-psc1 { + base switching-capabilities; + description + "Packet-Switch Capable-1 (PSC-1)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-evpl { + base switching-capabilities; + description + "Ethernet Virtual Private Line (EVPL)."; + reference + "RFC 6004: Generalized MPLS (GMPLS) Support for Metro Ethernet + Forum and G.8011 Ethernet Service Switching"; + } + + identity switching-l2sc { + base switching-capabilities; + description + "Layer-2 Switch Capable (L2SC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-tdm { + base switching-capabilities; + description + "Time-Division-Multiplex Capable (TDM)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-otn { + base switching-capabilities; + description + "OTN-TDM capable."; + reference + "RFC 7138: Traffic Engineering Extensions to OSPF for GMPLS + Control of Evolving G.709 Optical Transport Networks"; + } + + identity switching-dcsc { + base switching-capabilities; + description + "Data Channel Switching Capable (DCSC)."; + reference + "RFC 6002: Generalized MPLS (GMPLS) Data Channel + Switching Capable (DCSC) and Channel Set Label Extensions"; + } + + identity switching-lsc { + base switching-capabilities; + description + "Lambda-Switch Capable (LSC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-fsc { + base switching-capabilities; + description + "Fiber-Switch Capable (FSC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-types { + description + "Base identity for encoding types."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-packet { + base lsp-encoding-types; + description + "Packet LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-ethernet { + base lsp-encoding-types; + description + "Ethernet LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-pdh { + base lsp-encoding-types; + description + "ANSI/ETSI PDH LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-sdh { + base lsp-encoding-types; + description + "SDH ITU-T G.707 / SONET ANSI T1.105 LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-digital-wrapper { + base lsp-encoding-types; + description + "Digital Wrapper LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-lambda { + base lsp-encoding-types; + description + "Lambda (photonic) LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-fiber { + base lsp-encoding-types; + description + "Fiber LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-fiber-channel { + base lsp-encoding-types; + description + "FiberChannel LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-oduk { + base lsp-encoding-types; + description + "G.709 ODUk (Digital Path) LSP encoding."; + reference + "RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Extensions for G.709 Optical Transport Networks + Control"; + } + + identity lsp-encoding-optical-channel { + base lsp-encoding-types; + description + "G.709 Optical Channel LSP encoding."; + reference + "RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Extensions for G.709 Optical Transport Networks + Control"; + } + + identity lsp-encoding-line { + base lsp-encoding-types; + description + "Line (e.g., 8B/10B) LSP encoding."; + reference + "RFC 6004: Generalized MPLS (GMPLS) Support for Metro + Ethernet Forum and G.8011 Ethernet Service Switching"; + } + + identity path-signaling-type { + description + "Base identity from which specific LSP path setup types + are derived."; + } + + identity path-setup-static { + base path-signaling-type; + description + "Static LSP provisioning path setup."; + } + + identity path-setup-rsvp { + base path-signaling-type; + description + "RSVP-TE signaling path setup."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity path-setup-sr { + base path-signaling-type; + description + "Segment-routing path setup."; + } + + identity path-scope-type { + description + "Base identity from which specific path scope types are + derived."; + } + + identity path-scope-segment { + base path-scope-type; + description + "Path scope segment."; + reference + "RFC 4873: GMPLS Segment Recovery"; + } + + identity path-scope-end-to-end { + base path-scope-type; + description + "Path scope end to end."; + reference + "RFC 4873: GMPLS Segment Recovery"; + } + + identity route-usage-type { + description + "Base identity for route usage."; + } + + identity route-include-object { + base route-usage-type; + description + "'Include route' object."; + } + + identity route-exclude-object { + base route-usage-type; + description + "'Exclude route' object."; + reference + "RFC 4874: Exclude Routes - Extension to Resource ReserVation + Protocol-Traffic Engineering (RSVP-TE)"; + } + + identity route-exclude-srlg { + base route-usage-type; + description + "Excludes SRLGs."; + reference + "RFC 4874: Exclude Routes - Extension to Resource ReserVation + Protocol-Traffic Engineering (RSVP-TE)"; + } + + identity path-metric-type { + description + "Base identity for the path metric type."; + } + + identity path-metric-te { + base path-metric-type; + description + "TE path metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + identity path-metric-igp { + base path-metric-type; + description + "IGP path metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + identity path-metric-hop { + base path-metric-type; + description + "Hop path metric."; + } + + identity path-metric-delay-average { + base path-metric-type; + description + "Average unidirectional link delay."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-delay-minimum { + base path-metric-type; + description + "Minimum unidirectional link delay."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-residual-bandwidth { + base path-metric-type; + description + "Unidirectional Residual Bandwidth, which is defined to be + Maximum Bandwidth (RFC 3630) minus the bandwidth currently + allocated to LSPs."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-optimize-includes { + base path-metric-type; + description + "A metric that optimizes the number of included resources + specified in a set."; + } + + identity path-metric-optimize-excludes { + base path-metric-type; + description + "A metric that optimizes to a maximum the number of excluded + resources specified in a set."; + } + + identity path-tiebreaker-type { + description + "Base identity for the path tiebreaker type."; + } + + identity path-tiebreaker-minfill { + base path-tiebreaker-type; + description + "Min-Fill LSP path placement."; + } + + identity path-tiebreaker-maxfill { + base path-tiebreaker-type; + description + "Max-Fill LSP path placement."; + } + + identity path-tiebreaker-random { + base path-tiebreaker-type; + description + "Random LSP path placement."; + } + + identity resource-affinities-type { + description + "Base identity for resource class affinities."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS"; + } + + identity resource-aff-include-all { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, all of which must be present for a link + to be acceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity resource-aff-include-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, any of which must be present for a link + to be acceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity resource-aff-exclude-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, any of which renders a link unacceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity te-optimization-criterion { + description + "Base identity for the TE optimization criteria."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + + identity not-optimized { + base te-optimization-criterion; + description + "Optimization is not applied."; + } + + identity cost { + base te-optimization-criterion; + description + "Optimized on cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity delay { + base te-optimization-criterion; + description + "Optimized on delay."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity path-computation-srlg-type { + description + "Base identity for SRLG path computation."; + } + + identity srlg-ignore { + base path-computation-srlg-type; + description + "Ignores SRLGs in the path computation."; + } + + identity srlg-strict { + base path-computation-srlg-type; + description + "Includes a strict SRLG check in the path computation."; + } + + identity srlg-preferred { + base path-computation-srlg-type; + description + "Includes a preferred SRLG check in the path computation."; + } + + identity srlg-weighted { + base path-computation-srlg-type; + description + "Includes a weighted SRLG check in the path computation."; + } + + /** + * TE bandwidth groupings + **/ + + grouping te-bandwidth { + description + "This grouping defines the generic TE bandwidth. + For some known data-plane technologies, specific modeling + structures are specified. The string-encoded 'te-bandwidth' + type is used for unspecified technologies. + The modeling structure can be augmented later for other + technologies."; + container te-bandwidth { + description + "Container that specifies TE bandwidth. The choices + can be augmented for specific data-plane technologies."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type te-bandwidth; + description + "Bandwidth specified in a generic format."; + } + } + } + } + } + + /** + * TE label groupings + **/ + + grouping te-label { + description + "This grouping defines the generic TE label. + The modeling structure can be augmented for each technology. + For unspecified technologies, 'rt-types:generalized-label' + is used."; + container te-label { + description + "Container that specifies the TE label. The choices can + be augmented for specific data-plane technologies."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type rt-types:generalized-label; + description + "TE label specified in a generic format."; + } + } + } + leaf direction { + type te-label-direction; + default "forward"; + description + "Label direction."; + } + } + } + + grouping te-topology-identifier { + description + "Augmentation for a TE topology."; + container te-topology-identifier { + description + "TE topology identifier container."; + leaf provider-id { + type te-global-id; + default "0"; + description + "An identifier to uniquely identify a provider. + If omitted, it assumes that the topology provider ID + value = 0 (the default)."; + } + leaf client-id { + type te-global-id; + default "0"; + description + "An identifier to uniquely identify a client. + If omitted, it assumes that the topology client ID + value = 0 (the default)."; + } + leaf topology-id { + type te-topology-id; + default ""; + description + "When the datastore contains several topologies, + 'topology-id' distinguishes between them. If omitted, + the default (empty) string for this leaf is assumed."; + } + } + } + + /** + * TE performance metrics groupings + **/ + + grouping performance-metrics-one-way-delay-loss { + description + "Performance Metrics (PM) information in real time that can + be applicable to links or connections. PM defined in this + grouping are applicable to generic TE PM as well as packet TE + PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way delay or latency in microseconds."; + } + leaf one-way-delay-normality { + type te-types:performance-metrics-normality; + description + "One-way delay normality."; + } + } + + grouping performance-metrics-two-way-delay-loss { + description + "PM information in real time that can be applicable to links or + connections. PM defined in this grouping are applicable to + generic TE PM as well as packet TE PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf two-way-delay { + type uint32 { + range "0..16777215"; + } + description + "Two-way delay or latency in microseconds."; + } + leaf two-way-delay-normality { + type te-types:performance-metrics-normality; + description + "Two-way delay normality."; + } + } + + grouping performance-metrics-one-way-bandwidth { + description + "PM information in real time that can be applicable to links. + PM defined in this grouping are applicable to generic TE PM + as well as packet TE PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Residual bandwidth that subtracts tunnel reservations from + Maximum Bandwidth (or link capacity) (RFC 3630) and + provides an aggregated remainder across QoS classes."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + leaf one-way-residual-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Residual bandwidth normality."; + } + leaf one-way-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf one-way-available-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Available bandwidth normality."; + } + leaf one-way-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e., as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth utilizations."; + } + leaf one-way-utilized-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Bandwidth utilization normality."; + } + } + + grouping one-way-performance-metrics { + description + "One-way PM throttle grouping."; + leaf one-way-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way delay or latency in microseconds."; + } + leaf one-way-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Residual bandwidth that subtracts tunnel reservations from + Maximum Bandwidth (or link capacity) (RFC 3630) and + provides an aggregated remainder across QoS classes."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + leaf one-way-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf one-way-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e., as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth utilizations."; + } + } + + grouping two-way-performance-metrics { + description + "Two-way PM throttle grouping."; + leaf two-way-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay or latency in microseconds."; + } + } + + grouping performance-metrics-thresholds { + description + "Grouping for configurable thresholds for measured + attributes."; + uses one-way-performance-metrics; + uses two-way-performance-metrics; + } + + grouping performance-metrics-attributes { + description + "Contains PM attributes."; + container performance-metrics-one-way { + description + "One-way link performance information in real time."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + uses performance-metrics-one-way-delay-loss; + uses performance-metrics-one-way-bandwidth; + } + container performance-metrics-two-way { + description + "Two-way link performance information in real time."; + reference + "RFC 6374: Packet Loss and Delay Measurement for MPLS + Networks"; + uses performance-metrics-two-way-delay-loss; + } + } + + grouping performance-metrics-throttle-container { + description + "Controls PM throttling."; + container throttle { + must 'suppression-interval >= measure-interval' { + error-message "'suppression-interval' cannot be less than " + + "'measure-interval'."; + description + "Constraint on 'suppression-interval' and + 'measure-interval'."; + } + description + "Link performance information in real time."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-delay-offset { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Offset value to be added to the measured delay value."; + } + leaf measure-interval { + type uint32; + default "30"; + description + "Interval, in seconds, to measure the extended metric + values."; + } + leaf advertisement-interval { + type uint32; + default "0"; + description + "Interval, in seconds, to advertise the extended metric + values."; + } + leaf suppression-interval { + type uint32 { + range "1..max"; + } + default "120"; + description + "Interval, in seconds, to suppress advertisement of the + extended metric values."; + reference + "RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 6"; + } + container threshold-out { + uses performance-metrics-thresholds; + description + "If the measured parameter falls outside an upper bound + for all but the minimum-delay metric (or a lower bound + for the minimum-delay metric only) and the advertised + value is not already outside that bound, an 'anomalous' + announcement (anomalous bit set) will be triggered."; + } + container threshold-in { + uses performance-metrics-thresholds; + description + "If the measured parameter falls inside an upper bound + for all but the minimum-delay metric (or a lower bound + for the minimum-delay metric only) and the advertised + value is not already inside that bound, a 'normal' + announcement (anomalous bit cleared) will be triggered."; + } + container threshold-accelerated-advertisement { + description + "When the difference between the last advertised value and + the current measured value exceeds this threshold, an + 'anomalous' announcement (anomalous bit set) will be + triggered."; + uses performance-metrics-thresholds; + } + } + } + + /** + * TE tunnel generic groupings + **/ + + grouping explicit-route-hop { + description + "The explicit route entry grouping."; + choice type { + description + "The explicit route entry type."; + case numbered-node-hop { + container numbered-node-hop { + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + description + "Numbered node route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case numbered-link-hop { + container numbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE Link Termination Point (LTP) identifier."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + leaf direction { + type te-link-direction; + default "outgoing"; + description + "Link route object direction."; + } + description + "Numbered link explicit route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case unnumbered-link-hop { + container unnumbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE LTP identifier. The combination of the TE link ID + and the TE node ID is used to identify an unnumbered + TE link."; + } + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + leaf direction { + type te-link-direction; + default "outgoing"; + description + "Link route object direction."; + } + description + "Unnumbered link explicit route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case as-number { + container as-number-hop { + leaf as-number { + type inet:as-number; + mandatory true; + description + "The Autonomous System (AS) number."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + description + "AS explicit route hop."; + } + } + case label { + container label-hop { + description + "Label hop type."; + uses te-label; + } + description + "The label explicit route hop type."; + } + } + } + + grouping record-route-state { + description + "The Record Route grouping."; + leaf index { + type uint32; + description + "Record Route hop index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + choice type { + description + "The Record Route entry type."; + case numbered-node-hop { + container numbered-node-hop { + description + "Numbered node route hop container."; + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "Numbered node route hop."; + } + case numbered-link-hop { + container numbered-link-hop { + description + "Numbered link route hop container."; + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "Numbered TE LTP identifier."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "Numbered link route hop."; + } + case unnumbered-link-hop { + container unnumbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE LTP identifier. The combination of the TE link ID + and the TE node ID is used to identify an unnumbered + TE link."; + } + leaf node-id { + type te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + description + "Unnumbered link Record Route hop."; + reference + "RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + description + "Unnumbered link route hop."; + } + case label { + container label-hop { + description + "Label route hop type."; + uses te-label; + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "The label Record Route entry types."; + } + } + } + + grouping label-restriction-info { + description + "Label set item information."; + leaf restriction { + type enumeration { + enum inclusive { + description + "The label or label range is inclusive."; + } + enum exclusive { + description + "The label or label range is exclusive."; + } + } + default "inclusive"; + description + "Indicates whether the list item is inclusive or exclusive."; + } + leaf index { + type uint32; + description + "The index of the label restriction list entry."; + } + container label-start { + must "(not(../label-end/te-label/direction) and" + + " not(te-label/direction))" + + " or " + + "(../label-end/te-label/direction = te-label/direction)" + + " or " + + "(not(te-label/direction) and" + + " (../label-end/te-label/direction = 'forward'))" + + " or " + + "(not(../label-end/te-label/direction) and" + + " (te-label/direction = 'forward'))" { + error-message "'label-start' and 'label-end' must have the " + + "same direction."; + } + description + "This is the starting label if a label range is specified. + This is the label value if a single label is specified, + in which case the 'label-end' attribute is not set."; + uses te-label; + } + container label-end { + must "(not(../label-start/te-label/direction) and" + + " not(te-label/direction))" + + " or " + + "(../label-start/te-label/direction = te-label/direction)" + + " or " + + "(not(te-label/direction) and" + + " (../label-start/te-label/direction = 'forward'))" + + " or " + + "(not(../label-start/te-label/direction) and" + + " (te-label/direction = 'forward'))" { + error-message "'label-start' and 'label-end' must have the " + + "same direction."; + } + description + "This is the ending label if a label range is specified. + This attribute is not set if a single label is specified."; + uses te-label; + } + container label-step { + description + "The step increment between labels in the label range. + The label start/end values will have to be consistent + with the sign of label step. For example, + 'label-start' < 'label-end' enforces 'label-step' > 0 + 'label-start' > 'label-end' enforces 'label-step' < 0."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type int32; + default "1"; + description + "Label range step."; + } + } + } + } + leaf range-bitmap { + type yang:hex-string; + description + "When there are gaps between 'label-start' and 'label-end', + this attribute is used to specify the positions + of the used labels. This is represented in big endian as + 'hex-string'. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity. + Each bit position in the 'range-bitmap' 'hex-string' maps + to a label in the range derived from 'label-start'. + + For example, assuming that 'label-start' = 16000 and + 'range-bitmap' = 0x01000001, then: + + - bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. + - bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1."; + } + } + + grouping label-set-info { + description + "Grouping for the list of label restrictions specifying what + labels may or may not be used."; + container label-restrictions { + description + "The label restrictions container."; + list label-restriction { + key "index"; + description + "The absence of the label restrictions container implies + that all labels are acceptable; otherwise, only restricted + labels are available."; + reference + "RFC 7579: General Network Element Constraint Encoding + for GMPLS-Controlled Networks"; + uses label-restriction-info; + } + } + } + + grouping optimization-metric-entry { + description + "Optimization metrics configuration grouping."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "Identifies the 'metric-type' that the path computation + process uses for optimization."; + } + leaf weight { + type uint8; + default "1"; + description + "TE path metric normalization weight."; + } + container explicit-route-exclude-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-excludes'"; + description + "Container for the 'exclude route' object list."; + uses path-route-exclude-objects; + } + container explicit-route-include-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-includes'"; + description + "Container for the 'include route' object list."; + uses path-route-include-objects; + } + } + + grouping common-constraints { + description + "Common constraints grouping that can be set on + a constraint set or directly on the tunnel."; + uses te-bandwidth { + description + "A requested bandwidth to use for path computation."; + } + leaf link-protection { + type identityref { + base link-protection-type; + } + default "te-types:link-protection-unprotected"; + description + "Link protection type required for the links included + in the computed path."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + leaf setup-priority { + type uint8 { + range "0..7"; + } + default "7"; + description + "TE LSP requested setup priority."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf hold-priority { + type uint8 { + range "0..7"; + } + default "7"; + description + "TE LSP requested hold priority."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf signaling-type { + type identityref { + base path-signaling-type; + } + default "te-types:path-setup-rsvp"; + description + "TE tunnel path signaling type."; + } + } + + grouping tunnel-constraints { + description + "Tunnel constraints grouping that can be set on + a constraint set or directly on the tunnel."; + uses te-topology-identifier; + uses common-constraints; + } + + grouping path-constraints-route-objects { + description + "List of route entries to be included or excluded when + performing the path computation."; + container explicit-route-objects-always { + description + "Container for the 'exclude route' object list."; + list route-object-exclude-always { + key "index"; + ordered-by user; + description + "List of route objects to always exclude from the path + computation."; + leaf index { + type uint32; + description + "Explicit Route Object index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop; + } + list route-object-include-exclude { + key "index"; + ordered-by user; + description + "List of route objects to include or exclude in the path + computation."; + leaf explicit-route-usage { + type identityref { + base route-usage-type; + } + default "te-types:route-include-object"; + description + "Indicates whether to include or exclude the + route object. The default is to include it."; + } + leaf index { + type uint32; + description + "Route object include-exclude index. The index is used + to identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description + "SRLG container."; + leaf srlg { + type uint32; + description + "SRLG value."; + } + } + description + "An SRLG value to be included or excluded."; + } + description + "Augmentation for a generic explicit route for SRLG + exclusion."; + } + } + } + } + } + + grouping path-route-include-objects { + description + "List of route objects to be included when performing + the path computation."; + list route-object-include-object { + key "index"; + ordered-by user; + description + "List of Explicit Route Objects to be included in the + path computation."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop; + } + } + + grouping path-route-exclude-objects { + description + "List of route objects to be excluded when performing + the path computation."; + list route-object-exclude-object { + key "index"; + ordered-by user; + description + "List of Explicit Route Objects to be excluded in the + path computation."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description + "SRLG container."; + leaf srlg { + type uint32; + description + "SRLG value."; + } + } + description + "An SRLG value to be included or excluded."; + } + description + "Augmentation for a generic explicit route for SRLG + exclusion."; + } + } + } + } + + grouping generic-path-metric-bounds { + description + "TE path metric bounds grouping."; + container path-metric-bounds { + description + "TE path metric bounds container."; + list path-metric-bound { + key "metric-type"; + description + "List of TE path metric bounds."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "Identifies an entry in the list of 'metric-type' items + bound for the TE path."; + } + leaf upper-bound { + type uint64; + default "0"; + description + "Upper bound on the end-to-end TE path metric. A zero + indicates an unbounded upper limit for the specific + 'metric-type'."; + } + } + } + } + + grouping generic-path-optimization { + description + "TE generic path optimization grouping."; + container optimizations { + description + "The objective function container that includes + attributes to impose when computing a TE path."; + choice algorithm { + description + "Optimizations algorithm."; + case metric { + if-feature "path-optimization-metric"; + /* Optimize by metric */ + list optimization-metric { + key "metric-type"; + description + "TE path metric type."; + uses optimization-metric-entry; + } + /* Tiebreakers */ + container tiebreakers { + description + "Container for the list of tiebreakers."; + list tiebreaker { + key "tiebreaker-type"; + description + "The list of tiebreaker criteria to apply on an + equally favored set of paths, in order to pick + the best."; + leaf tiebreaker-type { + type identityref { + base path-metric-type; + } + description + "Identifies an entry in the list of tiebreakers."; + } + } + } + } + case objective-function { + if-feature "path-optimization-objective-function"; + /* Objective functions */ + container objective-function { + description + "The objective function container that includes + attributes to impose when computing a TE path."; + leaf objective-function-type { + type identityref { + base objective-function-type; + } + default "te-types:of-minimize-cost-path"; + description + "Objective function entry."; + } + } + } + } + } + } + + grouping generic-path-affinities { + description + "Path affinities grouping."; + container path-affinities-values { + description + "Path affinities represented as values."; + list path-affinities-value { + key "usage"; + description + "List of named affinity constraints."; + leaf usage { + type identityref { + base resource-affinities-type; + } + description + "Identifies an entry in the list of value affinity + constraints."; + } + leaf value { + type admin-groups; + default ""; + description + "The affinity value. The default is empty."; + } + } + } + container path-affinity-names { + description + "Path affinities represented as names."; + list path-affinity-name { + key "usage"; + description + "List of named affinity constraints."; + leaf usage { + type identityref { + base resource-affinities-type; + } + description + "Identifies an entry in the list of named affinity + constraints."; + } + list affinity-name { + key "name"; + leaf name { + type string; + description + "Identifies a named affinity entry."; + } + description + "List of named affinities."; + } + } + } + } + + grouping generic-path-srlgs { + description + "Path SRLG grouping."; + container path-srlgs-lists { + description + "Path SRLG properties container."; + list path-srlgs-list { + key "usage"; + description + "List of SRLG values to be included or excluded."; + leaf usage { + type identityref { + base route-usage-type; + } + description + "Identifies an entry in a list of SRLGs to either + include or exclude."; + } + leaf-list values { + type srlg; + description + "List of SRLG values."; + } + } + } + container path-srlgs-names { + description + "Container for the list of named SRLGs."; + list path-srlgs-name { + key "usage"; + description + "List of named SRLGs to be included or excluded."; + leaf usage { + type identityref { + base route-usage-type; + } + description + "Identifies an entry in a list of named SRLGs to either + include or exclude."; + } + leaf-list names { + type string; + description + "List of named SRLGs."; + } + } + } + } + + grouping generic-path-disjointness { + description + "Path disjointness grouping."; + leaf disjointness { + type te-path-disjointness; + description + "The type of resource disjointness. + When configured for a primary path, the disjointness level + applies to all secondary LSPs. When configured for a + secondary path, the disjointness level overrides the level + configured for the primary path."; + } + } + + grouping common-path-constraints-attributes { + description + "Common path constraints configuration grouping."; + uses common-constraints; + uses generic-path-metric-bounds; + uses generic-path-affinities; + uses generic-path-srlgs; + } + + grouping generic-path-constraints { + description + "Global named path constraints configuration grouping."; + container path-constraints { + description + "TE named path constraints container."; + uses common-path-constraints-attributes; + uses generic-path-disjointness; + } + } + + grouping generic-path-properties { + description + "TE generic path properties grouping."; + container path-properties { + config false; + description + "The TE path properties."; + list path-metric { + key "metric-type"; + description + "TE path metric type."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "TE path metric type."; + } + leaf accumulative-value { + type uint64; + description + "TE path metric accumulative value."; + } + } + uses generic-path-affinities; + uses generic-path-srlgs; + container path-route-objects { + description + "Container for the list of route objects either returned by + the computation engine or actually used by an LSP."; + list path-route-object { + key "index"; + ordered-by user; + description + "List of route objects either returned by the computation + engine or actually used by an LSP."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key + values."; + } + uses explicit-route-hop; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-template.yang b/models/ietf/RFC/ietf-template.yang new file mode 100644 index 0000000000000000000000000000000000000000..89b34a9c3adb52f05229ff3f1ff9d2710bcf1167 --- /dev/null +++ b/models/ietf/RFC/ietf-template.yang @@ -0,0 +1,73 @@ +module ietf-template { + yang-version 1.1; + + // replace this string with a unique namespace URN value + + namespace "urn:ietf:params:xml:ns:yang:ietf-template"; + + // replace this string, and try to pick a unique prefix + + prefix temp; + + // import statements here: e.g., + // import ietf-yang-types { prefix yang; } + // import ietf-inet-types { prefix inet; } + // identify the IETF working group if applicable + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + // update this contact statement with your info + + contact + "WG Web: <http://datatracker.ietf.org/wg/your-wg-name/> + WG List: <mailto:your-wg-name@ietf.org> + + Editor: your-name + <mailto:your-email@example.com>"; + + // replace the first sentence in this description statement. + // replace the copyright notice with the most recent + // version, if it has been updated since the publication + // of this document + + description + "This module defines a template for other YANG modules. + + Copyright (c) <insert year> 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove + // this note + + // replace '2016-03-20' with the module publication date + // the format is (year-month-day) + + revision 2016-03-20 { + description + "what changed in this revision"; + reference "RFC XXXX: <Replace With Document Title>"; + } + + // extension statements + // feature statements + // identity statements + // typedef statements + // grouping statements + // data definition statements + // augment statements + // rpc statements + // notification statements + // DO NOT put deviation statements in a published module +} diff --git a/models/ietf/RFC/ietf-template@2010-05-18.yang b/models/ietf/RFC/ietf-template@2010-05-18.yang new file mode 100644 index 0000000000000000000000000000000000000000..873b9957f53143232d1b77cec11c0c0fc05674c3 --- /dev/null +++ b/models/ietf/RFC/ietf-template@2010-05-18.yang @@ -0,0 +1,83 @@ +module ietf-template { + + // replace this string with a unique namespace URN value + namespace + "urn:ietf:params:xml:ns:yang:ietf-template"; + + // replace this string, and try to pick a unique prefix + prefix "temp"; + + // import statements here: e.g., + // import ietf-yang-types { prefix yang; } + // import ietf-inet-types { prefix inet; } + + // identify the IETF working group if applicable + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + // update this contact statement with your info + contact + "WG Web: <http://tools.ietf.org/wg/your-wg-name/> + WG List: <mailto:your-wg-name@ietf.org> + + WG Chair: your-WG-chair + <mailto:your-WG-chair@example.com> + + Editor: your-name + <mailto:your-email@example.com>"; + + // replace the first sentence in this description statement. + // replace the copyright notice with the most recent + // version, if it has been updated since the publication + // of this document + description + "This module defines a template for other YANG modules. + + Copyright (c) <insert year> 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this note + + reference "RFC XXXX"; + + // RFC Ed.: remove this note + // Note: extracted from RFC 6087 + + // replace '2010-05-18' with the module publication date + // The format is (year-month-day) + revision "2010-05-18" { + description + "Initial version"; + } + + // extension statements + + // feature statements + + // identity statements + + // typedef statements + + // grouping statements + + // data definition statements + + // augment statements + + // rpc statements + + // notification statements + + // DO NOT put deviation statements in a published module + +} diff --git a/models/ietf/RFC/ietf-template@2016-03-20.yang b/models/ietf/RFC/ietf-template@2016-03-20.yang new file mode 100644 index 0000000000000000000000000000000000000000..89b34a9c3adb52f05229ff3f1ff9d2710bcf1167 --- /dev/null +++ b/models/ietf/RFC/ietf-template@2016-03-20.yang @@ -0,0 +1,73 @@ +module ietf-template { + yang-version 1.1; + + // replace this string with a unique namespace URN value + + namespace "urn:ietf:params:xml:ns:yang:ietf-template"; + + // replace this string, and try to pick a unique prefix + + prefix temp; + + // import statements here: e.g., + // import ietf-yang-types { prefix yang; } + // import ietf-inet-types { prefix inet; } + // identify the IETF working group if applicable + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + // update this contact statement with your info + + contact + "WG Web: <http://datatracker.ietf.org/wg/your-wg-name/> + WG List: <mailto:your-wg-name@ietf.org> + + Editor: your-name + <mailto:your-email@example.com>"; + + // replace the first sentence in this description statement. + // replace the copyright notice with the most recent + // version, if it has been updated since the publication + // of this document + + description + "This module defines a template for other YANG modules. + + Copyright (c) <insert year> 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove + // this note + + // replace '2016-03-20' with the module publication date + // the format is (year-month-day) + + revision 2016-03-20 { + description + "what changed in this revision"; + reference "RFC XXXX: <Replace With Document Title>"; + } + + // extension statements + // feature statements + // identity statements + // typedef statements + // grouping statements + // data definition statements + // augment statements + // rpc statements + // notification statements + // DO NOT put deviation statements in a published module +} diff --git a/models/ietf/RFC/ietf-voucher-request.yang b/models/ietf/RFC/ietf-voucher-request.yang new file mode 100644 index 0000000000000000000000000000000000000000..c999dac250e2880086d8dac3af47dfd54c6bfdb3 --- /dev/null +++ b/models/ietf/RFC/ietf-voucher-request.yang @@ -0,0 +1,167 @@ +module ietf-voucher-request { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-voucher-request"; + prefix vcr; + + import ietf-restconf { + prefix rc; + description + "This import statement is only present to access + the yang-data extension defined in RFC 8040."; + reference + "RFC 8040: RESTCONF Protocol"; + } + import ietf-voucher { + prefix vch; + description + "This module defines the format for a voucher, + which is produced by a pledge's manufacturer or + delegate (MASA) to securely assign a pledge to + an 'owner', so that the pledge may establish a secure + connection to the owner's network infrastructure."; + reference + "RFC 8366: A Voucher Artifact for + Bootstrapping Protocols"; + } + + organization + "IETF ANIMA Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/anima/> + WG List: <mailto:anima@ietf.org> + Author: Kent Watsen + <mailto:kent+ietf@watsen.net> + Author: Michael H. Behringer + <mailto:Michael.H.Behringer@gmail.com> + Author: Toerless Eckert + <mailto:tte+ietf@cs.fau.de> + Author: Max Pritikin + <mailto:pritikin@cisco.com> + Author: Michael Richardson + <mailto:mcr+ietf@sandelman.ca>"; + description + "This module defines the format for a voucher-request. + It is a superset of the voucher itself. + It provides content to the MASA for consideration + during a voucher-request. + + 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. + + Copyright (c) 2021 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 Simplified 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 8995; see the + RFC itself for full legal notices."; + + revision 2021-05-20 { + description + "Initial version"; + reference + "RFC 8995: Bootstrapping Remote Secure Key Infrastructure + (BRSKI)"; + } + + // Top-level statement + rc:yang-data voucher-request-artifact { + uses voucher-request-grouping; + } + + // Grouping defined for future usage + + grouping voucher-request-grouping { + description + "Grouping to allow reuse/extensions in future work."; + uses vch:voucher-artifact-grouping { + refine "voucher/created-on" { + mandatory false; + } + refine "voucher/pinned-domain-cert" { + mandatory false; + description + "A pinned-domain-cert field is not valid in a + voucher-request, and any occurrence MUST be ignored."; + } + refine "voucher/last-renewal-date" { + description + "A last-renewal-date field is not valid in a + voucher-request, and any occurrence MUST be ignored."; + } + refine "voucher/domain-cert-revocation-checks" { + description + "The domain-cert-revocation-checks field is not valid in a + voucher-request, and any occurrence MUST be ignored."; + } + refine "voucher/assertion" { + mandatory false; + description + "Any assertion included in registrar voucher-requests + SHOULD be ignored by the MASA."; + } + augment "voucher" { + description + "Adds leaf nodes appropriate for requesting vouchers."; + leaf prior-signed-voucher-request { + type binary; + description + "If it is necessary to change a voucher, or re-sign and + forward a voucher that was previously provided along a + protocol path, then the previously signed voucher SHOULD + be included in this field. + + For example, a pledge might sign a voucher-request + with a proximity-registrar-cert, and the registrar + then includes it as the prior-signed-voucher-request + field. This is a simple mechanism for a chain of + trusted parties to change a voucher-request, while + maintaining the prior signature information. + + The registrar and MASA MAY examine the prior-signed + voucher information for the + purposes of policy decisions. For example, this + information could be useful to a MASA to determine + that both the pledge and registrar agree on proximity + assertions. The MASA SHOULD remove all + prior-signed-voucher-request information when + signing a voucher for imprinting so as to minimize + the final voucher size."; + } + leaf proximity-registrar-cert { + type binary; + description + "An X.509 v3 certificate structure, as specified by + RFC 5280, Section 4, encoded using the ASN.1 + distinguished encoding rules (DER), as specified + in ITU X.690. + + The first certificate in the registrar TLS server + certificate_list sequence (the end-entity TLS + certificate; see RFC 8446) presented by the registrar + to the pledge. This MUST be populated in a pledge's + voucher-request when a proximity assertion is + requested."; + reference + "ITU X.690: Information Technology - ASN.1 encoding + rules: Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER) + RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation List (CRL) + Profile + RFC 8446: The Transport Layer Security (TLS) + Protocol Version 1.3"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-voucher-request@2021-05-20.yang b/models/ietf/RFC/ietf-voucher-request@2021-05-20.yang new file mode 100644 index 0000000000000000000000000000000000000000..c999dac250e2880086d8dac3af47dfd54c6bfdb3 --- /dev/null +++ b/models/ietf/RFC/ietf-voucher-request@2021-05-20.yang @@ -0,0 +1,167 @@ +module ietf-voucher-request { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-voucher-request"; + prefix vcr; + + import ietf-restconf { + prefix rc; + description + "This import statement is only present to access + the yang-data extension defined in RFC 8040."; + reference + "RFC 8040: RESTCONF Protocol"; + } + import ietf-voucher { + prefix vch; + description + "This module defines the format for a voucher, + which is produced by a pledge's manufacturer or + delegate (MASA) to securely assign a pledge to + an 'owner', so that the pledge may establish a secure + connection to the owner's network infrastructure."; + reference + "RFC 8366: A Voucher Artifact for + Bootstrapping Protocols"; + } + + organization + "IETF ANIMA Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/anima/> + WG List: <mailto:anima@ietf.org> + Author: Kent Watsen + <mailto:kent+ietf@watsen.net> + Author: Michael H. Behringer + <mailto:Michael.H.Behringer@gmail.com> + Author: Toerless Eckert + <mailto:tte+ietf@cs.fau.de> + Author: Max Pritikin + <mailto:pritikin@cisco.com> + Author: Michael Richardson + <mailto:mcr+ietf@sandelman.ca>"; + description + "This module defines the format for a voucher-request. + It is a superset of the voucher itself. + It provides content to the MASA for consideration + during a voucher-request. + + 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. + + Copyright (c) 2021 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 Simplified 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 8995; see the + RFC itself for full legal notices."; + + revision 2021-05-20 { + description + "Initial version"; + reference + "RFC 8995: Bootstrapping Remote Secure Key Infrastructure + (BRSKI)"; + } + + // Top-level statement + rc:yang-data voucher-request-artifact { + uses voucher-request-grouping; + } + + // Grouping defined for future usage + + grouping voucher-request-grouping { + description + "Grouping to allow reuse/extensions in future work."; + uses vch:voucher-artifact-grouping { + refine "voucher/created-on" { + mandatory false; + } + refine "voucher/pinned-domain-cert" { + mandatory false; + description + "A pinned-domain-cert field is not valid in a + voucher-request, and any occurrence MUST be ignored."; + } + refine "voucher/last-renewal-date" { + description + "A last-renewal-date field is not valid in a + voucher-request, and any occurrence MUST be ignored."; + } + refine "voucher/domain-cert-revocation-checks" { + description + "The domain-cert-revocation-checks field is not valid in a + voucher-request, and any occurrence MUST be ignored."; + } + refine "voucher/assertion" { + mandatory false; + description + "Any assertion included in registrar voucher-requests + SHOULD be ignored by the MASA."; + } + augment "voucher" { + description + "Adds leaf nodes appropriate for requesting vouchers."; + leaf prior-signed-voucher-request { + type binary; + description + "If it is necessary to change a voucher, or re-sign and + forward a voucher that was previously provided along a + protocol path, then the previously signed voucher SHOULD + be included in this field. + + For example, a pledge might sign a voucher-request + with a proximity-registrar-cert, and the registrar + then includes it as the prior-signed-voucher-request + field. This is a simple mechanism for a chain of + trusted parties to change a voucher-request, while + maintaining the prior signature information. + + The registrar and MASA MAY examine the prior-signed + voucher information for the + purposes of policy decisions. For example, this + information could be useful to a MASA to determine + that both the pledge and registrar agree on proximity + assertions. The MASA SHOULD remove all + prior-signed-voucher-request information when + signing a voucher for imprinting so as to minimize + the final voucher size."; + } + leaf proximity-registrar-cert { + type binary; + description + "An X.509 v3 certificate structure, as specified by + RFC 5280, Section 4, encoded using the ASN.1 + distinguished encoding rules (DER), as specified + in ITU X.690. + + The first certificate in the registrar TLS server + certificate_list sequence (the end-entity TLS + certificate; see RFC 8446) presented by the registrar + to the pledge. This MUST be populated in a pledge's + voucher-request when a proximity assertion is + requested."; + reference + "ITU X.690: Information Technology - ASN.1 encoding + rules: Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER) + RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation List (CRL) + Profile + RFC 8446: The Transport Layer Security (TLS) + Protocol Version 1.3"; + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-voucher.yang b/models/ietf/RFC/ietf-voucher.yang new file mode 100644 index 0000000000000000000000000000000000000000..4307b23b7f900c861d3c8786955ce7d1db7d8dc5 --- /dev/null +++ b/models/ietf/RFC/ietf-voucher.yang @@ -0,0 +1,232 @@ +module ietf-voucher { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-voucher"; + prefix vch; + + import ietf-yang-types { + prefix yang; + reference "RFC 6991: Common YANG Data Types"; + } + import ietf-restconf { + prefix rc; + description + "This import statement is only present to access + the yang-data extension defined in RFC 8040."; + reference "RFC 8040: RESTCONF Protocol"; + } + + organization + "IETF ANIMA Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/anima/> + WG List: <mailto:anima@ietf.org> + Author: Kent Watsen + <mailto:kwatsen@juniper.net> + Author: Max Pritikin + <mailto:pritikin@cisco.com> + Author: Michael Richardson + <mailto:mcr+ietf@sandelman.ca> + Author: Toerless Eckert + <mailto:tte+ietf@cs.fau.de>"; + description + "This module defines the format for a voucher, which is produced by + a pledge's manufacturer or delegate (MASA) to securely assign a + pledge to an 'owner', so that the pledge may establish a secure + connection to the owner's network infrastructure. + + 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. + + Copyright (c) 2018 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 Simplified 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 8366; see the RFC + itself for full legal notices."; + + revision 2018-05-09 { + description + "Initial version"; + reference "RFC 8366: Voucher Profile for Bootstrapping Protocols"; + } + + // Top-level statement + rc:yang-data voucher-artifact { + uses voucher-artifact-grouping; + } + + // Grouping defined for future augmentations + + grouping voucher-artifact-grouping { + description + "Grouping to allow reuse/extensions in future work."; + container voucher { + + description + "A voucher assigns a pledge to an owner (pinned-domain-cert)."; + leaf created-on { + type yang:date-and-time; + mandatory true; + description + "A value indicating the date this voucher was created. This + node is primarily for human consumption and auditing. Future + work MAY create verification requirements based on this + node."; + } + leaf expires-on { + type yang:date-and-time; + must 'not(../nonce)'; + description + "A value indicating when this voucher expires. The node is + optional as not all pledges support expirations, such as + pledges lacking a reliable clock. + + If this field exists, then the pledges MUST ensure that + the expires-on time has not yet passed. A pledge without + an accurate clock cannot meet this requirement. + + The expires-on value MUST NOT exceed the expiration date + of any of the listed 'pinned-domain-cert' certificates."; + } + leaf assertion { + type enumeration { + enum verified { + description + "Indicates that the ownership has been positively + verified by the MASA (e.g., through sales channel + integration)."; + } + enum logged { + description + "Indicates that the voucher has been issued after + minimal verification of ownership or control. The + issuance has been logged for detection of + potential security issues (e.g., recipients of + vouchers might verify for themselves that unexpected + vouchers are not in the log). This is similar to + unsecured trust-on-first-use principles but with the + logging providing a basis for detecting unexpected + events."; + } + enum proximity { + + description + "Indicates that the voucher has been issued after + the MASA verified a proximity proof provided by the + device and target domain. The issuance has been logged + for detection of potential security issues. This is + stronger than just logging, because it requires some + verification that the pledge and owner are + in communication but is still dependent on analysis of + the logs to detect unexpected events."; + } + } + mandatory true; + description + "The assertion is a statement from the MASA regarding how + the owner was verified. This statement enables pledges + to support more detailed policy checks. Pledges MUST + ensure that the assertion provided is acceptable, per + local policy, before processing the voucher."; + } + leaf serial-number { + type string; + mandatory true; + description + "The serial-number of the hardware. When processing a + voucher, a pledge MUST ensure that its serial-number + matches this value. If no match occurs, then the + pledge MUST NOT process this voucher."; + } + leaf idevid-issuer { + type binary; + description + "The Authority Key Identifier OCTET STRING (as defined in + Section 4.2.1.1 of RFC 5280) from the pledge's IDevID + certificate. Optional since some serial-numbers are + already unique within the scope of a MASA. + Inclusion of the statistically unique key identifier + ensures statistically unique identification of the hardware. + When processing a voucher, a pledge MUST ensure that its + IDevID Authority Key Identifier matches this value. If no + match occurs, then the pledge MUST NOT process this voucher. + + When issuing a voucher, the MASA MUST ensure that this field + is populated for serial-numbers that are not otherwise unique + within the scope of the MASA."; + } + leaf pinned-domain-cert { + type binary; + mandatory true; + description + "An X.509 v3 certificate structure, as specified by RFC 5280, + using Distinguished Encoding Rules (DER) encoding, as defined + in ITU-T X.690. + + This certificate is used by a pledge to trust a Public Key + Infrastructure in order to verify a domain certificate + supplied to the pledge separately by the bootstrapping + protocol. The domain certificate MUST have this certificate + somewhere in its chain of certificates. This certificate + MAY be an end-entity certificate, including a self-signed + entity."; + reference + "RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile. + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + leaf domain-cert-revocation-checks { + type boolean; + description + "A processing instruction to the pledge that it MUST (true) + or MUST NOT (false) verify the revocation status for the + pinned domain certificate. If this field is not set, then + normal PKIX behavior applies to validation of the domain + certificate."; + } + leaf nonce { + type binary { + length "8..32"; + } + must 'not(../expires-on)'; + description + "A value that can be used by a pledge in some bootstrapping + protocols to enable anti-replay protection. This node is + optional because it is not used by all bootstrapping + protocols. + + When present, the pledge MUST compare the provided nonce + value with another value that the pledge randomly generated + and sent to a bootstrap server in an earlier bootstrapping + message. If the values do not match, then the pledge MUST + NOT process this voucher."; + } + leaf last-renewal-date { + type yang:date-and-time; + must '../expires-on'; + description + "The date that the MASA projects to be the last date it + will renew a voucher on. This field is merely informative; + it is not processed by pledges. + + Circumstances may occur after a voucher is generated that + may alter a voucher's validity period. For instance, a + vendor may associate validity periods with support contracts, + which may be terminated or extended over time."; + } + } // end voucher + } // end voucher-grouping +} diff --git a/models/ietf/RFC/ietf-voucher@2018-05-09.yang b/models/ietf/RFC/ietf-voucher@2018-05-09.yang new file mode 100644 index 0000000000000000000000000000000000000000..4307b23b7f900c861d3c8786955ce7d1db7d8dc5 --- /dev/null +++ b/models/ietf/RFC/ietf-voucher@2018-05-09.yang @@ -0,0 +1,232 @@ +module ietf-voucher { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-voucher"; + prefix vch; + + import ietf-yang-types { + prefix yang; + reference "RFC 6991: Common YANG Data Types"; + } + import ietf-restconf { + prefix rc; + description + "This import statement is only present to access + the yang-data extension defined in RFC 8040."; + reference "RFC 8040: RESTCONF Protocol"; + } + + organization + "IETF ANIMA Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/anima/> + WG List: <mailto:anima@ietf.org> + Author: Kent Watsen + <mailto:kwatsen@juniper.net> + Author: Max Pritikin + <mailto:pritikin@cisco.com> + Author: Michael Richardson + <mailto:mcr+ietf@sandelman.ca> + Author: Toerless Eckert + <mailto:tte+ietf@cs.fau.de>"; + description + "This module defines the format for a voucher, which is produced by + a pledge's manufacturer or delegate (MASA) to securely assign a + pledge to an 'owner', so that the pledge may establish a secure + connection to the owner's network infrastructure. + + 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. + + Copyright (c) 2018 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 Simplified 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 8366; see the RFC + itself for full legal notices."; + + revision 2018-05-09 { + description + "Initial version"; + reference "RFC 8366: Voucher Profile for Bootstrapping Protocols"; + } + + // Top-level statement + rc:yang-data voucher-artifact { + uses voucher-artifact-grouping; + } + + // Grouping defined for future augmentations + + grouping voucher-artifact-grouping { + description + "Grouping to allow reuse/extensions in future work."; + container voucher { + + description + "A voucher assigns a pledge to an owner (pinned-domain-cert)."; + leaf created-on { + type yang:date-and-time; + mandatory true; + description + "A value indicating the date this voucher was created. This + node is primarily for human consumption and auditing. Future + work MAY create verification requirements based on this + node."; + } + leaf expires-on { + type yang:date-and-time; + must 'not(../nonce)'; + description + "A value indicating when this voucher expires. The node is + optional as not all pledges support expirations, such as + pledges lacking a reliable clock. + + If this field exists, then the pledges MUST ensure that + the expires-on time has not yet passed. A pledge without + an accurate clock cannot meet this requirement. + + The expires-on value MUST NOT exceed the expiration date + of any of the listed 'pinned-domain-cert' certificates."; + } + leaf assertion { + type enumeration { + enum verified { + description + "Indicates that the ownership has been positively + verified by the MASA (e.g., through sales channel + integration)."; + } + enum logged { + description + "Indicates that the voucher has been issued after + minimal verification of ownership or control. The + issuance has been logged for detection of + potential security issues (e.g., recipients of + vouchers might verify for themselves that unexpected + vouchers are not in the log). This is similar to + unsecured trust-on-first-use principles but with the + logging providing a basis for detecting unexpected + events."; + } + enum proximity { + + description + "Indicates that the voucher has been issued after + the MASA verified a proximity proof provided by the + device and target domain. The issuance has been logged + for detection of potential security issues. This is + stronger than just logging, because it requires some + verification that the pledge and owner are + in communication but is still dependent on analysis of + the logs to detect unexpected events."; + } + } + mandatory true; + description + "The assertion is a statement from the MASA regarding how + the owner was verified. This statement enables pledges + to support more detailed policy checks. Pledges MUST + ensure that the assertion provided is acceptable, per + local policy, before processing the voucher."; + } + leaf serial-number { + type string; + mandatory true; + description + "The serial-number of the hardware. When processing a + voucher, a pledge MUST ensure that its serial-number + matches this value. If no match occurs, then the + pledge MUST NOT process this voucher."; + } + leaf idevid-issuer { + type binary; + description + "The Authority Key Identifier OCTET STRING (as defined in + Section 4.2.1.1 of RFC 5280) from the pledge's IDevID + certificate. Optional since some serial-numbers are + already unique within the scope of a MASA. + Inclusion of the statistically unique key identifier + ensures statistically unique identification of the hardware. + When processing a voucher, a pledge MUST ensure that its + IDevID Authority Key Identifier matches this value. If no + match occurs, then the pledge MUST NOT process this voucher. + + When issuing a voucher, the MASA MUST ensure that this field + is populated for serial-numbers that are not otherwise unique + within the scope of the MASA."; + } + leaf pinned-domain-cert { + type binary; + mandatory true; + description + "An X.509 v3 certificate structure, as specified by RFC 5280, + using Distinguished Encoding Rules (DER) encoding, as defined + in ITU-T X.690. + + This certificate is used by a pledge to trust a Public Key + Infrastructure in order to verify a domain certificate + supplied to the pledge separately by the bootstrapping + protocol. The domain certificate MUST have this certificate + somewhere in its chain of certificates. This certificate + MAY be an end-entity certificate, including a self-signed + entity."; + reference + "RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile. + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + leaf domain-cert-revocation-checks { + type boolean; + description + "A processing instruction to the pledge that it MUST (true) + or MUST NOT (false) verify the revocation status for the + pinned domain certificate. If this field is not set, then + normal PKIX behavior applies to validation of the domain + certificate."; + } + leaf nonce { + type binary { + length "8..32"; + } + must 'not(../expires-on)'; + description + "A value that can be used by a pledge in some bootstrapping + protocols to enable anti-replay protection. This node is + optional because it is not used by all bootstrapping + protocols. + + When present, the pledge MUST compare the provided nonce + value with another value that the pledge randomly generated + and sent to a bootstrap server in an earlier bootstrapping + message. If the values do not match, then the pledge MUST + NOT process this voucher."; + } + leaf last-renewal-date { + type yang:date-and-time; + must '../expires-on'; + description + "The date that the MASA projects to be the last date it + will renew a voucher on. This field is merely informative; + it is not processed by pledges. + + Circumstances may occur after a voucher is generated that + may alter a voucher's validity period. For instance, a + vendor may associate validity periods with support contracts, + which may be terminated or extended over time."; + } + } // end voucher + } // end voucher-grouping +} diff --git a/models/ietf/RFC/ietf-vrrp.yang b/models/ietf/RFC/ietf-vrrp.yang new file mode 100644 index 0000000000000000000000000000000000000000..462158c17ff627088ae9d32a09e98b10eaf06512 --- /dev/null +++ b/models/ietf/RFC/ietf-vrrp.yang @@ -0,0 +1,1064 @@ +module ietf-vrrp { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp"; + prefix "vrrp"; + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-interfaces { + prefix "if"; + } + + import ietf-ip { + prefix "ip"; + } + + organization + "IETF Routing Area Working Group (RTGWG)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Athanasios Kyparlis + <mailto:Athanasios_Kyparlis@jabil.com> + Editor: Ravi Parikh + <mailto:parikhr@vmware.com> + + Editor: Acee Lindem + <mailto:acee@cisco.com> + + Editor: Mingui Zhang + <mailto:zhangmingui@huawei.com>"; + + description + "This YANG module defines a model for managing Virtual Router + Redundancy Protocol (VRRP) versions 2 and 3. + + Copyright (c) 2018 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 Simplified 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 8347; see the + RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8347: A YANG Data Model for the Virtual Router Redundancy + Protocol (VRRP) + RFC 2787: Definitions of Managed Objects for the Virtual + Router Redundancy Protocol + RFC 3768: Virtual Router Redundancy Protocol (VRRP) + RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6 + RFC 6527: Definitions of Managed Objects for the Virtual + Router Redundancy Protocol Version 3 (VRRPv3)"; + } + + /* + * Features + */ + + feature validate-interval-errors { + description + "This feature indicates that the system validates that the + advertisement interval from advertisement packets received + is the same as the interval configured for the local + VRRP router."; + } + + feature validate-address-list-errors { + description + "This feature indicates that the system validates that + the address list from received packets matches the + locally configured list for the VRRP router."; + } + + /* + * Typedefs + */ + + typedef new-master-reason-type { + type enumeration { + enum not-master { + description + "The virtual router has never transitioned to master + state."; + } + enum priority { + description + "Priority was higher."; + } + enum preempted { + description + "The master was preempted."; + } + enum no-response { + description + "Previous master did not respond."; + } + } + description + "Indicates why the virtual router has transitioned to + master state."; + } // new-master-reason-type + + /* + * Identities + */ + + /* vrrp-event-type identity and its derivatives. */ + identity vrrp-event-type { + description + "Indicates the type of a VRRP protocol event."; + } + identity vrrp-event-none { + base vrrp-event-type; + description + "Indicates a non-meaningful event."; + } + identity vrrp-event-startup { + base vrrp-event-type; + description + "Indicates that a VRRP router has initiated the protocol."; + } + identity vrrp-event-shutdown { + base vrrp-event-type; + description + "Indicates that a VRRP router has closed down the protocol."; + } + identity vrrp-event-higher-priority-backup { + base vrrp-event-type; + description + "Indicates that a backup router has a higher priority than + the current master."; + } + identity vrrp-event-master-timeout { + base vrrp-event-type; + description + "Indicates that the current master has not sent an + advertisement within the limit of master-down-interval."; + } + identity vrrp-event-interface-up { + base vrrp-event-type; + description + "Indicates that the VRRP-enabled interface has become + 'operational up'."; + } + identity vrrp-event-interface-down { + base vrrp-event-type; + description + "Indicates that the VRRP-enabled interface has become + 'operational down'."; + } + identity vrrp-event-no-primary-ip-address { + base vrrp-event-type; + description + "Indicates that the primary IP address on the VRRP-enabled + interface has become unavailable."; + } + identity vrrp-event-primary-ip-address { + base vrrp-event-type; + description + "Indicates that the primary IP address on the VRRP-enabled + interface has become available."; + } + identity vrrp-event-no-virtual-ip-addresses { + base vrrp-event-type; + description + "Indicates that there are no virtual IP addresses on the + virtual router."; + } + identity vrrp-event-virtual-ip-addresses { + base vrrp-event-type; + description + "Indicates that there are virtual IP addresses on the + virtual router."; + } + identity vrrp-event-preempt-hold-timeout { + base vrrp-event-type; + description + "Indicates that the configured preemption hold time has + passed."; + } + identity vrrp-event-lower-priority-master { + base vrrp-event-type; + description + "Indicates that there is a lower-priority VRRP master."; + } + identity vrrp-event-owner-preempt { + base vrrp-event-type; + description + "Indicates that the owner has preempted another router to + become the master."; + } + + /* vrrp-error-global identity and its derivatives. */ + identity vrrp-error-global { + description + "Indicates the type of a VRRP error that occurred + for a packet before it reaches a VRRP router."; + } + identity checksum-error { + base vrrp-error-global; + description + "A packet has been received with an invalid VRRP checksum + value."; + } + identity ip-ttl-error { + base vrrp-error-global; + description + "A packet has been received with IP TTL (Time-To-Live) + not equal to 255."; + } + identity version-error { + base vrrp-error-global; + description + "A packet has been received with an unknown or unsupported + version number."; + } + identity vrid-error { + base vrrp-error-global; + description + "A packet has been received with a Virtual Router Identifier + (VRID) that is not valid for any virtual router on this + router."; + } + + /* vrrp-error-virtual-router identity and its derivatives. */ + identity vrrp-error-virtual-router { + description + "Indicates the type of a VRRP error that occurred + after a packet reaches a VRRP router."; + } + identity address-list-error { + base vrrp-error-virtual-router; + description + "A packet has been received with an address list that + does not match the locally configured address list for + the virtual router."; + } + identity interval-error { + base vrrp-error-virtual-router; + description + "A packet has been received with an advertisement interval + different than the interval configured for the local + virtual router."; + } + identity packet-length-error { + base vrrp-error-virtual-router; + description + "A packet has been received with a packet length less + than the length of the VRRP header."; + } + + /* vrrp-state-type identity and its derivatives. */ + identity vrrp-state-type { + description + "Indicates the state of a virtual router."; + } + identity initialize { + base vrrp-state-type; + description + "Indicates that the virtual router is waiting + for a startup event."; + } + identity backup { + base vrrp-state-type; + description + "Indicates that the virtual router is monitoring the + availability of the master router."; + } + identity master { + base vrrp-state-type; + description + "Indicates that the virtual router is forwarding + packets for IP addresses that are associated with + this virtual router."; + } + + /* vrrp-version identity and its derivatives. */ + identity vrrp-version { + description + "The version of VRRP."; + } + identity vrrp-v2 { + base vrrp-version; + description + "Indicates version 2 of VRRP."; + } + identity vrrp-v3 { + base vrrp-version; + description + "Indicates version 3 of VRRP."; + } + + /* + * Groupings + */ + + grouping vrrp-common-attributes { + description + "Group of VRRP attributes common to versions 2 and 3."; + + leaf vrid { + type uint8 { + range "1..255"; + } + description + "Virtual Router ID (i.e., VRID)."; + } + + leaf version { + type identityref { + base vrrp:vrrp-version; + } + mandatory true; + description + "Version 2 or 3 of VRRP."; + } + + leaf log-state-change { + type boolean; + default "false"; + description + "Generates VRRP state change messages each time the + VRRP instance changes state (from 'up' to 'down' + or 'down' to 'up')."; + } + + container preempt { + description + "Enables a higher-priority VRRP backup router to preempt a + lower-priority VRRP master."; + leaf enabled { + type boolean; + default "true"; + description + "'true' if preemption is enabled."; + } + leaf hold-time { + type uint16; + units seconds; + default 0; + description + "Hold time, in seconds, for which a higher-priority VRRP + backup router must wait before preempting a lower-priority + VRRP master."; + } + } + + leaf priority { + type uint8 { + range "1..254"; + } + default 100; + description + "Configures the VRRP election priority for the backup + virtual router."; + } + + leaf accept-mode { + when "derived-from-or-self(current()/../version, 'vrrp-v3')" { + description + "Applicable only to version 3."; + } + type boolean; + default "false"; + description + "Controls whether a virtual router in master state will + accept packets addressed to the address owner's IPvX address + as its own if it is not the IPvX address owner. The default + is 'false'. Deployments that rely on, for example, pinging + the address owner's IPvX address may wish to configure + accept-mode to 'true'. + + Note: IPv6 Neighbor Solicitations and Neighbor + Advertisements MUST NOT be dropped when accept-mode + is 'false'."; + } + } // vrrp-common-attributes + + grouping vrrp-ipv4-attributes { + description + "Group of VRRP attributes for IPv4."; + + uses vrrp-common-attributes; + + choice advertise-interval-choice { + description + "The options for the advertisement interval at which VRRPv2 + or VRRPv3 advertisements are sent from the specified + interface."; + + case v2 { + when "derived-from-or-self(version, 'vrrp-v2')" { + description + "Applicable only to version 2."; + } + leaf advertise-interval-sec { + type uint8 { + range "1..254"; + } + units seconds; + default 1; + description + "Configures the interval that VRRPv2 advertisements + are sent from the specified interface."; + } + } + case v3 { + when "derived-from-or-self(version, 'vrrp-v3')" { + description + "Applicable only to version 3."; + } + leaf advertise-interval-centi-sec { + type uint16 { + range "1..4095"; + } + units centiseconds; + default 100; + description + "Configures the interval that VRRPv3 advertisements + are sent from the specified interface."; + } + } + } // advertise-interval-choice + + container track { + description + "Enables the specified VRRP instance to track interfaces + or networks."; + container interfaces { + description + "Enables the specified VRRPv2 or VRRPv3 instance to track + interfaces. Interface tracking prevents traffic loss by + detecting the availability of interfaces. The operational + states of other interfaces are associated with the + priority of a VRRP router. When a tracked interface + becomes unavailable (or 'operational down'), the priority + of the VRRP router decrements. When an unavailable + interface becomes available again, the priority of the + VRRP router is incremented by the same amount."; + + list interface { + key "interface"; + description + "Interface to track."; + leaf interface { + type if:interface-ref; + must "/if:interfaces/if:interface[if:name=current()]/" + + "ip:ipv4" { + description + "Interface is IPv4."; + } + description + "Interface to track."; + } + leaf priority-decrement { + type uint8 { + range "1..254"; + } + default 10; + description + "Specifies how much to decrement the priority of the + VRRP instance if the interface goes down."; + } + } // interface + } // interfaces + + container networks { + description + "Enables the VRRPv2 or VRRPv3 router instance to track the + specified networks through their IPv4 network prefixes. + Network tracking prevents traffic loss by detecting + network connectivity failure. The states of + connectivity to some networks are associated with the + priority of a VRRP router. When connectivity to a + tracked network represented by its prefix is lost, the + priority of the VRRP router decrements. When an + unavailable network is again reachable, the priority of + the VRRP router is incremented by the same amount."; + list network { + key "prefix"; + description + "Enables the specified VRRPv2 or VRRPv3 instance to + track an IPv4 network by specifying the prefix of the + IPv4 network."; + + leaf prefix { + type inet:ipv4-prefix; + description + "The IPv4 prefix of the network to track."; + } + + leaf priority-decrement { + type uint8 { + range "1..254"; + } + default 10; + description + "Specifies how much to decrement the priority of the + VRRP router if there is a failure in the IPv4 + network."; + } + } // network + } // networks + } // track + + container virtual-ipv4-addresses { + description + "Configures the virtual IPv4 address for the + VRRP interface."; + + list virtual-ipv4-address { + key "ipv4-address"; + max-elements 16; + description + "Virtual IPv4 addresses for a single VRRP instance. For a + VRRP owner router, the virtual address must match one + of the IPv4 addresses configured on the interface + corresponding to the virtual router."; + + leaf ipv4-address { + type inet:ipv4-address; + description + "An IPv4 address associated with a virtual router."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 1.2"; + } + } // virtual-ipv4-address + } // virtual-ipv4-addresses + } // vrrp-ipv4-attributes + + grouping vrrp-ipv6-attributes { + description + "Group of VRRP attributes for IPv6."; + + uses vrrp-common-attributes; + + leaf advertise-interval-centi-sec { + type uint16 { + range "1..4095"; + } + units centiseconds; + default 100; + description + "Configures the interval that VRRPv3 advertisements + are sent from the specified interface."; + } + + container track { + description + "Enables the specified VRRP instance to track interfaces + or networks."; + container interfaces { + description + "Enables the specified VRRPv2 or VRRPv3 instance to track + interfaces. Interface tracking prevents traffic loss by + detecting the availability of interfaces. The operational + states of other interfaces are associated with the + priority of a VRRP router. When a tracked interface + becomes unavailable (or 'operational down'), the priority + of the VRRP router decrements. When an unavailable + interface becomes available again, the priority of the + VRRP router is incremented by the same amount."; + list interface { + key "interface"; + description + "Interface to track."; + + leaf interface { + type if:interface-ref; + must "/if:interfaces/if:interface[if:name=current()]/" + + "ip:ipv6" { + description + "Interface is IPv6."; + } + description + "Interface to track."; + } + + leaf priority-decrement { + type uint8 { + range "1..254"; + } + default 10; + description + "Specifies how much to decrement the priority of the + VRRP instance if the interface goes down."; + } + } // interface + } // interfaces + + container networks { + description + "Enables the VRRPv2 or VRRPv3 router instance to track the + specified networks through their IPv6 network prefixes. + Network tracking prevents traffic loss by detecting + network connectivity failure. The states of + connectivity to some networks are associated with the + priority of a VRRP router. When connectivity to a + tracked network represented by its prefix is lost, the + priority of the VRRP router decrements. When an + unavailable network is again reachable, the priority of + the VRRP router is incremented by the same amount."; + list network { + key "prefix"; + description + "Enables the specified VRRPv2 or VRRPv3 instance to + track an IPv6 network by specifying the prefix of the + IPv6 network."; + + leaf prefix { + type inet:ipv6-prefix; + description + "The IPv6 prefix of the network to track."; + } + + leaf priority-decrement { + type uint8 { + range "1..254"; + } + default 10; + description + "Specifies how much to decrement the priority of the + VRRP router if there is a failure in the IPv6 + network."; + } + } // network + } // networks + } // track + + container virtual-ipv6-addresses { + description + "Configures the virtual IPv6 address for the + VRRP interface."; + list virtual-ipv6-address { + key "ipv6-address"; + max-elements 2; + description + "Two IPv6 addresses are allowed. The first address must + be a link-local address. The second address can be a + link-local or global address."; + + leaf ipv6-address { + type inet:ipv6-address; + description + "An IPv6 address associated with a virtual router."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 1.3"; + } + } // virtual-ipv6-address + } // virtual-ipv6-addresses + } // vrrp-ipv6-attributes + + grouping vrrp-state-attributes { + description + "Group of VRRP state attributes."; + + leaf state { + type identityref { + base vrrp:vrrp-state-type; + } + config false; + description + "Operational state."; + } + + leaf is-owner { + type boolean; + config false; + description + "Set to 'true' if this virtual router is the owner."; + } + + leaf last-adv-source { + type inet:ip-address; + config false; + description + "Last advertised IPv4/IPv6 source address."; + } + + leaf up-datetime { + type yang:date-and-time; + config false; + description + "The date and time when this virtual router + transitioned out of 'init' state."; + } + + leaf master-down-interval { + type uint32; + units centiseconds; + config false; + description + "Time interval for the backup virtual router to declare + 'master down'."; + } + + leaf skew-time { + type uint32; + units microseconds; + config false; + description + "Calculated based on the priority and advertisement + interval configuration command parameters. See RFC 3768."; + } + + leaf last-event { + type identityref { + base vrrp:vrrp-event-type; + } + config false; + description + "Last reported event."; + } + + leaf new-master-reason { + type new-master-reason-type; + config false; + description + "Indicates why the virtual router has transitioned to + master state."; + } + + container statistics { + config false; + description + "VRRP statistics."; + + leaf discontinuity-datetime { + type yang:date-and-time; + description + "The time on the most recent occasion at which any one or + more of the VRRP statistics counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time that the + local management subsystem re-initialized itself."; + } + + leaf master-transitions { + type yang:counter32; + description + "The total number of times that this virtual router's + state has transitioned to 'master'."; + } + + leaf advertisement-rcvd { + type yang:counter64; + description + "The total number of VRRP advertisements received by + this virtual router."; + } + + leaf advertisement-sent { + type yang:counter64; + description + "The total number of VRRP advertisements sent by + this virtual router."; + } + + leaf interval-errors { + if-feature validate-interval-errors; + type yang:counter64; + description + "The total number of VRRP advertisement packets received + with an advertisement interval different than the + interval configured for the local virtual router."; + } + + leaf priority-zero-pkts-rcvd { + type yang:counter64; + description + "The total number of VRRP packets received by the + virtual router with a priority of 0."; + } + + leaf priority-zero-pkts-sent { + type yang:counter64; + description + "The total number of VRRP packets sent by the + virtual router with a priority of 0."; + } + + leaf invalid-type-pkts-rcvd { + type yang:counter64; + description + "The number of VRRP packets received by the virtual + router with an invalid value in the 'type' field."; + } + leaf address-list-errors { + if-feature validate-address-list-errors; + type yang:counter64; + description + "The total number of packets received with an + address list that does not match the locally + configured address list for the virtual router."; + } + + leaf packet-length-errors { + type yang:counter64; + description + "The total number of packets received with a packet + length less than the length of the VRRP header."; + } + } // statistics + } // vrrp-state-attributes + + grouping vrrp-global-state-attributes { + description + "Group of VRRP global state attributes."; + + leaf virtual-routers { + type uint32; + description + "Number of configured virtual routers."; + } + + leaf interfaces { + type uint32; + description + "Number of interfaces with VRRP configured."; + } + + container statistics { + description + "VRRP global statistics."; + + leaf discontinuity-datetime { + type yang:date-and-time; + description + "The time on the most recent occasion at which any + one or more of checksum-errors, version-errors, + vrid-errors, or ip-ttl-errors suffered a + discontinuity. + + If no such discontinuities have occurred since the last + re-initialization of the local management subsystem, + then this node contains the time that the local management + subsystem re-initialized itself."; + } + + leaf checksum-errors { + type yang:counter64; + description + "The total number of VRRP packets received with an invalid + VRRP checksum value."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 5.2.8"; + } + + leaf version-errors { + type yang:counter64; + description + "The total number of VRRP packets received with an unknown + or unsupported version number."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 5.2.1"; + } + + leaf vrid-errors { + type yang:counter64; + description + "The total number of VRRP packets received with a VRID that + is not valid for any virtual router on this router."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 5.2.3"; + } + + leaf ip-ttl-errors { + type yang:counter64; + description + "The total number of VRRP packets received by the + virtual router with IP TTL (IPv4) or Hop Limit (IPv6) + not equal to 255."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. + Sections 5.1.1.3 and 5.1.2.3"; + } + } // statistics + } // vrrp-global-state-attributes + + /* + * Configuration data and operational state data nodes + */ + + augment "/if:interfaces/if:interface/ip:ipv4" { + description + "Augments IPv4 interface."; + + container vrrp { + description + "Configures VRRP version 2 or 3 for IPv4."; + + list vrrp-instance { + key "vrid"; + description + "Defines a virtual router, identified by a VRID, within the + IPv4 address space."; + + uses vrrp-ipv4-attributes; + uses vrrp-state-attributes; + } + } + } // augments ipv4 + + augment "/if:interfaces/if:interface/ip:ipv6" { + description + "Augments IPv6 interface."; + + container vrrp { + description + "Configures VRRP version 3 for IPv6."; + + list vrrp-instance { + must "derived-from-or-self(version, 'vrrp-v3')" { + description + "IPv6 is only supported by version 3."; + } + key "vrid"; + description + "Defines a virtual router, identified by a VRID, within the + IPv6 address space."; + + uses vrrp-ipv6-attributes; + uses vrrp-state-attributes; + } + } + } // augments ipv6 + + container vrrp { + config false; + description + "VRRP data at the global level."; + + uses vrrp-global-state-attributes; + } + + /* + * Notifications + */ + + notification vrrp-new-master-event { + description + "Notification event for the election of a new VRRP master."; + leaf master-ip-address { + type inet:ip-address; + mandatory true; + description + "IPv4 or IPv6 address of the new master."; + } + leaf new-master-reason { + type new-master-reason-type; + mandatory true; + description + "Indicates why the virtual router has transitioned to + master state."; + } + } + + notification vrrp-protocol-error-event { + description + "Notification event for a VRRP protocol error."; + leaf protocol-error-reason { + type identityref { + base vrrp:vrrp-error-global; + } + mandatory true; + description + "Indicates the reason for the protocol error."; + } + } + + notification vrrp-virtual-router-error-event { + description + "Notification event for an error that happened on a + virtual router."; + leaf interface { + type if:interface-ref; + mandatory true; + description + "Indicates the interface on which the event has occurred."; + } + + choice ip-version { + mandatory true; + description + "The error may have happened on either an IPv4 virtual + router or an IPv6 virtual router. The information + related to a specific IP version is provided by one of + the following cases."; + case ipv4 { + description + "IPv4."; + container ipv4 { + description + "Error information for IPv4."; + leaf vrid { + type leafref { + path "/if:interfaces/if:interface" + + "[if:name = current()/../../vrrp:interface]/" + + "ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; + } + mandatory true; + description + "Indicates the virtual router on which the event has + occurred."; + } + } + } + case ipv6 { + description + "IPv6."; + container ipv6 { + description + "Error information for IPv6."; + leaf vrid { + type leafref { + path "/if:interfaces/if:interface" + + "[if:name = current()/../../vrrp:interface]/" + + "ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; + } + mandatory true; + description + "Indicates the virtual router on which the event has + occurred."; + } + } + } + } + + leaf virtual-router-error-reason { + type identityref { + base vrrp:vrrp-error-virtual-router; + } + mandatory true; + description + "Indicates the reason for the virtual router error."; + } + } +} diff --git a/models/ietf/RFC/ietf-vrrp@2018-03-13.yang b/models/ietf/RFC/ietf-vrrp@2018-03-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..462158c17ff627088ae9d32a09e98b10eaf06512 --- /dev/null +++ b/models/ietf/RFC/ietf-vrrp@2018-03-13.yang @@ -0,0 +1,1064 @@ +module ietf-vrrp { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp"; + prefix "vrrp"; + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-interfaces { + prefix "if"; + } + + import ietf-ip { + prefix "ip"; + } + + organization + "IETF Routing Area Working Group (RTGWG)"; + contact + "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> + WG List: <mailto:rtgwg@ietf.org> + + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + + Editor: Athanasios Kyparlis + <mailto:Athanasios_Kyparlis@jabil.com> + Editor: Ravi Parikh + <mailto:parikhr@vmware.com> + + Editor: Acee Lindem + <mailto:acee@cisco.com> + + Editor: Mingui Zhang + <mailto:zhangmingui@huawei.com>"; + + description + "This YANG module defines a model for managing Virtual Router + Redundancy Protocol (VRRP) versions 2 and 3. + + Copyright (c) 2018 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 Simplified 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 8347; see the + RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8347: A YANG Data Model for the Virtual Router Redundancy + Protocol (VRRP) + RFC 2787: Definitions of Managed Objects for the Virtual + Router Redundancy Protocol + RFC 3768: Virtual Router Redundancy Protocol (VRRP) + RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6 + RFC 6527: Definitions of Managed Objects for the Virtual + Router Redundancy Protocol Version 3 (VRRPv3)"; + } + + /* + * Features + */ + + feature validate-interval-errors { + description + "This feature indicates that the system validates that the + advertisement interval from advertisement packets received + is the same as the interval configured for the local + VRRP router."; + } + + feature validate-address-list-errors { + description + "This feature indicates that the system validates that + the address list from received packets matches the + locally configured list for the VRRP router."; + } + + /* + * Typedefs + */ + + typedef new-master-reason-type { + type enumeration { + enum not-master { + description + "The virtual router has never transitioned to master + state."; + } + enum priority { + description + "Priority was higher."; + } + enum preempted { + description + "The master was preempted."; + } + enum no-response { + description + "Previous master did not respond."; + } + } + description + "Indicates why the virtual router has transitioned to + master state."; + } // new-master-reason-type + + /* + * Identities + */ + + /* vrrp-event-type identity and its derivatives. */ + identity vrrp-event-type { + description + "Indicates the type of a VRRP protocol event."; + } + identity vrrp-event-none { + base vrrp-event-type; + description + "Indicates a non-meaningful event."; + } + identity vrrp-event-startup { + base vrrp-event-type; + description + "Indicates that a VRRP router has initiated the protocol."; + } + identity vrrp-event-shutdown { + base vrrp-event-type; + description + "Indicates that a VRRP router has closed down the protocol."; + } + identity vrrp-event-higher-priority-backup { + base vrrp-event-type; + description + "Indicates that a backup router has a higher priority than + the current master."; + } + identity vrrp-event-master-timeout { + base vrrp-event-type; + description + "Indicates that the current master has not sent an + advertisement within the limit of master-down-interval."; + } + identity vrrp-event-interface-up { + base vrrp-event-type; + description + "Indicates that the VRRP-enabled interface has become + 'operational up'."; + } + identity vrrp-event-interface-down { + base vrrp-event-type; + description + "Indicates that the VRRP-enabled interface has become + 'operational down'."; + } + identity vrrp-event-no-primary-ip-address { + base vrrp-event-type; + description + "Indicates that the primary IP address on the VRRP-enabled + interface has become unavailable."; + } + identity vrrp-event-primary-ip-address { + base vrrp-event-type; + description + "Indicates that the primary IP address on the VRRP-enabled + interface has become available."; + } + identity vrrp-event-no-virtual-ip-addresses { + base vrrp-event-type; + description + "Indicates that there are no virtual IP addresses on the + virtual router."; + } + identity vrrp-event-virtual-ip-addresses { + base vrrp-event-type; + description + "Indicates that there are virtual IP addresses on the + virtual router."; + } + identity vrrp-event-preempt-hold-timeout { + base vrrp-event-type; + description + "Indicates that the configured preemption hold time has + passed."; + } + identity vrrp-event-lower-priority-master { + base vrrp-event-type; + description + "Indicates that there is a lower-priority VRRP master."; + } + identity vrrp-event-owner-preempt { + base vrrp-event-type; + description + "Indicates that the owner has preempted another router to + become the master."; + } + + /* vrrp-error-global identity and its derivatives. */ + identity vrrp-error-global { + description + "Indicates the type of a VRRP error that occurred + for a packet before it reaches a VRRP router."; + } + identity checksum-error { + base vrrp-error-global; + description + "A packet has been received with an invalid VRRP checksum + value."; + } + identity ip-ttl-error { + base vrrp-error-global; + description + "A packet has been received with IP TTL (Time-To-Live) + not equal to 255."; + } + identity version-error { + base vrrp-error-global; + description + "A packet has been received with an unknown or unsupported + version number."; + } + identity vrid-error { + base vrrp-error-global; + description + "A packet has been received with a Virtual Router Identifier + (VRID) that is not valid for any virtual router on this + router."; + } + + /* vrrp-error-virtual-router identity and its derivatives. */ + identity vrrp-error-virtual-router { + description + "Indicates the type of a VRRP error that occurred + after a packet reaches a VRRP router."; + } + identity address-list-error { + base vrrp-error-virtual-router; + description + "A packet has been received with an address list that + does not match the locally configured address list for + the virtual router."; + } + identity interval-error { + base vrrp-error-virtual-router; + description + "A packet has been received with an advertisement interval + different than the interval configured for the local + virtual router."; + } + identity packet-length-error { + base vrrp-error-virtual-router; + description + "A packet has been received with a packet length less + than the length of the VRRP header."; + } + + /* vrrp-state-type identity and its derivatives. */ + identity vrrp-state-type { + description + "Indicates the state of a virtual router."; + } + identity initialize { + base vrrp-state-type; + description + "Indicates that the virtual router is waiting + for a startup event."; + } + identity backup { + base vrrp-state-type; + description + "Indicates that the virtual router is monitoring the + availability of the master router."; + } + identity master { + base vrrp-state-type; + description + "Indicates that the virtual router is forwarding + packets for IP addresses that are associated with + this virtual router."; + } + + /* vrrp-version identity and its derivatives. */ + identity vrrp-version { + description + "The version of VRRP."; + } + identity vrrp-v2 { + base vrrp-version; + description + "Indicates version 2 of VRRP."; + } + identity vrrp-v3 { + base vrrp-version; + description + "Indicates version 3 of VRRP."; + } + + /* + * Groupings + */ + + grouping vrrp-common-attributes { + description + "Group of VRRP attributes common to versions 2 and 3."; + + leaf vrid { + type uint8 { + range "1..255"; + } + description + "Virtual Router ID (i.e., VRID)."; + } + + leaf version { + type identityref { + base vrrp:vrrp-version; + } + mandatory true; + description + "Version 2 or 3 of VRRP."; + } + + leaf log-state-change { + type boolean; + default "false"; + description + "Generates VRRP state change messages each time the + VRRP instance changes state (from 'up' to 'down' + or 'down' to 'up')."; + } + + container preempt { + description + "Enables a higher-priority VRRP backup router to preempt a + lower-priority VRRP master."; + leaf enabled { + type boolean; + default "true"; + description + "'true' if preemption is enabled."; + } + leaf hold-time { + type uint16; + units seconds; + default 0; + description + "Hold time, in seconds, for which a higher-priority VRRP + backup router must wait before preempting a lower-priority + VRRP master."; + } + } + + leaf priority { + type uint8 { + range "1..254"; + } + default 100; + description + "Configures the VRRP election priority for the backup + virtual router."; + } + + leaf accept-mode { + when "derived-from-or-self(current()/../version, 'vrrp-v3')" { + description + "Applicable only to version 3."; + } + type boolean; + default "false"; + description + "Controls whether a virtual router in master state will + accept packets addressed to the address owner's IPvX address + as its own if it is not the IPvX address owner. The default + is 'false'. Deployments that rely on, for example, pinging + the address owner's IPvX address may wish to configure + accept-mode to 'true'. + + Note: IPv6 Neighbor Solicitations and Neighbor + Advertisements MUST NOT be dropped when accept-mode + is 'false'."; + } + } // vrrp-common-attributes + + grouping vrrp-ipv4-attributes { + description + "Group of VRRP attributes for IPv4."; + + uses vrrp-common-attributes; + + choice advertise-interval-choice { + description + "The options for the advertisement interval at which VRRPv2 + or VRRPv3 advertisements are sent from the specified + interface."; + + case v2 { + when "derived-from-or-self(version, 'vrrp-v2')" { + description + "Applicable only to version 2."; + } + leaf advertise-interval-sec { + type uint8 { + range "1..254"; + } + units seconds; + default 1; + description + "Configures the interval that VRRPv2 advertisements + are sent from the specified interface."; + } + } + case v3 { + when "derived-from-or-self(version, 'vrrp-v3')" { + description + "Applicable only to version 3."; + } + leaf advertise-interval-centi-sec { + type uint16 { + range "1..4095"; + } + units centiseconds; + default 100; + description + "Configures the interval that VRRPv3 advertisements + are sent from the specified interface."; + } + } + } // advertise-interval-choice + + container track { + description + "Enables the specified VRRP instance to track interfaces + or networks."; + container interfaces { + description + "Enables the specified VRRPv2 or VRRPv3 instance to track + interfaces. Interface tracking prevents traffic loss by + detecting the availability of interfaces. The operational + states of other interfaces are associated with the + priority of a VRRP router. When a tracked interface + becomes unavailable (or 'operational down'), the priority + of the VRRP router decrements. When an unavailable + interface becomes available again, the priority of the + VRRP router is incremented by the same amount."; + + list interface { + key "interface"; + description + "Interface to track."; + leaf interface { + type if:interface-ref; + must "/if:interfaces/if:interface[if:name=current()]/" + + "ip:ipv4" { + description + "Interface is IPv4."; + } + description + "Interface to track."; + } + leaf priority-decrement { + type uint8 { + range "1..254"; + } + default 10; + description + "Specifies how much to decrement the priority of the + VRRP instance if the interface goes down."; + } + } // interface + } // interfaces + + container networks { + description + "Enables the VRRPv2 or VRRPv3 router instance to track the + specified networks through their IPv4 network prefixes. + Network tracking prevents traffic loss by detecting + network connectivity failure. The states of + connectivity to some networks are associated with the + priority of a VRRP router. When connectivity to a + tracked network represented by its prefix is lost, the + priority of the VRRP router decrements. When an + unavailable network is again reachable, the priority of + the VRRP router is incremented by the same amount."; + list network { + key "prefix"; + description + "Enables the specified VRRPv2 or VRRPv3 instance to + track an IPv4 network by specifying the prefix of the + IPv4 network."; + + leaf prefix { + type inet:ipv4-prefix; + description + "The IPv4 prefix of the network to track."; + } + + leaf priority-decrement { + type uint8 { + range "1..254"; + } + default 10; + description + "Specifies how much to decrement the priority of the + VRRP router if there is a failure in the IPv4 + network."; + } + } // network + } // networks + } // track + + container virtual-ipv4-addresses { + description + "Configures the virtual IPv4 address for the + VRRP interface."; + + list virtual-ipv4-address { + key "ipv4-address"; + max-elements 16; + description + "Virtual IPv4 addresses for a single VRRP instance. For a + VRRP owner router, the virtual address must match one + of the IPv4 addresses configured on the interface + corresponding to the virtual router."; + + leaf ipv4-address { + type inet:ipv4-address; + description + "An IPv4 address associated with a virtual router."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 1.2"; + } + } // virtual-ipv4-address + } // virtual-ipv4-addresses + } // vrrp-ipv4-attributes + + grouping vrrp-ipv6-attributes { + description + "Group of VRRP attributes for IPv6."; + + uses vrrp-common-attributes; + + leaf advertise-interval-centi-sec { + type uint16 { + range "1..4095"; + } + units centiseconds; + default 100; + description + "Configures the interval that VRRPv3 advertisements + are sent from the specified interface."; + } + + container track { + description + "Enables the specified VRRP instance to track interfaces + or networks."; + container interfaces { + description + "Enables the specified VRRPv2 or VRRPv3 instance to track + interfaces. Interface tracking prevents traffic loss by + detecting the availability of interfaces. The operational + states of other interfaces are associated with the + priority of a VRRP router. When a tracked interface + becomes unavailable (or 'operational down'), the priority + of the VRRP router decrements. When an unavailable + interface becomes available again, the priority of the + VRRP router is incremented by the same amount."; + list interface { + key "interface"; + description + "Interface to track."; + + leaf interface { + type if:interface-ref; + must "/if:interfaces/if:interface[if:name=current()]/" + + "ip:ipv6" { + description + "Interface is IPv6."; + } + description + "Interface to track."; + } + + leaf priority-decrement { + type uint8 { + range "1..254"; + } + default 10; + description + "Specifies how much to decrement the priority of the + VRRP instance if the interface goes down."; + } + } // interface + } // interfaces + + container networks { + description + "Enables the VRRPv2 or VRRPv3 router instance to track the + specified networks through their IPv6 network prefixes. + Network tracking prevents traffic loss by detecting + network connectivity failure. The states of + connectivity to some networks are associated with the + priority of a VRRP router. When connectivity to a + tracked network represented by its prefix is lost, the + priority of the VRRP router decrements. When an + unavailable network is again reachable, the priority of + the VRRP router is incremented by the same amount."; + list network { + key "prefix"; + description + "Enables the specified VRRPv2 or VRRPv3 instance to + track an IPv6 network by specifying the prefix of the + IPv6 network."; + + leaf prefix { + type inet:ipv6-prefix; + description + "The IPv6 prefix of the network to track."; + } + + leaf priority-decrement { + type uint8 { + range "1..254"; + } + default 10; + description + "Specifies how much to decrement the priority of the + VRRP router if there is a failure in the IPv6 + network."; + } + } // network + } // networks + } // track + + container virtual-ipv6-addresses { + description + "Configures the virtual IPv6 address for the + VRRP interface."; + list virtual-ipv6-address { + key "ipv6-address"; + max-elements 2; + description + "Two IPv6 addresses are allowed. The first address must + be a link-local address. The second address can be a + link-local or global address."; + + leaf ipv6-address { + type inet:ipv6-address; + description + "An IPv6 address associated with a virtual router."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 1.3"; + } + } // virtual-ipv6-address + } // virtual-ipv6-addresses + } // vrrp-ipv6-attributes + + grouping vrrp-state-attributes { + description + "Group of VRRP state attributes."; + + leaf state { + type identityref { + base vrrp:vrrp-state-type; + } + config false; + description + "Operational state."; + } + + leaf is-owner { + type boolean; + config false; + description + "Set to 'true' if this virtual router is the owner."; + } + + leaf last-adv-source { + type inet:ip-address; + config false; + description + "Last advertised IPv4/IPv6 source address."; + } + + leaf up-datetime { + type yang:date-and-time; + config false; + description + "The date and time when this virtual router + transitioned out of 'init' state."; + } + + leaf master-down-interval { + type uint32; + units centiseconds; + config false; + description + "Time interval for the backup virtual router to declare + 'master down'."; + } + + leaf skew-time { + type uint32; + units microseconds; + config false; + description + "Calculated based on the priority and advertisement + interval configuration command parameters. See RFC 3768."; + } + + leaf last-event { + type identityref { + base vrrp:vrrp-event-type; + } + config false; + description + "Last reported event."; + } + + leaf new-master-reason { + type new-master-reason-type; + config false; + description + "Indicates why the virtual router has transitioned to + master state."; + } + + container statistics { + config false; + description + "VRRP statistics."; + + leaf discontinuity-datetime { + type yang:date-and-time; + description + "The time on the most recent occasion at which any one or + more of the VRRP statistics counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time that the + local management subsystem re-initialized itself."; + } + + leaf master-transitions { + type yang:counter32; + description + "The total number of times that this virtual router's + state has transitioned to 'master'."; + } + + leaf advertisement-rcvd { + type yang:counter64; + description + "The total number of VRRP advertisements received by + this virtual router."; + } + + leaf advertisement-sent { + type yang:counter64; + description + "The total number of VRRP advertisements sent by + this virtual router."; + } + + leaf interval-errors { + if-feature validate-interval-errors; + type yang:counter64; + description + "The total number of VRRP advertisement packets received + with an advertisement interval different than the + interval configured for the local virtual router."; + } + + leaf priority-zero-pkts-rcvd { + type yang:counter64; + description + "The total number of VRRP packets received by the + virtual router with a priority of 0."; + } + + leaf priority-zero-pkts-sent { + type yang:counter64; + description + "The total number of VRRP packets sent by the + virtual router with a priority of 0."; + } + + leaf invalid-type-pkts-rcvd { + type yang:counter64; + description + "The number of VRRP packets received by the virtual + router with an invalid value in the 'type' field."; + } + leaf address-list-errors { + if-feature validate-address-list-errors; + type yang:counter64; + description + "The total number of packets received with an + address list that does not match the locally + configured address list for the virtual router."; + } + + leaf packet-length-errors { + type yang:counter64; + description + "The total number of packets received with a packet + length less than the length of the VRRP header."; + } + } // statistics + } // vrrp-state-attributes + + grouping vrrp-global-state-attributes { + description + "Group of VRRP global state attributes."; + + leaf virtual-routers { + type uint32; + description + "Number of configured virtual routers."; + } + + leaf interfaces { + type uint32; + description + "Number of interfaces with VRRP configured."; + } + + container statistics { + description + "VRRP global statistics."; + + leaf discontinuity-datetime { + type yang:date-and-time; + description + "The time on the most recent occasion at which any + one or more of checksum-errors, version-errors, + vrid-errors, or ip-ttl-errors suffered a + discontinuity. + + If no such discontinuities have occurred since the last + re-initialization of the local management subsystem, + then this node contains the time that the local management + subsystem re-initialized itself."; + } + + leaf checksum-errors { + type yang:counter64; + description + "The total number of VRRP packets received with an invalid + VRRP checksum value."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 5.2.8"; + } + + leaf version-errors { + type yang:counter64; + description + "The total number of VRRP packets received with an unknown + or unsupported version number."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 5.2.1"; + } + + leaf vrid-errors { + type yang:counter64; + description + "The total number of VRRP packets received with a VRID that + is not valid for any virtual router on this router."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. Section 5.2.3"; + } + + leaf ip-ttl-errors { + type yang:counter64; + description + "The total number of VRRP packets received by the + virtual router with IP TTL (IPv4) or Hop Limit (IPv6) + not equal to 255."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6. + Sections 5.1.1.3 and 5.1.2.3"; + } + } // statistics + } // vrrp-global-state-attributes + + /* + * Configuration data and operational state data nodes + */ + + augment "/if:interfaces/if:interface/ip:ipv4" { + description + "Augments IPv4 interface."; + + container vrrp { + description + "Configures VRRP version 2 or 3 for IPv4."; + + list vrrp-instance { + key "vrid"; + description + "Defines a virtual router, identified by a VRID, within the + IPv4 address space."; + + uses vrrp-ipv4-attributes; + uses vrrp-state-attributes; + } + } + } // augments ipv4 + + augment "/if:interfaces/if:interface/ip:ipv6" { + description + "Augments IPv6 interface."; + + container vrrp { + description + "Configures VRRP version 3 for IPv6."; + + list vrrp-instance { + must "derived-from-or-self(version, 'vrrp-v3')" { + description + "IPv6 is only supported by version 3."; + } + key "vrid"; + description + "Defines a virtual router, identified by a VRID, within the + IPv6 address space."; + + uses vrrp-ipv6-attributes; + uses vrrp-state-attributes; + } + } + } // augments ipv6 + + container vrrp { + config false; + description + "VRRP data at the global level."; + + uses vrrp-global-state-attributes; + } + + /* + * Notifications + */ + + notification vrrp-new-master-event { + description + "Notification event for the election of a new VRRP master."; + leaf master-ip-address { + type inet:ip-address; + mandatory true; + description + "IPv4 or IPv6 address of the new master."; + } + leaf new-master-reason { + type new-master-reason-type; + mandatory true; + description + "Indicates why the virtual router has transitioned to + master state."; + } + } + + notification vrrp-protocol-error-event { + description + "Notification event for a VRRP protocol error."; + leaf protocol-error-reason { + type identityref { + base vrrp:vrrp-error-global; + } + mandatory true; + description + "Indicates the reason for the protocol error."; + } + } + + notification vrrp-virtual-router-error-event { + description + "Notification event for an error that happened on a + virtual router."; + leaf interface { + type if:interface-ref; + mandatory true; + description + "Indicates the interface on which the event has occurred."; + } + + choice ip-version { + mandatory true; + description + "The error may have happened on either an IPv4 virtual + router or an IPv6 virtual router. The information + related to a specific IP version is provided by one of + the following cases."; + case ipv4 { + description + "IPv4."; + container ipv4 { + description + "Error information for IPv4."; + leaf vrid { + type leafref { + path "/if:interfaces/if:interface" + + "[if:name = current()/../../vrrp:interface]/" + + "ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; + } + mandatory true; + description + "Indicates the virtual router on which the event has + occurred."; + } + } + } + case ipv6 { + description + "IPv6."; + container ipv6 { + description + "Error information for IPv6."; + leaf vrid { + type leafref { + path "/if:interfaces/if:interface" + + "[if:name = current()/../../vrrp:interface]/" + + "ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; + } + mandatory true; + description + "Indicates the virtual router on which the event has + occurred."; + } + } + } + } + + leaf virtual-router-error-reason { + type identityref { + base vrrp:vrrp-error-virtual-router; + } + mandatory true; + description + "Indicates the reason for the virtual router error."; + } + } +} diff --git a/models/ietf/RFC/ietf-wson-topology.yang b/models/ietf/RFC/ietf-wson-topology.yang new file mode 100644 index 0000000000000000000000000000000000000000..fe13fd19d231d7533a5e3102d5af32276185561b --- /dev/null +++ b/models/ietf/RFC/ietf-wson-topology.yang @@ -0,0 +1,1635 @@ +module ietf-wson-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-wson-topology"; + prefix wsont; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-te-topology { + prefix tet; + reference + "RFC 8795: YANG Data Model for + Traffic Engineering (TE) Topologies"; + } + + import ietf-layer0-types { + prefix l0-types; + reference + "RFC 9093: A YANG Data Model for Layer 0 Types"; + } + + organization + "IETF CCAMP Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/ccamp/> + WG List: <mailto:ccamp@ietf.org> + + Editor: Haomian Zheng <zhenghaomian@huawei.com> + Editor: Young Lee <younglee.tx@gmail.com> + Editor: Aihua Guo <aihuaguo.ietf@gmail.com> + Editor: Victor Lopez <victor.lopez@nokia.com> + Editor: Daniel King <d.king@lancaster.ac.uk>"; + + description + "This module provides a YANG data model for the routing and + wavelength assignment (RWA) Traffic Engineering (TE) + topology in Wavelength Switched Optical Networks (WSONs). + The YANG data model described in this document is a WSON + technology-specific YANG data model augmenting the generic TE + topology module (ietf-te-topology) based on the information + model developed in RFC 7446 and the two encoding documents + RFC 7579 and RFC 7581. + + Copyright (c) 2021 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 Simplified + 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 9094; see + the RFC itself for full legal notices."; + + revision 2021-08-13 { + description + "Initial version"; + + reference + "RFC 9094: A YANG Data Model for Wavelength Switched + Optical Networks (WSONs)"; + } + + /* + * Data nodes + */ + + augment "/nw:networks/nw:network/nw:network-types" + + "/tet:te-topology" { + description + "Augment network types to define the WSON topology type."; + container wson-topology { + presence "Its presence identifies the WSON topology type."; + description + "Introduce a new network type for WSON topology."; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te" + + "/tet:te-node-attributes" { + when '/nw:networks/nw:network/nw:network-types' + + '/tet:te-topology/wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE node attributes."; + container wson-node { + presence "The TE node is a WSON node."; + description + "WSON node attributes"; + leaf is-reconfigurable-node { + type boolean; + default "true"; + description + "Indicates whether the WSON node is reconfigurable: + - true: the node is reconfigurable, i.e., + it is representing a Reconfigurable Optical + Add/Drop Multiplexer (ROADM) node; + - false: the node is not reconfigurable, i.e., + it is representing a Fixed Optical Add/Drop + Multiplexer (FOADM) node."; + } + } + } + + /* + * Augment TE label range information + */ + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TE node + connectivity matrices."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the source LTP + of the connectivity matrix entry."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the destination LTP + of the connectivity matrix entry."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TE node + connectivity matrices information source."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the source LTP + of the connectivity matrix entry information source."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the destination LTP + of the connectivity matrix entry information source."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the Tunnel + Termination Point (TTP) Local Link Connectivities."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TTP + Local Link Connectivity entry."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TE link."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TE link + information source."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction" { + description + "Augment TE label range information for the TE link template."; + uses l0-types:l0-label-range-info; + } + + /* + * Augment TE label + */ + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TE node + connectivity matrices."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/" + + "tet:label-restriction/tet:label-end/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TE node + connectivity matrices."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/" + + "tet:label-restriction/tet:label-step/" + + "tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TE node + connectivity matrices."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:underlay/tet:primary-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path of the + TE node connectivity matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:underlay/tet:backup-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path of the + TE node connectivity matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TE node connectivity + matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TE node connectivity + matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TE node connectivity matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the source LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the source LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the source LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the destination LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the destination LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the destination LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:primary-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:backup-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:optimizations/" + + "tet:algorithm/tet:metric/tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:optimizations/" + + "tet:algorithm/tet:metric/tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TE node connectivity + matrices information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TE node connectivity + matrices information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TE node connectivity + matrices information source."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TE node connectivity matrices of the information + source entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TE node connectivity matrices of the information + source entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TE node connectivity matrices + information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TE node connectivity matrices + information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TE node connectivity matrices information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the source LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the source LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the source LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the destination LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the destination LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the destination LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the connectivity matrix entry + information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the connectivity matrix entry + information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TTP + Local Link Connectivities."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TTP + Local Link Connectivities."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when '../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TTP + Local Link Connectivities."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TTP Local Link Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TTP Local Link Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TTP Local Link + Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TTP Local Link + Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TTP Local Link Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TTP + Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TTP + Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TTP + Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TTP Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TTP Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TTP Local Link + Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TTP Local Link + Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TTP Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TE link."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TE link."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TE link."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TE link."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TE link."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TE link + information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TE link + information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TE link + information source."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + description + "Augment TE label hop for the underlay primary path + of the TE link template."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + description + "Augment TE label hop for the underlay backup path + of the TE link template."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + description + "Augment TE label range start for the TE link template."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + description + "Augment TE label range end for the TE link template."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + description + "Augment TE label range step for the TE link template."; + case wson { + uses l0-types:wson-label-step; + } + } +} diff --git a/models/ietf/RFC/ietf-wson-topology@2021-08-13.yang b/models/ietf/RFC/ietf-wson-topology@2021-08-13.yang new file mode 100644 index 0000000000000000000000000000000000000000..fe13fd19d231d7533a5e3102d5af32276185561b --- /dev/null +++ b/models/ietf/RFC/ietf-wson-topology@2021-08-13.yang @@ -0,0 +1,1635 @@ +module ietf-wson-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-wson-topology"; + prefix wsont; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-te-topology { + prefix tet; + reference + "RFC 8795: YANG Data Model for + Traffic Engineering (TE) Topologies"; + } + + import ietf-layer0-types { + prefix l0-types; + reference + "RFC 9093: A YANG Data Model for Layer 0 Types"; + } + + organization + "IETF CCAMP Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/ccamp/> + WG List: <mailto:ccamp@ietf.org> + + Editor: Haomian Zheng <zhenghaomian@huawei.com> + Editor: Young Lee <younglee.tx@gmail.com> + Editor: Aihua Guo <aihuaguo.ietf@gmail.com> + Editor: Victor Lopez <victor.lopez@nokia.com> + Editor: Daniel King <d.king@lancaster.ac.uk>"; + + description + "This module provides a YANG data model for the routing and + wavelength assignment (RWA) Traffic Engineering (TE) + topology in Wavelength Switched Optical Networks (WSONs). + The YANG data model described in this document is a WSON + technology-specific YANG data model augmenting the generic TE + topology module (ietf-te-topology) based on the information + model developed in RFC 7446 and the two encoding documents + RFC 7579 and RFC 7581. + + Copyright (c) 2021 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 Simplified + 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 9094; see + the RFC itself for full legal notices."; + + revision 2021-08-13 { + description + "Initial version"; + + reference + "RFC 9094: A YANG Data Model for Wavelength Switched + Optical Networks (WSONs)"; + } + + /* + * Data nodes + */ + + augment "/nw:networks/nw:network/nw:network-types" + + "/tet:te-topology" { + description + "Augment network types to define the WSON topology type."; + container wson-topology { + presence "Its presence identifies the WSON topology type."; + description + "Introduce a new network type for WSON topology."; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te" + + "/tet:te-node-attributes" { + when '/nw:networks/nw:network/nw:network-types' + + '/tet:te-topology/wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE node attributes."; + container wson-node { + presence "The TE node is a WSON node."; + description + "WSON node attributes"; + leaf is-reconfigurable-node { + type boolean; + default "true"; + description + "Indicates whether the WSON node is reconfigurable: + - true: the node is reconfigurable, i.e., + it is representing a Reconfigurable Optical + Add/Drop Multiplexer (ROADM) node; + - false: the node is not reconfigurable, i.e., + it is representing a Fixed Optical Add/Drop + Multiplexer (FOADM) node."; + } + } + } + + /* + * Augment TE label range information + */ + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TE node + connectivity matrices."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the source LTP + of the connectivity matrix entry."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the destination LTP + of the connectivity matrix entry."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TE node + connectivity matrices information source."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the source LTP + of the connectivity matrix entry information source."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the destination LTP + of the connectivity matrix entry information source."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the Tunnel + Termination Point (TTP) Local Link Connectivities."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TTP + Local Link Connectivity entry."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TE link."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction" { + when '../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range information for the TE link + information source."; + uses l0-types:l0-label-range-info; + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction" { + description + "Augment TE label range information for the TE link template."; + uses l0-types:l0-label-range-info; + } + + /* + * Augment TE label + */ + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TE node + connectivity matrices."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/" + + "tet:label-restriction/tet:label-end/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TE node + connectivity matrices."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/" + + "tet:label-restriction/tet:label-step/" + + "tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TE node + connectivity matrices."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:underlay/tet:primary-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path of the + TE node connectivity matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:underlay/tet:backup-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path of the + TE node connectivity matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TE node connectivity + matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TE node connectivity + matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TE node connectivity matrices."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the source LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the source LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the source LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the destination LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the destination LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the destination LTP + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:primary-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:backup-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:optimizations/" + + "tet:algorithm/tet:metric/tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:optimizations/" + + "tet:algorithm/tet:metric/tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the connectivity matrix entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TE node connectivity + matrices information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TE node connectivity + matrices information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TE node connectivity + matrices information source."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TE node connectivity matrices of the information + source entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TE node connectivity matrices of the information + source entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TE node connectivity matrices + information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TE node connectivity matrices + information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TE node connectivity matrices information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the source LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the source LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the source LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the destination LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the destination LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the destination LTP + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the connectivity matrix entry + information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the connectivity matrix entry + information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the connectivity matrix entry information source."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TTP + Local Link Connectivities."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TTP + Local Link Connectivities."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when '../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TTP + Local Link Connectivities."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TTP Local Link Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TTP Local Link Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TTP Local Link + Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TTP Local Link + Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TTP Local Link Connectivities."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TTP + Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TTP + Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TTP + Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TTP Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TTP Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TTP Local Link + Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TTP Local Link + Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TTP Local Link Connectivity entry."; + case wson { + uses l0-types:wson-label-hop; + } + } + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TE link."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when '../../../../../../../../' + + 'nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TE link."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TE link."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TE link."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TE link."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range start for the TE link + information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when '../../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range end for the TE link + information source."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when '../../../../../../nw:network-types/tet:te-topology/' + + 'wsont:wson-topology' { + description + "Augmentation parameters apply only for networks with + WSON topology type."; + } + description + "Augment TE label range step for the TE link + information source."; + case wson { + uses l0-types:wson-label-step; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + description + "Augment TE label hop for the underlay primary path + of the TE link template."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + description + "Augment TE label hop for the underlay backup path + of the TE link template."; + case wson { + uses l0-types:wson-label-hop; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + description + "Augment TE label range start for the TE link template."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + description + "Augment TE label range end for the TE link template."; + case wson { + uses l0-types:wson-label-start-end; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + description + "Augment TE label range step for the TE link template."; + case wson { + uses l0-types:wson-label-step; + } + } +} diff --git a/models/ietf/RFC/ietf-x509-cert-to-name.yang b/models/ietf/RFC/ietf-x509-cert-to-name.yang new file mode 100644 index 0000000000000000000000000000000000000000..cbc9be25d9c28059c8e75ecf758f3a63c4c813c1 --- /dev/null +++ b/models/ietf/RFC/ietf-x509-cert-to-name.yang @@ -0,0 +1,303 @@ +module ietf-x509-cert-to-name { + + namespace "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"; + prefix x509c2n; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of YANG definitions for + extracting a name from an X.509 certificate. + The algorithm used to extract a name from an X.509 certificate + was first defined in RFC 6353. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model for + the Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + + } + + typedef tls-fingerprint { + type yang:hex-string { + pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){0,254}'; + } + description + "A fingerprint value that can be used to uniquely reference + other data of potentially arbitrary length. + + A tls-fingerprint value is composed of a 1-octet hashing + algorithm identifier followed by the fingerprint value. The + first octet value identifying the hashing algorithm is taken + from the IANA 'TLS HashAlgorithm Registry' (RFC 5246). The + remaining octets are filled using the results of the hashing + algorithm."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.SnmpTLSFingerprint"; + } + + /* Identities */ + + identity cert-to-name { + description + "Base identity for algorithms to derive a name from a + certificate."; + } + + identity specified { + base cert-to-name; + description + "Directly specifies the name to be used for the certificate. + The value of the leaf 'name' in the cert-to-name list is + used."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSpecified"; + } + + identity san-rfc822-name { + base cert-to-name; + description + "Maps a subjectAltName's rfc822Name to a name. The local part + of the rfc822Name is passed unaltered, but the host-part of + the name must be passed in lowercase. For example, the + rfc822Name field FooBar@Example.COM is mapped to name + FooBar@example.com."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANRFC822Name"; + } + + identity san-dns-name { + base cert-to-name; + description + "Maps a subjectAltName's dNSName to a name after first + converting it to all lowercase (RFC 5280 does not specify + converting to lowercase, so this involves an extra step). + This mapping results in a 1:1 correspondence between + subjectAltName dNSName values and the name values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANDNSName"; + } + + identity san-ip-address { + base cert-to-name; + description + "Maps a subjectAltName's iPAddress to a name by + transforming the binary-encoded address as follows: + + 1) for IPv4, the value is converted into a + decimal-dotted quad address (e.g., '192.0.2.1'). + + 2) for IPv6 addresses, the value is converted into a + 32-character, all-lowercase hexadecimal string + without any colon separators. + + This mapping results in a 1:1 correspondence between + subjectAltName iPAddress values and the name values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANIpAddress"; + } + + identity san-any { + base cert-to-name; + description + "Maps any of the following fields using the corresponding + mapping algorithms: + + +------------+-----------------+ + | Type | Algorithm | + |------------+-----------------| + | rfc822Name | san-rfc822-name | + | dNSName | san-dns-name | + | iPAddress | san-ip-address | + +------------+-----------------+ + + The first matching subjectAltName value found in the + certificate of the above types MUST be used when deriving + the name. The mapping algorithm specified in the + 'Algorithm' column MUST be used to derive the name. + + This mapping results in a 1:1 correspondence between + subjectAltName values and name values. The three sub-mapping + algorithms produced by this combined algorithm cannot produce + conflicting results between themselves."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANAny"; + } + + identity common-name { + base cert-to-name; + description + "Maps a certificate's CommonName to a name after converting + it to a UTF-8 encoding. The usage of CommonNames is + deprecated, and users are encouraged to use subjectAltName + mapping methods instead. This mapping results in a 1:1 + correspondence between certificate CommonName values and name + values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertCommonName"; + } + + /* + * Groupings + */ + + grouping cert-to-name { + description + "Defines nodes for mapping certificates to names. Modules + that use this grouping should describe how the resulting + name is used."; + + list cert-to-name { + key id; + description + "This list defines how certificates are mapped to names. + The name is derived by considering each cert-to-name + list entry in order. The cert-to-name entry's fingerprint + determines whether the list entry is a match: + + 1) If the cert-to-name list entry's fingerprint value + matches that of the presented certificate, then consider + the list entry a successful match. + + 2) If the cert-to-name list entry's fingerprint value + matches that of a locally held copy of a trusted CA + certificate, and that CA certificate was part of the CA + certificate chain to the presented certificate, then + consider the list entry a successful match. + + Once a matching cert-to-name list entry has been found, the + map-type is used to determine how the name associated with + the certificate should be determined. See the map-type + leaf's description for details on determining the name value. + If it is impossible to determine a name from the cert-to-name + list entry's data combined with the data presented in the + certificate, then additional cert-to-name list entries MUST + be searched to look for another potential match. + + Security administrators are encouraged to make use of + certificates with subjectAltName fields that can be mapped to + names so that a single root CA certificate can allow all + child certificates' subjectAltName fields to map directly to + a name via a 1:1 transformation."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNEntry"; + + leaf id { + type uint32; + description + "The id specifies the order in which the entries in the + cert-to-name list are searched. Entries with lower + numbers are searched first."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNID"; + } + + leaf fingerprint { + type x509c2n:tls-fingerprint; + mandatory true; + description + "Specifies a value with which the fingerprint of the + full certificate presented by the peer is compared. If + the fingerprint of the full certificate presented by the + peer does not match the fingerprint configured, then the + entry is skipped, and the search for a match continues."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNFingerprint"; + } + + leaf map-type { + type identityref { + base cert-to-name; + } + mandatory true; + description + "Specifies the algorithm used to map the certificate + presented by the peer to a name. + + Mappings that need additional configuration objects should + use the 'when' statement to make them conditional based on + the map-type."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNMapType"; + } + + leaf name { + when "../map-type = 'x509c2n:specified'"; + type string; + mandatory true; + description + "Directly specifies the NETCONF username when the + map-type is 'specified'."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNData"; + } + } + } +} diff --git a/models/ietf/RFC/ietf-x509-cert-to-name@2014-12-10.yang b/models/ietf/RFC/ietf-x509-cert-to-name@2014-12-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..cbc9be25d9c28059c8e75ecf758f3a63c4c813c1 --- /dev/null +++ b/models/ietf/RFC/ietf-x509-cert-to-name@2014-12-10.yang @@ -0,0 +1,303 @@ +module ietf-x509-cert-to-name { + + namespace "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"; + prefix x509c2n; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of YANG definitions for + extracting a name from an X.509 certificate. + The algorithm used to extract a name from an X.509 certificate + was first defined in RFC 6353. + + Copyright (c) 2014 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model for + the Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + + } + + typedef tls-fingerprint { + type yang:hex-string { + pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){0,254}'; + } + description + "A fingerprint value that can be used to uniquely reference + other data of potentially arbitrary length. + + A tls-fingerprint value is composed of a 1-octet hashing + algorithm identifier followed by the fingerprint value. The + first octet value identifying the hashing algorithm is taken + from the IANA 'TLS HashAlgorithm Registry' (RFC 5246). The + remaining octets are filled using the results of the hashing + algorithm."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.SnmpTLSFingerprint"; + } + + /* Identities */ + + identity cert-to-name { + description + "Base identity for algorithms to derive a name from a + certificate."; + } + + identity specified { + base cert-to-name; + description + "Directly specifies the name to be used for the certificate. + The value of the leaf 'name' in the cert-to-name list is + used."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSpecified"; + } + + identity san-rfc822-name { + base cert-to-name; + description + "Maps a subjectAltName's rfc822Name to a name. The local part + of the rfc822Name is passed unaltered, but the host-part of + the name must be passed in lowercase. For example, the + rfc822Name field FooBar@Example.COM is mapped to name + FooBar@example.com."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANRFC822Name"; + } + + identity san-dns-name { + base cert-to-name; + description + "Maps a subjectAltName's dNSName to a name after first + converting it to all lowercase (RFC 5280 does not specify + converting to lowercase, so this involves an extra step). + This mapping results in a 1:1 correspondence between + subjectAltName dNSName values and the name values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANDNSName"; + } + + identity san-ip-address { + base cert-to-name; + description + "Maps a subjectAltName's iPAddress to a name by + transforming the binary-encoded address as follows: + + 1) for IPv4, the value is converted into a + decimal-dotted quad address (e.g., '192.0.2.1'). + + 2) for IPv6 addresses, the value is converted into a + 32-character, all-lowercase hexadecimal string + without any colon separators. + + This mapping results in a 1:1 correspondence between + subjectAltName iPAddress values and the name values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANIpAddress"; + } + + identity san-any { + base cert-to-name; + description + "Maps any of the following fields using the corresponding + mapping algorithms: + + +------------+-----------------+ + | Type | Algorithm | + |------------+-----------------| + | rfc822Name | san-rfc822-name | + | dNSName | san-dns-name | + | iPAddress | san-ip-address | + +------------+-----------------+ + + The first matching subjectAltName value found in the + certificate of the above types MUST be used when deriving + the name. The mapping algorithm specified in the + 'Algorithm' column MUST be used to derive the name. + + This mapping results in a 1:1 correspondence between + subjectAltName values and name values. The three sub-mapping + algorithms produced by this combined algorithm cannot produce + conflicting results between themselves."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANAny"; + } + + identity common-name { + base cert-to-name; + description + "Maps a certificate's CommonName to a name after converting + it to a UTF-8 encoding. The usage of CommonNames is + deprecated, and users are encouraged to use subjectAltName + mapping methods instead. This mapping results in a 1:1 + correspondence between certificate CommonName values and name + values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertCommonName"; + } + + /* + * Groupings + */ + + grouping cert-to-name { + description + "Defines nodes for mapping certificates to names. Modules + that use this grouping should describe how the resulting + name is used."; + + list cert-to-name { + key id; + description + "This list defines how certificates are mapped to names. + The name is derived by considering each cert-to-name + list entry in order. The cert-to-name entry's fingerprint + determines whether the list entry is a match: + + 1) If the cert-to-name list entry's fingerprint value + matches that of the presented certificate, then consider + the list entry a successful match. + + 2) If the cert-to-name list entry's fingerprint value + matches that of a locally held copy of a trusted CA + certificate, and that CA certificate was part of the CA + certificate chain to the presented certificate, then + consider the list entry a successful match. + + Once a matching cert-to-name list entry has been found, the + map-type is used to determine how the name associated with + the certificate should be determined. See the map-type + leaf's description for details on determining the name value. + If it is impossible to determine a name from the cert-to-name + list entry's data combined with the data presented in the + certificate, then additional cert-to-name list entries MUST + be searched to look for another potential match. + + Security administrators are encouraged to make use of + certificates with subjectAltName fields that can be mapped to + names so that a single root CA certificate can allow all + child certificates' subjectAltName fields to map directly to + a name via a 1:1 transformation."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNEntry"; + + leaf id { + type uint32; + description + "The id specifies the order in which the entries in the + cert-to-name list are searched. Entries with lower + numbers are searched first."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNID"; + } + + leaf fingerprint { + type x509c2n:tls-fingerprint; + mandatory true; + description + "Specifies a value with which the fingerprint of the + full certificate presented by the peer is compared. If + the fingerprint of the full certificate presented by the + peer does not match the fingerprint configured, then the + entry is skipped, and the search for a match continues."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNFingerprint"; + } + + leaf map-type { + type identityref { + base cert-to-name; + } + mandatory true; + description + "Specifies the algorithm used to map the certificate + presented by the peer to a name. + + Mappings that need additional configuration objects should + use the 'when' statement to make them conditional based on + the map-type."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNMapType"; + } + + leaf name { + when "../map-type = 'x509c2n:specified'"; + type string; + mandatory true; + description + "Directly specifies the NETCONF username when the + map-type is 'specified'."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNData"; + } + } + } +} diff --git a/models/ietf/RFC/ietf-yang-library.yang b/models/ietf/RFC/ietf-yang-library.yang new file mode 100644 index 0000000000000000000000000000000000000000..dac53a1d0a10009c0c48903ef31b959fad638ede --- /dev/null +++ b/models/ietf/RFC/ietf-yang-library.yang @@ -0,0 +1,544 @@ +module ietf-yang-library { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library"; + prefix yanglib; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-datastores { + prefix ds; + reference + "RFC 8342: Network Management Datastore Architecture + (NMDA)"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Kent Watsen + <mailto:kent+ietf@watsen.net> + + Author: Robert Wilton + <mailto:rwilton@cisco.com>"; + description + "This module provides information about the YANG modules, + datastores, and datastore schemas used by a network + management server. + 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. + + Copyright (c) 2019 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 Simplified 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 8525; see + the RFC itself for full legal notices."; + + revision 2019-01-04 { + description + "Added support for multiple datastores according to the + Network Management Datastore Architecture (NMDA)."; + reference + "RFC 8525: YANG Library"; + } + revision 2016-04-09 { + description + "Initial revision."; + reference + "RFC 7895: YANG Module Library"; + } + + /* + * Typedefs + */ + + typedef revision-identifier { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + description + "Represents a specific date in YYYY-MM-DD format."; + } + + /* + * Groupings + */ + grouping module-identification-leafs { + description + "Parameters for identifying YANG modules and submodules."; + leaf name { + type yang:yang-identifier; + mandatory true; + description + "The YANG module or submodule name."; + } + leaf revision { + type revision-identifier; + description + "The YANG module or submodule revision date. If no revision + statement is present in the YANG module or submodule, this + leaf is not instantiated."; + } + } + + grouping location-leaf-list { + description + "Common leaf-list parameter for the locations of modules and + submodules."; + leaf-list location { + type inet:uri; + description + "Contains a URL that represents the YANG schema + resource for this module or submodule. + + This leaf will only be present if there is a URL + available for retrieval of the schema for this entry."; + } + } + + grouping module-implementation-parameters { + description + "Parameters for describing the implementation of a module."; + leaf-list feature { + type yang:yang-identifier; + description + "List of all YANG feature names from this module that are + supported by the server, regardless whether they are defined + in the module or any included submodule."; + } + leaf-list deviation { + type leafref { + path "../../module/name"; + } + + description + "List of all YANG deviation modules used by this server to + modify the conformance of the module associated with this + entry. Note that the same module can be used for deviations + for multiple modules, so the same entry MAY appear within + multiple 'module' entries. + + This reference MUST NOT (directly or indirectly) + refer to the module being deviated. + + Robust clients may want to make sure that they handle a + situation where a module deviates itself (directly or + indirectly) gracefully."; + } + } + + grouping module-set-parameters { + description + "A set of parameters that describe a module set."; + leaf name { + type string; + description + "An arbitrary name of the module set."; + } + list module { + key "name"; + description + "An entry in this list represents a module implemented by the + server, as per Section 5.6.5 of RFC 7950, with a particular + set of supported features and deviations."; + reference + "RFC 7950: The YANG 1.1 Data Modeling Language"; + uses module-identification-leafs; + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace identifier for this module."; + } + uses location-leaf-list; + list submodule { + key "name"; + description + "Each entry represents one submodule within the + parent module."; + uses module-identification-leafs; + uses location-leaf-list; + } + uses module-implementation-parameters; + } + list import-only-module { + key "name revision"; + description + "An entry in this list indicates that the server imports + reusable definitions from the specified revision of the + module but does not implement any protocol-accessible + objects from this revision. + + Multiple entries for the same module name MAY exist. This + can occur if multiple modules import the same module but + specify different revision dates in the import statements."; + leaf name { + type yang:yang-identifier; + description + "The YANG module name."; + } + leaf revision { + type union { + type revision-identifier; + type string { + length "0"; + } + } + description + "The YANG module revision date. + A zero-length string is used if no revision statement + is present in the YANG module."; + } + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace identifier for this module."; + } + uses location-leaf-list; + list submodule { + key "name"; + description + "Each entry represents one submodule within the + parent module."; + uses module-identification-leafs; + uses location-leaf-list; + } + } + } + + grouping yang-library-parameters { + description + "The YANG library data structure is represented as a grouping + so it can be reused in configuration or another monitoring + data structure."; + list module-set { + key "name"; + description + "A set of modules that may be used by one or more schemas. + + A module set does not have to be referentially complete, + i.e., it may define modules that contain import statements + for other modules not included in the module set."; + uses module-set-parameters; + } + list schema { + key "name"; + description + "A datastore schema that may be used by one or more + datastores. + + The schema must be valid and referentially complete, i.e., + it must contain modules to satisfy all used import + statements for all modules specified in the schema."; + leaf name { + type string; + description + "An arbitrary name of the schema."; + } + leaf-list module-set { + type leafref { + path "../../module-set/name"; + } + description + "A set of module-sets that are included in this schema. + If a non-import-only module appears in multiple module + sets, then the module revision and the associated features + and deviations must be identical."; + } + } + list datastore { + key "name"; + description + "A datastore supported by this server. + + Each datastore indicates which schema it supports. + + The server MUST instantiate one entry in this list per + specific datastore it supports. + Each datastore entry with the same datastore schema SHOULD + reference the same schema."; + leaf name { + type ds:datastore-ref; + description + "The identity of the datastore."; + } + leaf schema { + type leafref { + path "../../schema/name"; + } + mandatory true; + description + "A reference to the schema supported by this datastore. + All non-import-only modules of the schema are implemented + with their associated features and deviations."; + } + } + } + + /* + * Top-level container + */ + + container yang-library { + config false; + description + "Container holding the entire YANG library of this server."; + uses yang-library-parameters; + leaf content-id { + type string; + mandatory true; + description + "A server-generated identifier of the contents of the + '/yang-library' tree. The server MUST change the value of + this leaf if the information represented by the + '/yang-library' tree, except '/yang-library/content-id', has + changed."; + } + } + + /* + * Notifications + */ + + notification yang-library-update { + description + "Generated when any YANG library information on the + server has changed."; + leaf content-id { + type leafref { + path "/yanglib:yang-library/yanglib:content-id"; + } + mandatory true; + description + "Contains the YANG library content identifier for the updated + YANG library at the time the notification is generated."; + } + } + + /* + * Legacy groupings + */ + + grouping module-list { + status deprecated; + description + "The module data structure is represented as a grouping + so it can be reused in configuration or another monitoring + data structure."; + + grouping common-leafs { + status deprecated; + description + "Common parameters for YANG modules and submodules."; + leaf name { + type yang:yang-identifier; + status deprecated; + description + "The YANG module or submodule name."; + } + leaf revision { + type union { + type revision-identifier; + type string { + length "0"; + } + } + status deprecated; + description + "The YANG module or submodule revision date. + A zero-length string is used if no revision statement + is present in the YANG module or submodule."; + } + } + + grouping schema-leaf { + status deprecated; + description + "Common schema leaf parameter for modules and submodules."; + leaf schema { + type inet:uri; + description + "Contains a URL that represents the YANG schema + resource for this module or submodule. + + This leaf will only be present if there is a URL + available for retrieval of the schema for this entry."; + } + } + list module { + key "name revision"; + status deprecated; + description + "Each entry represents one revision of one module + currently supported by the server."; + uses common-leafs { + status deprecated; + } + uses schema-leaf { + status deprecated; + } + leaf namespace { + type inet:uri; + mandatory true; + status deprecated; + description + "The XML namespace identifier for this module."; + } + leaf-list feature { + type yang:yang-identifier; + status deprecated; + description + "List of YANG feature names from this module that are + supported by the server, regardless of whether they are + defined in the module or any included submodule."; + } + list deviation { + key "name revision"; + status deprecated; + + description + "List of YANG deviation module names and revisions + used by this server to modify the conformance of + the module associated with this entry. Note that + the same module can be used for deviations for + multiple modules, so the same entry MAY appear + within multiple 'module' entries. + + The deviation module MUST be present in the 'module' + list, with the same name and revision values. + The 'conformance-type' value will be 'implement' for + the deviation module."; + uses common-leafs { + status deprecated; + } + } + leaf conformance-type { + type enumeration { + enum implement { + description + "Indicates that the server implements one or more + protocol-accessible objects defined in the YANG module + identified in this entry. This includes deviation + statements defined in the module. + + For YANG version 1.1 modules, there is at most one + 'module' entry with conformance type 'implement' for a + particular module name, since YANG 1.1 requires that + at most one revision of a module is implemented. + + For YANG version 1 modules, there SHOULD NOT be more + than one 'module' entry for a particular module + name."; + } + enum import { + description + "Indicates that the server imports reusable definitions + from the specified revision of the module but does + not implement any protocol-accessible objects from + this revision. + + Multiple 'module' entries for the same module name MAY + exist. This can occur if multiple modules import the + same module but specify different revision dates in + the import statements."; + } + } + mandatory true; + status deprecated; + description + "Indicates the type of conformance the server is claiming + for the YANG module identified by this entry."; + } + list submodule { + key "name revision"; + status deprecated; + description + "Each entry represents one submodule within the + parent module."; + uses common-leafs { + status deprecated; + } + uses schema-leaf { + status deprecated; + } + } + } + } + + /* + * Legacy operational state data nodes + */ + + container modules-state { + config false; + status deprecated; + description + "Contains YANG module monitoring information."; + leaf module-set-id { + type string; + mandatory true; + status deprecated; + description + "Contains a server-specific identifier representing + the current set of modules and submodules. The + server MUST change the value of this leaf if the + information represented by the 'module' list instances + has changed."; + } + uses module-list { + status deprecated; + } + } + + /* + * Legacy notifications + */ + + notification yang-library-change { + status deprecated; + description + "Generated when the set of modules and submodules supported + by the server has changed."; + leaf module-set-id { + type leafref { + path "/yanglib:modules-state/yanglib:module-set-id"; + } + mandatory true; + status deprecated; + description + "Contains the module-set-id value representing the + set of modules and submodules supported at the server + at the time the notification is generated."; + } + } +} diff --git a/models/ietf/RFC/ietf-yang-library@2016-06-21.yang b/models/ietf/RFC/ietf-yang-library@2016-06-21.yang new file mode 100644 index 0000000000000000000000000000000000000000..e6221a60a22b3ca4c797644f81584252761a2589 --- /dev/null +++ b/models/ietf/RFC/ietf-yang-library@2016-06-21.yang @@ -0,0 +1,244 @@ +module ietf-yang-library { + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library"; + prefix "yanglib"; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Mahesh Jethanandani + <mailto:mjethanandani@gmail.com> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Kent Watsen + <mailto:kwatsen@juniper.net>"; + + description + "This module contains monitoring information about the YANG + modules and submodules that are used within a YANG-based + server. + + Copyright (c) 2016 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7895; see + the RFC itself for full legal notices."; + + revision 2016-06-21 { + description + "Initial revision."; + reference + "RFC 7895: YANG Module Library."; + } + + /* + * Typedefs + */ + + typedef revision-identifier { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + description + "Represents a specific date in YYYY-MM-DD format."; + } + + /* + * Groupings + */ + + grouping module-list { + description + "The module data structure is represented as a grouping + so it can be reused in configuration or another monitoring + data structure."; + + grouping common-leafs { + description + "Common parameters for YANG modules and submodules."; + + leaf name { + type yang:yang-identifier; + description + "The YANG module or submodule name."; + } + leaf revision { + type union { + type revision-identifier; + type string { length 0; } + } + description + "The YANG module or submodule revision date. + A zero-length string is used if no revision statement + is present in the YANG module or submodule."; + } + } + + grouping schema-leaf { + description + "Common schema leaf parameter for modules and submodules."; + + leaf schema { + type inet:uri; + description + "Contains a URL that represents the YANG schema + resource for this module or submodule. + + This leaf will only be present if there is a URL + available for retrieval of the schema for this entry."; + } + } + + list module { + key "name revision"; + description + "Each entry represents one revision of one module + currently supported by the server."; + + uses common-leafs; + uses schema-leaf; + + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace identifier for this module."; + } + leaf-list feature { + type yang:yang-identifier; + description + "List of YANG feature names from this module that are + supported by the server, regardless of whether they are + defined in the module or any included submodule."; + } + list deviation { + key "name revision"; + description + "List of YANG deviation module names and revisions + used by this server to modify the conformance of + the module associated with this entry. Note that + the same module can be used for deviations for + multiple modules, so the same entry MAY appear + within multiple 'module' entries. + + The deviation module MUST be present in the 'module' + list, with the same name and revision values. + The 'conformance-type' value will be 'implement' for + the deviation module."; + uses common-leafs; + } + leaf conformance-type { + type enumeration { + enum implement { + description + "Indicates that the server implements one or more + protocol-accessible objects defined in the YANG module + identified in this entry. This includes deviation + statements defined in the module. + + For YANG version 1.1 modules, there is at most one + module entry with conformance type 'implement' for a + particular module name, since YANG 1.1 requires that, + at most, one revision of a module is implemented. + + For YANG version 1 modules, there SHOULD NOT be more + than one module entry for a particular module name."; + } + enum import { + description + "Indicates that the server imports reusable definitions + from the specified revision of the module but does + not implement any protocol-accessible objects from + this revision. + + Multiple module entries for the same module name MAY + exist. This can occur if multiple modules import the + same module but specify different revision dates in + the import statements."; + } + } + mandatory true; + description + "Indicates the type of conformance the server is claiming + for the YANG module identified by this entry."; + } + list submodule { + key "name revision"; + description + "Each entry represents one submodule within the + parent module."; + uses common-leafs; + uses schema-leaf; + } + } + } + + /* + * Operational state data nodes + */ + + container modules-state { + config false; + description + "Contains YANG module monitoring information."; + + leaf module-set-id { + type string; + mandatory true; + description + "Contains a server-specific identifier representing + the current set of modules and submodules. The + server MUST change the value of this leaf if the + information represented by the 'module' list instances + has changed."; + } + + uses module-list; + } + + /* + * Notifications + */ + + notification yang-library-change { + description + "Generated when the set of modules and submodules supported + by the server has changed."; + leaf module-set-id { + type leafref { + path "/yanglib:modules-state/yanglib:module-set-id"; + } + mandatory true; + description + "Contains the module-set-id value representing the + set of modules and submodules supported at the server at + the time the notification is generated."; + } + } + +} diff --git a/models/ietf/RFC/ietf-yang-library@2019-01-04.yang b/models/ietf/RFC/ietf-yang-library@2019-01-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..dac53a1d0a10009c0c48903ef31b959fad638ede --- /dev/null +++ b/models/ietf/RFC/ietf-yang-library@2019-01-04.yang @@ -0,0 +1,544 @@ +module ietf-yang-library { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library"; + prefix yanglib; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-datastores { + prefix ds; + reference + "RFC 8342: Network Management Datastore Architecture + (NMDA)"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Kent Watsen + <mailto:kent+ietf@watsen.net> + + Author: Robert Wilton + <mailto:rwilton@cisco.com>"; + description + "This module provides information about the YANG modules, + datastores, and datastore schemas used by a network + management server. + 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. + + Copyright (c) 2019 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 Simplified 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 8525; see + the RFC itself for full legal notices."; + + revision 2019-01-04 { + description + "Added support for multiple datastores according to the + Network Management Datastore Architecture (NMDA)."; + reference + "RFC 8525: YANG Library"; + } + revision 2016-04-09 { + description + "Initial revision."; + reference + "RFC 7895: YANG Module Library"; + } + + /* + * Typedefs + */ + + typedef revision-identifier { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + description + "Represents a specific date in YYYY-MM-DD format."; + } + + /* + * Groupings + */ + grouping module-identification-leafs { + description + "Parameters for identifying YANG modules and submodules."; + leaf name { + type yang:yang-identifier; + mandatory true; + description + "The YANG module or submodule name."; + } + leaf revision { + type revision-identifier; + description + "The YANG module or submodule revision date. If no revision + statement is present in the YANG module or submodule, this + leaf is not instantiated."; + } + } + + grouping location-leaf-list { + description + "Common leaf-list parameter for the locations of modules and + submodules."; + leaf-list location { + type inet:uri; + description + "Contains a URL that represents the YANG schema + resource for this module or submodule. + + This leaf will only be present if there is a URL + available for retrieval of the schema for this entry."; + } + } + + grouping module-implementation-parameters { + description + "Parameters for describing the implementation of a module."; + leaf-list feature { + type yang:yang-identifier; + description + "List of all YANG feature names from this module that are + supported by the server, regardless whether they are defined + in the module or any included submodule."; + } + leaf-list deviation { + type leafref { + path "../../module/name"; + } + + description + "List of all YANG deviation modules used by this server to + modify the conformance of the module associated with this + entry. Note that the same module can be used for deviations + for multiple modules, so the same entry MAY appear within + multiple 'module' entries. + + This reference MUST NOT (directly or indirectly) + refer to the module being deviated. + + Robust clients may want to make sure that they handle a + situation where a module deviates itself (directly or + indirectly) gracefully."; + } + } + + grouping module-set-parameters { + description + "A set of parameters that describe a module set."; + leaf name { + type string; + description + "An arbitrary name of the module set."; + } + list module { + key "name"; + description + "An entry in this list represents a module implemented by the + server, as per Section 5.6.5 of RFC 7950, with a particular + set of supported features and deviations."; + reference + "RFC 7950: The YANG 1.1 Data Modeling Language"; + uses module-identification-leafs; + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace identifier for this module."; + } + uses location-leaf-list; + list submodule { + key "name"; + description + "Each entry represents one submodule within the + parent module."; + uses module-identification-leafs; + uses location-leaf-list; + } + uses module-implementation-parameters; + } + list import-only-module { + key "name revision"; + description + "An entry in this list indicates that the server imports + reusable definitions from the specified revision of the + module but does not implement any protocol-accessible + objects from this revision. + + Multiple entries for the same module name MAY exist. This + can occur if multiple modules import the same module but + specify different revision dates in the import statements."; + leaf name { + type yang:yang-identifier; + description + "The YANG module name."; + } + leaf revision { + type union { + type revision-identifier; + type string { + length "0"; + } + } + description + "The YANG module revision date. + A zero-length string is used if no revision statement + is present in the YANG module."; + } + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace identifier for this module."; + } + uses location-leaf-list; + list submodule { + key "name"; + description + "Each entry represents one submodule within the + parent module."; + uses module-identification-leafs; + uses location-leaf-list; + } + } + } + + grouping yang-library-parameters { + description + "The YANG library data structure is represented as a grouping + so it can be reused in configuration or another monitoring + data structure."; + list module-set { + key "name"; + description + "A set of modules that may be used by one or more schemas. + + A module set does not have to be referentially complete, + i.e., it may define modules that contain import statements + for other modules not included in the module set."; + uses module-set-parameters; + } + list schema { + key "name"; + description + "A datastore schema that may be used by one or more + datastores. + + The schema must be valid and referentially complete, i.e., + it must contain modules to satisfy all used import + statements for all modules specified in the schema."; + leaf name { + type string; + description + "An arbitrary name of the schema."; + } + leaf-list module-set { + type leafref { + path "../../module-set/name"; + } + description + "A set of module-sets that are included in this schema. + If a non-import-only module appears in multiple module + sets, then the module revision and the associated features + and deviations must be identical."; + } + } + list datastore { + key "name"; + description + "A datastore supported by this server. + + Each datastore indicates which schema it supports. + + The server MUST instantiate one entry in this list per + specific datastore it supports. + Each datastore entry with the same datastore schema SHOULD + reference the same schema."; + leaf name { + type ds:datastore-ref; + description + "The identity of the datastore."; + } + leaf schema { + type leafref { + path "../../schema/name"; + } + mandatory true; + description + "A reference to the schema supported by this datastore. + All non-import-only modules of the schema are implemented + with their associated features and deviations."; + } + } + } + + /* + * Top-level container + */ + + container yang-library { + config false; + description + "Container holding the entire YANG library of this server."; + uses yang-library-parameters; + leaf content-id { + type string; + mandatory true; + description + "A server-generated identifier of the contents of the + '/yang-library' tree. The server MUST change the value of + this leaf if the information represented by the + '/yang-library' tree, except '/yang-library/content-id', has + changed."; + } + } + + /* + * Notifications + */ + + notification yang-library-update { + description + "Generated when any YANG library information on the + server has changed."; + leaf content-id { + type leafref { + path "/yanglib:yang-library/yanglib:content-id"; + } + mandatory true; + description + "Contains the YANG library content identifier for the updated + YANG library at the time the notification is generated."; + } + } + + /* + * Legacy groupings + */ + + grouping module-list { + status deprecated; + description + "The module data structure is represented as a grouping + so it can be reused in configuration or another monitoring + data structure."; + + grouping common-leafs { + status deprecated; + description + "Common parameters for YANG modules and submodules."; + leaf name { + type yang:yang-identifier; + status deprecated; + description + "The YANG module or submodule name."; + } + leaf revision { + type union { + type revision-identifier; + type string { + length "0"; + } + } + status deprecated; + description + "The YANG module or submodule revision date. + A zero-length string is used if no revision statement + is present in the YANG module or submodule."; + } + } + + grouping schema-leaf { + status deprecated; + description + "Common schema leaf parameter for modules and submodules."; + leaf schema { + type inet:uri; + description + "Contains a URL that represents the YANG schema + resource for this module or submodule. + + This leaf will only be present if there is a URL + available for retrieval of the schema for this entry."; + } + } + list module { + key "name revision"; + status deprecated; + description + "Each entry represents one revision of one module + currently supported by the server."; + uses common-leafs { + status deprecated; + } + uses schema-leaf { + status deprecated; + } + leaf namespace { + type inet:uri; + mandatory true; + status deprecated; + description + "The XML namespace identifier for this module."; + } + leaf-list feature { + type yang:yang-identifier; + status deprecated; + description + "List of YANG feature names from this module that are + supported by the server, regardless of whether they are + defined in the module or any included submodule."; + } + list deviation { + key "name revision"; + status deprecated; + + description + "List of YANG deviation module names and revisions + used by this server to modify the conformance of + the module associated with this entry. Note that + the same module can be used for deviations for + multiple modules, so the same entry MAY appear + within multiple 'module' entries. + + The deviation module MUST be present in the 'module' + list, with the same name and revision values. + The 'conformance-type' value will be 'implement' for + the deviation module."; + uses common-leafs { + status deprecated; + } + } + leaf conformance-type { + type enumeration { + enum implement { + description + "Indicates that the server implements one or more + protocol-accessible objects defined in the YANG module + identified in this entry. This includes deviation + statements defined in the module. + + For YANG version 1.1 modules, there is at most one + 'module' entry with conformance type 'implement' for a + particular module name, since YANG 1.1 requires that + at most one revision of a module is implemented. + + For YANG version 1 modules, there SHOULD NOT be more + than one 'module' entry for a particular module + name."; + } + enum import { + description + "Indicates that the server imports reusable definitions + from the specified revision of the module but does + not implement any protocol-accessible objects from + this revision. + + Multiple 'module' entries for the same module name MAY + exist. This can occur if multiple modules import the + same module but specify different revision dates in + the import statements."; + } + } + mandatory true; + status deprecated; + description + "Indicates the type of conformance the server is claiming + for the YANG module identified by this entry."; + } + list submodule { + key "name revision"; + status deprecated; + description + "Each entry represents one submodule within the + parent module."; + uses common-leafs { + status deprecated; + } + uses schema-leaf { + status deprecated; + } + } + } + } + + /* + * Legacy operational state data nodes + */ + + container modules-state { + config false; + status deprecated; + description + "Contains YANG module monitoring information."; + leaf module-set-id { + type string; + mandatory true; + status deprecated; + description + "Contains a server-specific identifier representing + the current set of modules and submodules. The + server MUST change the value of this leaf if the + information represented by the 'module' list instances + has changed."; + } + uses module-list { + status deprecated; + } + } + + /* + * Legacy notifications + */ + + notification yang-library-change { + status deprecated; + description + "Generated when the set of modules and submodules supported + by the server has changed."; + leaf module-set-id { + type leafref { + path "/yanglib:modules-state/yanglib:module-set-id"; + } + mandatory true; + status deprecated; + description + "Contains the module-set-id value representing the + set of modules and submodules supported at the server + at the time the notification is generated."; + } + } +} diff --git a/models/ietf/RFC/ietf-yang-metadata.yang b/models/ietf/RFC/ietf-yang-metadata.yang new file mode 100644 index 0000000000000000000000000000000000000000..5939eebeeadd6e2d9218afc8978cf34fa2495ebc --- /dev/null +++ b/models/ietf/RFC/ietf-yang-metadata.yang @@ -0,0 +1,84 @@ +module ietf-yang-metadata { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata"; + + prefix "md"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + + WG List: <mailto:netmod@ietf.org> + + WG Chair: Lou Berger + <mailto:lberger@labn.net> + + WG Chair: Kent Watsen + <mailto:kwatsen@juniper.net> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz>"; + + description + "This YANG module defines an 'extension' statement that allows + for defining metadata annotations. + + Copyright (c) 2016 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7952 + (http://www.rfc-editor.org/info/rfc7952); see the RFC itself + for full legal notices."; + + revision 2016-08-05 { + description + "Initial revision."; + reference + "RFC 7952: Defining and Using Metadata with YANG"; + } + + extension annotation { + argument name; + description + "This extension allows for defining metadata annotations in + YANG modules. The 'md:annotation' statement can appear only + at the top level of a YANG module or submodule, i.e., it + becomes a new alternative in the ABNF production rule for + 'body-stmts' (Section 14 in RFC 7950). + + The argument of the 'md:annotation' statement defines the name + of the annotation. Syntactically, it is a YANG identifier as + defined in Section 6.2 of RFC 7950. + + An annotation defined with this 'extension' statement inherits + the namespace and other context from the YANG module in which + it is defined. + + The data type of the annotation value is specified in the same + way as for a leaf data node using the 'type' statement. + + The semantics of the annotation and other documentation can be + specified using the following standard YANG substatements (all + are optional): 'description', 'if-feature', 'reference', + 'status', and 'units'. + + A server announces support for a particular annotation by + including the module in which the annotation is defined among + the advertised YANG modules, e.g., in a NETCONF <hello> + message or in the YANG library (RFC 7950). The annotation can + then be attached to any instance of a data node defined in any + YANG module that is advertised by the server. + + XML encoding and JSON encoding of annotations are defined in + RFC 7952."; + } +} diff --git a/models/ietf/RFC/ietf-yang-metadata@2016-08-05.yang b/models/ietf/RFC/ietf-yang-metadata@2016-08-05.yang new file mode 100644 index 0000000000000000000000000000000000000000..5939eebeeadd6e2d9218afc8978cf34fa2495ebc --- /dev/null +++ b/models/ietf/RFC/ietf-yang-metadata@2016-08-05.yang @@ -0,0 +1,84 @@ +module ietf-yang-metadata { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata"; + + prefix "md"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + + WG List: <mailto:netmod@ietf.org> + + WG Chair: Lou Berger + <mailto:lberger@labn.net> + + WG Chair: Kent Watsen + <mailto:kwatsen@juniper.net> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz>"; + + description + "This YANG module defines an 'extension' statement that allows + for defining metadata annotations. + + Copyright (c) 2016 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7952 + (http://www.rfc-editor.org/info/rfc7952); see the RFC itself + for full legal notices."; + + revision 2016-08-05 { + description + "Initial revision."; + reference + "RFC 7952: Defining and Using Metadata with YANG"; + } + + extension annotation { + argument name; + description + "This extension allows for defining metadata annotations in + YANG modules. The 'md:annotation' statement can appear only + at the top level of a YANG module or submodule, i.e., it + becomes a new alternative in the ABNF production rule for + 'body-stmts' (Section 14 in RFC 7950). + + The argument of the 'md:annotation' statement defines the name + of the annotation. Syntactically, it is a YANG identifier as + defined in Section 6.2 of RFC 7950. + + An annotation defined with this 'extension' statement inherits + the namespace and other context from the YANG module in which + it is defined. + + The data type of the annotation value is specified in the same + way as for a leaf data node using the 'type' statement. + + The semantics of the annotation and other documentation can be + specified using the following standard YANG substatements (all + are optional): 'description', 'if-feature', 'reference', + 'status', and 'units'. + + A server announces support for a particular annotation by + including the module in which the annotation is defined among + the advertised YANG modules, e.g., in a NETCONF <hello> + message or in the YANG library (RFC 7950). The annotation can + then be attached to any instance of a data node defined in any + YANG module that is advertised by the server. + + XML encoding and JSON encoding of annotations are defined in + RFC 7952."; + } +} diff --git a/models/ietf/RFC/ietf-yang-patch.yang b/models/ietf/RFC/ietf-yang-patch.yang new file mode 100644 index 0000000000000000000000000000000000000000..d0029ed213b981e42cee6b8a3511c7df9420884b --- /dev/null +++ b/models/ietf/RFC/ietf-yang-patch.yang @@ -0,0 +1,390 @@ +module ietf-yang-patch { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-patch"; + prefix "ypatch"; + + import ietf-restconf { prefix rc; } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net>"; + + description + "This module contains conceptual YANG specifications + for the YANG Patch and YANG Patch Status data structures. + + Note that the YANG definitions within this module do not + represent configuration data of any kind. + The YANG grouping statements provide a normative syntax + for XML and JSON message-encoding purposes. + + Copyright (c) 2017 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8072; see + the RFC itself for full legal notices."; + + revision 2017-02-22 { + description + "Initial revision."; + reference + "RFC 8072: YANG Patch Media Type."; + } + + typedef target-resource-offset { + type string; + description + "Contains a data resource identifier string representing + a sub-resource within the target resource. + The document root for this expression is the + target resource that is specified in the + protocol operation (e.g., the URI for the PATCH request). + + This string is encoded according to the same rules as those + for a data resource identifier in a RESTCONF request URI."; + reference + "RFC 8040, Section 3.5.3."; + } + + rc:yang-data "yang-patch" { + uses yang-patch; + } + + rc:yang-data "yang-patch-status" { + uses yang-patch-status; + } + + grouping yang-patch { + + description + "A grouping that contains a YANG container representing the + syntax and semantics of a YANG Patch edit request message."; + + container yang-patch { + description + "Represents a conceptual sequence of datastore edits, + called a patch. Each patch is given a client-assigned + patch identifier. Each edit MUST be applied + in ascending order, and all edits MUST be applied. + If any errors occur, then the target datastore MUST NOT + be changed by the YANG Patch operation. + + It is possible for a datastore constraint violation to occur + due to any node in the datastore, including nodes not + included in the 'edit' list. Any validation errors MUST + be reported in the reply message."; + + reference + "RFC 7950, Section 8.3."; + + leaf patch-id { + type string; + mandatory true; + description + "An arbitrary string provided by the client to identify + the entire patch. Error messages returned by the server + that pertain to this patch will be identified by this + 'patch-id' value. A client SHOULD attempt to generate + unique 'patch-id' values to distinguish between + transactions from multiple clients in any audit logs + maintained by the server."; + } + + leaf comment { + type string; + description + "An arbitrary string provided by the client to describe + the entire patch. This value SHOULD be present in any + audit logging records generated by the server for the + patch."; + } + + list edit { + key edit-id; + ordered-by user; + + description + "Represents one edit within the YANG Patch request message. + The 'edit' list is applied in the following manner: + + - The first edit is conceptually applied to a copy + of the existing target datastore, e.g., the + running configuration datastore. + - Each ascending edit is conceptually applied to + the result of the previous edit(s). + - After all edits have been successfully processed, + the result is validated according to YANG constraints. + - If successful, the server will attempt to apply + the result to the target datastore."; + + leaf edit-id { + type string; + description + "Arbitrary string index for the edit. + Error messages returned by the server that pertain + to a specific edit will be identified by this value."; + } + + leaf operation { + type enumeration { + enum create { + description + "The target data node is created using the supplied + value, only if it does not already exist. The + 'target' leaf identifies the data node to be + created, not the parent data node."; + } + enum delete { + description + "Delete the target node, only if the data resource + currently exists; otherwise, return an error."; + } + + enum insert { + description + "Insert the supplied value into a user-ordered + list or leaf-list entry. The target node must + represent a new data resource. If the 'where' + parameter is set to 'before' or 'after', then + the 'point' parameter identifies the insertion + point for the target node."; + } + enum merge { + description + "The supplied value is merged with the target data + node."; + } + enum move { + description + "Move the target node. Reorder a user-ordered + list or leaf-list. The target node must represent + an existing data resource. If the 'where' parameter + is set to 'before' or 'after', then the 'point' + parameter identifies the insertion point to move + the target node."; + } + enum replace { + description + "The supplied value is used to replace the target + data node."; + } + enum remove { + description + "Delete the target node if it currently exists."; + } + } + mandatory true; + description + "The datastore operation requested for the associated + 'edit' entry."; + } + + leaf target { + type target-resource-offset; + mandatory true; + description + "Identifies the target data node for the edit + operation. If the target has the value '/', then + the target data node is the target resource. + The target node MUST identify a data resource, + not the datastore resource."; + } + + leaf point { + when "(../operation = 'insert' or ../operation = 'move')" + + "and (../where = 'before' or ../where = 'after')" { + description + "This leaf only applies for 'insert' or 'move' + operations, before or after an existing entry."; + } + type target-resource-offset; + description + "The absolute URL path for the data node that is being + used as the insertion point or move point for the + target of this 'edit' entry."; + } + + leaf where { + when "../operation = 'insert' or ../operation = 'move'" { + description + "This leaf only applies for 'insert' or 'move' + operations."; + } + type enumeration { + enum before { + description + "Insert or move a data node before the data resource + identified by the 'point' parameter."; + } + enum after { + description + "Insert or move a data node after the data resource + identified by the 'point' parameter."; + } + + enum first { + description + "Insert or move a data node so it becomes ordered + as the first entry."; + } + enum last { + description + "Insert or move a data node so it becomes ordered + as the last entry."; + } + } + default last; + description + "Identifies where a data resource will be inserted + or moved. YANG only allows these operations for + list and leaf-list data nodes that are + 'ordered-by user'."; + } + + anydata value { + when "../operation = 'create' " + + "or ../operation = 'merge' " + + "or ../operation = 'replace' " + + "or ../operation = 'insert'" { + description + "The anydata 'value' is only used for 'create', + 'merge', 'replace', and 'insert' operations."; + } + description + "Value used for this edit operation. The anydata 'value' + contains the target resource associated with the + 'target' leaf. + + For example, suppose the target node is a YANG container + named foo: + + container foo { + leaf a { type string; } + leaf b { type int32; } + } + + The 'value' node contains one instance of foo: + + <value> + <foo xmlns='example-foo-namespace'> + <a>some value</a> + <b>42</b> + </foo> + </value> + "; + } + } + } + + } // grouping yang-patch + + grouping yang-patch-status { + + description + "A grouping that contains a YANG container representing the + syntax and semantics of a YANG Patch Status response + message."; + + container yang-patch-status { + description + "A container representing the response message sent by the + server after a YANG Patch edit request message has been + processed."; + + leaf patch-id { + type string; + mandatory true; + description + "The 'patch-id' value used in the request."; + } + + choice global-status { + description + "Report global errors or complete success. + If there is no case selected, then errors + are reported in the 'edit-status' container."; + + case global-errors { + uses rc:errors; + description + "This container will be present if global errors that + are unrelated to a specific edit occurred."; + } + leaf ok { + type empty; + description + "This leaf will be present if the request succeeded + and there are no errors reported in the 'edit-status' + container."; + } + } + + container edit-status { + description + "This container will be present if there are + edit-specific status responses to report. + If all edits succeeded and the 'global-status' + returned is 'ok', then a server MAY omit this + container."; + + list edit { + key edit-id; + + description + "Represents a list of status responses, + corresponding to edits in the YANG Patch + request message. If an 'edit' entry was + skipped or not reached by the server, + then this list will not contain a corresponding + entry for that edit."; + + leaf edit-id { + type string; + description + "Response status is for the 'edit' list entry + with this 'edit-id' value."; + } + + choice edit-status-choice { + description + "A choice between different types of status + responses for each 'edit' entry."; + leaf ok { + type empty; + description + "This 'edit' entry was invoked without any + errors detected by the server associated + with this edit."; + } + case errors { + uses rc:errors; + description + "The server detected errors associated with the + edit identified by the same 'edit-id' value."; + } + } + } + } + } + } // grouping yang-patch-status + +} diff --git a/models/ietf/RFC/ietf-yang-patch@2017-02-22.yang b/models/ietf/RFC/ietf-yang-patch@2017-02-22.yang new file mode 100644 index 0000000000000000000000000000000000000000..d0029ed213b981e42cee6b8a3511c7df9420884b --- /dev/null +++ b/models/ietf/RFC/ietf-yang-patch@2017-02-22.yang @@ -0,0 +1,390 @@ +module ietf-yang-patch { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-patch"; + prefix "ypatch"; + + import ietf-restconf { prefix rc; } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net>"; + + description + "This module contains conceptual YANG specifications + for the YANG Patch and YANG Patch Status data structures. + + Note that the YANG definitions within this module do not + represent configuration data of any kind. + The YANG grouping statements provide a normative syntax + for XML and JSON message-encoding purposes. + + Copyright (c) 2017 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8072; see + the RFC itself for full legal notices."; + + revision 2017-02-22 { + description + "Initial revision."; + reference + "RFC 8072: YANG Patch Media Type."; + } + + typedef target-resource-offset { + type string; + description + "Contains a data resource identifier string representing + a sub-resource within the target resource. + The document root for this expression is the + target resource that is specified in the + protocol operation (e.g., the URI for the PATCH request). + + This string is encoded according to the same rules as those + for a data resource identifier in a RESTCONF request URI."; + reference + "RFC 8040, Section 3.5.3."; + } + + rc:yang-data "yang-patch" { + uses yang-patch; + } + + rc:yang-data "yang-patch-status" { + uses yang-patch-status; + } + + grouping yang-patch { + + description + "A grouping that contains a YANG container representing the + syntax and semantics of a YANG Patch edit request message."; + + container yang-patch { + description + "Represents a conceptual sequence of datastore edits, + called a patch. Each patch is given a client-assigned + patch identifier. Each edit MUST be applied + in ascending order, and all edits MUST be applied. + If any errors occur, then the target datastore MUST NOT + be changed by the YANG Patch operation. + + It is possible for a datastore constraint violation to occur + due to any node in the datastore, including nodes not + included in the 'edit' list. Any validation errors MUST + be reported in the reply message."; + + reference + "RFC 7950, Section 8.3."; + + leaf patch-id { + type string; + mandatory true; + description + "An arbitrary string provided by the client to identify + the entire patch. Error messages returned by the server + that pertain to this patch will be identified by this + 'patch-id' value. A client SHOULD attempt to generate + unique 'patch-id' values to distinguish between + transactions from multiple clients in any audit logs + maintained by the server."; + } + + leaf comment { + type string; + description + "An arbitrary string provided by the client to describe + the entire patch. This value SHOULD be present in any + audit logging records generated by the server for the + patch."; + } + + list edit { + key edit-id; + ordered-by user; + + description + "Represents one edit within the YANG Patch request message. + The 'edit' list is applied in the following manner: + + - The first edit is conceptually applied to a copy + of the existing target datastore, e.g., the + running configuration datastore. + - Each ascending edit is conceptually applied to + the result of the previous edit(s). + - After all edits have been successfully processed, + the result is validated according to YANG constraints. + - If successful, the server will attempt to apply + the result to the target datastore."; + + leaf edit-id { + type string; + description + "Arbitrary string index for the edit. + Error messages returned by the server that pertain + to a specific edit will be identified by this value."; + } + + leaf operation { + type enumeration { + enum create { + description + "The target data node is created using the supplied + value, only if it does not already exist. The + 'target' leaf identifies the data node to be + created, not the parent data node."; + } + enum delete { + description + "Delete the target node, only if the data resource + currently exists; otherwise, return an error."; + } + + enum insert { + description + "Insert the supplied value into a user-ordered + list or leaf-list entry. The target node must + represent a new data resource. If the 'where' + parameter is set to 'before' or 'after', then + the 'point' parameter identifies the insertion + point for the target node."; + } + enum merge { + description + "The supplied value is merged with the target data + node."; + } + enum move { + description + "Move the target node. Reorder a user-ordered + list or leaf-list. The target node must represent + an existing data resource. If the 'where' parameter + is set to 'before' or 'after', then the 'point' + parameter identifies the insertion point to move + the target node."; + } + enum replace { + description + "The supplied value is used to replace the target + data node."; + } + enum remove { + description + "Delete the target node if it currently exists."; + } + } + mandatory true; + description + "The datastore operation requested for the associated + 'edit' entry."; + } + + leaf target { + type target-resource-offset; + mandatory true; + description + "Identifies the target data node for the edit + operation. If the target has the value '/', then + the target data node is the target resource. + The target node MUST identify a data resource, + not the datastore resource."; + } + + leaf point { + when "(../operation = 'insert' or ../operation = 'move')" + + "and (../where = 'before' or ../where = 'after')" { + description + "This leaf only applies for 'insert' or 'move' + operations, before or after an existing entry."; + } + type target-resource-offset; + description + "The absolute URL path for the data node that is being + used as the insertion point or move point for the + target of this 'edit' entry."; + } + + leaf where { + when "../operation = 'insert' or ../operation = 'move'" { + description + "This leaf only applies for 'insert' or 'move' + operations."; + } + type enumeration { + enum before { + description + "Insert or move a data node before the data resource + identified by the 'point' parameter."; + } + enum after { + description + "Insert or move a data node after the data resource + identified by the 'point' parameter."; + } + + enum first { + description + "Insert or move a data node so it becomes ordered + as the first entry."; + } + enum last { + description + "Insert or move a data node so it becomes ordered + as the last entry."; + } + } + default last; + description + "Identifies where a data resource will be inserted + or moved. YANG only allows these operations for + list and leaf-list data nodes that are + 'ordered-by user'."; + } + + anydata value { + when "../operation = 'create' " + + "or ../operation = 'merge' " + + "or ../operation = 'replace' " + + "or ../operation = 'insert'" { + description + "The anydata 'value' is only used for 'create', + 'merge', 'replace', and 'insert' operations."; + } + description + "Value used for this edit operation. The anydata 'value' + contains the target resource associated with the + 'target' leaf. + + For example, suppose the target node is a YANG container + named foo: + + container foo { + leaf a { type string; } + leaf b { type int32; } + } + + The 'value' node contains one instance of foo: + + <value> + <foo xmlns='example-foo-namespace'> + <a>some value</a> + <b>42</b> + </foo> + </value> + "; + } + } + } + + } // grouping yang-patch + + grouping yang-patch-status { + + description + "A grouping that contains a YANG container representing the + syntax and semantics of a YANG Patch Status response + message."; + + container yang-patch-status { + description + "A container representing the response message sent by the + server after a YANG Patch edit request message has been + processed."; + + leaf patch-id { + type string; + mandatory true; + description + "The 'patch-id' value used in the request."; + } + + choice global-status { + description + "Report global errors or complete success. + If there is no case selected, then errors + are reported in the 'edit-status' container."; + + case global-errors { + uses rc:errors; + description + "This container will be present if global errors that + are unrelated to a specific edit occurred."; + } + leaf ok { + type empty; + description + "This leaf will be present if the request succeeded + and there are no errors reported in the 'edit-status' + container."; + } + } + + container edit-status { + description + "This container will be present if there are + edit-specific status responses to report. + If all edits succeeded and the 'global-status' + returned is 'ok', then a server MAY omit this + container."; + + list edit { + key edit-id; + + description + "Represents a list of status responses, + corresponding to edits in the YANG Patch + request message. If an 'edit' entry was + skipped or not reached by the server, + then this list will not contain a corresponding + entry for that edit."; + + leaf edit-id { + type string; + description + "Response status is for the 'edit' list entry + with this 'edit-id' value."; + } + + choice edit-status-choice { + description + "A choice between different types of status + responses for each 'edit' entry."; + leaf ok { + type empty; + description + "This 'edit' entry was invoked without any + errors detected by the server associated + with this edit."; + } + case errors { + uses rc:errors; + description + "The server detected errors associated with the + edit identified by the same 'edit-id' value."; + } + } + } + } + } + } // grouping yang-patch-status + +} diff --git a/models/ietf/RFC/ietf-yang-push.yang b/models/ietf/RFC/ietf-yang-push.yang new file mode 100644 index 0000000000000000000000000000000000000000..ea38fb34ebb4f446fae00fe9537dfb245bb1fbc0 --- /dev/null +++ b/models/ietf/RFC/ietf-yang-push.yang @@ -0,0 +1,797 @@ +module ietf-yang-push { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-push"; + prefix yp; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-subscribed-notifications { + prefix sn; + reference + "RFC 8639: Subscription to YANG Notifications"; + } + import ietf-datastores { + prefix ds; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + import ietf-restconf { + prefix rc; + reference + "RFC 8040: RESTCONF Protocol"; + } + import ietf-yang-patch { + prefix ypatch; + reference + "RFC 8072: YANG Patch Media Type"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https:/datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Alexander Clemm + <mailto:ludwig@clemm.org> + + Author: Eric Voit + <mailto:evoit@cisco.com>"; + + description + "This module contains YANG specifications for YANG-Push. + + 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. + + Copyright (c) 2019 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 Simplified 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 8641; see the + RFC itself for full legal notices."; + + revision 2019-09-09 { + description + "Initial revision."; + reference + "RFC 8641: Subscriptions to YANG Datastores"; + } + + /* + * FEATURES + */ + + feature on-change { + description + "This feature indicates that on-change triggered subscriptions + are supported."; + } + + /* + * IDENTITIES + */ + + /* Error type identities for datastore subscription */ + + identity resync-subscription-error { + description + "Problem found while attempting to fulfill a + 'resync-subscription' RPC request."; + } + + identity cant-exclude { + base sn:establish-subscription-error; + description + "Unable to remove the set of 'excluded-change' parameters. + This means that the publisher is unable to restrict + 'push-change-update' notifications to just the change types + requested for this subscription."; + } + + identity datastore-not-subscribable { + base sn:establish-subscription-error; + base sn:subscription-terminated-reason; + description + "This is not a subscribable datastore."; + } + + identity no-such-subscription-resync { + base resync-subscription-error; + description + "The referenced subscription doesn't exist. This may be as a + result of a nonexistent subscription ID, an ID that belongs to + another subscriber, or an ID for a configured subscription."; + } + + identity on-change-unsupported { + base sn:establish-subscription-error; + description + "On-change is not supported for any objects that are + selectable by this filter."; + } + + identity on-change-sync-unsupported { + base sn:establish-subscription-error; + description + "Neither 'sync-on-start' nor resynchronization is supported for + this subscription. This error will be used for two reasons: + (1) if an 'establish-subscription' RPC includes + 'sync-on-start' but the publisher can't support sending a + 'push-update' for this subscription for reasons other than + 'on-change-unsupported' or 'sync-too-big' + (2) if the 'resync-subscription' RPC is invoked for either an + existing periodic subscription or an on-change subscription + that can't support resynchronization."; + } + + identity period-unsupported { + base sn:establish-subscription-error; + base sn:modify-subscription-error; + base sn:subscription-suspended-reason; + description + "The requested time period or 'dampening-period' is too short. + This can be for both periodic and on-change subscriptions + (with or without dampening). Hints suggesting alternative + periods may be returned as supplemental information."; + } + + identity update-too-big { + base sn:establish-subscription-error; + base sn:modify-subscription-error; + base sn:subscription-suspended-reason; + description + "Periodic or on-change push update data trees exceed a maximum + size limit. Hints on the estimated size of what was too big + may be returned as supplemental information."; + } + + identity sync-too-big { + base sn:establish-subscription-error; + base sn:modify-subscription-error; + base resync-subscription-error; + base sn:subscription-suspended-reason; + description + "The 'sync-on-start' or resynchronization data tree exceeds a + maximum size limit. Hints on the estimated size of what was + too big may be returned as supplemental information."; + } + + identity unchanging-selection { + base sn:establish-subscription-error; + base sn:modify-subscription-error; + base sn:subscription-terminated-reason; + description + "The selection filter is unlikely to ever select data tree + nodes. This means that based on the subscriber's current + access rights, the publisher recognizes that the selection + filter is unlikely to ever select data tree nodes that change. + Examples for this might be that the node or subtree doesn't + exist, read access is not permitted for a receiver, or static + objects that only change at reboot have been chosen."; + } + + /* + * TYPE DEFINITIONS + */ + + typedef change-type { + type enumeration { + enum create { + description + "A change that refers to the creation of a new + datastore node."; + } + enum delete { + description + "A change that refers to the deletion of a + datastore node."; + } + enum insert { + description + "A change that refers to the insertion of a new + user-ordered datastore node."; + } + enum move { + description + "A change that refers to a reordering of the target + datastore node."; + } + enum replace { + description + "A change that refers to a replacement of the target + datastore node's value."; + } + } + description + "Specifies different types of datastore changes. + + This type is based on the edit operations defined for + YANG Patch, with the difference that it is valid for a + receiver to process an update record that performs a + 'create' operation on a datastore node the receiver believes + exists or to process a delete on a datastore node the + receiver believes is missing."; + reference + "RFC 8072: YANG Patch Media Type, Section 2.5"; + } + + typedef selection-filter-ref { + type leafref { + path "/sn:filters/yp:selection-filter/yp:filter-id"; + } + description + "This type is used to reference a selection filter."; + } + + typedef centiseconds { + type uint32; + description + "A period of time, measured in units of 0.01 seconds."; + } + + /* + * GROUP DEFINITIONS + */ + + grouping datastore-criteria { + description + "A grouping to define criteria for which selected objects from + a targeted datastore should be included in push updates."; + leaf datastore { + type identityref { + base ds:datastore; + } + mandatory true; + description + "Datastore from which to retrieve data."; + } + uses selection-filter-objects; + } + + grouping selection-filter-types { + description + "This grouping defines the types of selectors for objects + from a datastore."; + choice filter-spec { + description + "The content filter specification for this request."; + anydata datastore-subtree-filter { + if-feature "sn:subtree"; + description + "This parameter identifies the portions of the + target datastore to retrieve."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 6"; + } + leaf datastore-xpath-filter { + if-feature "sn:xpath"; + type yang:xpath1.0; + description + "This parameter contains an XPath expression identifying + the portions of the target datastore to retrieve. + + If the expression returns a node set, all nodes in the + node set are selected by the filter. Otherwise, if the + expression does not return a node set, the filter + doesn't select any nodes. + + The expression is evaluated in the following XPath + context: + + o The set of namespace declarations is the set of prefix + and namespace pairs for all YANG modules implemented + by the server, where the prefix is the YANG module + name and the namespace is as defined by the + 'namespace' statement in the YANG module. + + If the leaf is encoded in XML, all namespace + declarations in scope on the 'stream-xpath-filter' + leaf element are added to the set of namespace + declarations. If a prefix found in the XML is + already present in the set of namespace declarations, + the namespace in the XML is used. + + o The set of variable bindings is empty. + + o The function library is comprised of the core + function library and the XPath functions defined in + Section 10 in RFC 7950. + + o The context node is the root node of the target + datastore."; + reference + "XML Path Language (XPath) Version 1.0 + (https://www.w3.org/TR/1999/REC-xpath-19991116) + RFC 7950: The YANG 1.1 Data Modeling Language, + Section 10"; + } + } + } + + grouping selection-filter-objects { + description + "This grouping defines a selector for objects from a + datastore."; + choice selection-filter { + description + "The source of the selection filter applied to the + subscription. This will either (1) come referenced from a + global list or (2) be provided in the subscription itself."; + case by-reference { + description + "Incorporates a filter that has been configured + separately."; + leaf selection-filter-ref { + type selection-filter-ref; + mandatory true; + description + "References an existing selection filter that is to be + applied to the subscription."; + } + } + case within-subscription { + description + "A local definition allows a filter to have the same + lifecycle as the subscription."; + uses selection-filter-types; + } + } + } + + grouping update-policy-modifiable { + description + "This grouping describes the datastore-specific subscription + conditions that can be changed during the lifetime of the + subscription."; + choice update-trigger { + description + "Defines necessary conditions for sending an event record to + the subscriber."; + case periodic { + container periodic { + presence "indicates a periodic subscription"; + description + "The publisher is requested to periodically notify the + receiver regarding the current values of the datastore + as defined by the selection filter."; + leaf period { + type centiseconds; + mandatory true; + description + "Duration of time that should occur between periodic + push updates, in units of 0.01 seconds."; + } + leaf anchor-time { + type yang:date-and-time; + description + "Designates a timestamp before or after which a series + of periodic push updates are determined. The next + update will take place at a point in time that is a + multiple of a period from the 'anchor-time'. + For example, for an 'anchor-time' that is set for the + top of a particular minute and a period interval of a + minute, updates will be sent at the top of every + minute that this subscription is active."; + } + } + } + case on-change { + if-feature "on-change"; + container on-change { + presence "indicates an on-change subscription"; + description + "The publisher is requested to notify the receiver + regarding changes in values in the datastore subset as + defined by a selection filter."; + leaf dampening-period { + type centiseconds; + default "0"; + description + "Specifies the minimum interval between the assembly of + successive update records for a single receiver of a + subscription. Whenever subscribed objects change and + a dampening-period interval (which may be zero) has + elapsed since the previous update record creation for + a receiver, any subscribed objects and properties + that have changed since the previous update record + will have their current values marshalled and placed + in a new update record."; + } + } + } + } + } + + grouping update-policy { + description + "This grouping describes the datastore-specific subscription + conditions of a subscription."; + uses update-policy-modifiable { + augment "update-trigger/on-change/on-change" { + description + "Includes objects that are not modifiable once a + subscription is established."; + leaf sync-on-start { + type boolean; + default "true"; + description + "When this object is set to 'false', (1) it restricts an + on-change subscription from sending 'push-update' + notifications and (2) pushing a full selection per the + terms of the selection filter MUST NOT be done for + this subscription. Only updates about changes + (i.e., only 'push-change-update' notifications) + are sent. When set to 'true' (the default behavior), + in order to facilitate a receiver's synchronization, + a full update is sent, via a 'push-update' notification, + when the subscription starts. After that, + 'push-change-update' notifications are exclusively sent, + unless the publisher chooses to resync the subscription + via a new 'push-update' notification."; + } + leaf-list excluded-change { + type change-type; + description + "Used to restrict which changes trigger an update. For + example, if a 'replace' operation is excluded, only the + creation and deletion of objects are reported."; + } + } + } + } + + grouping hints { + description + "Parameters associated with an error for a subscription + made upon a datastore."; + leaf period-hint { + type centiseconds; + description + "Returned when the requested time period is too short. This + hint can assert a viable period for either a periodic push + cadence or an on-change dampening interval."; + } + leaf filter-failure-hint { + type string; + description + "Information describing where and/or why a provided filter + was unsupportable for a subscription."; + } + leaf object-count-estimate { + type uint32; + description + "If there are too many objects that could potentially be + returned by the selection filter, this identifies the + estimate of the number of objects that the filter would + potentially pass."; + } + leaf object-count-limit { + type uint32; + description + "If there are too many objects that could be returned by + the selection filter, this identifies the upper limit of + the publisher's ability to service this subscription."; + } + leaf kilobytes-estimate { + type uint32; + description + "If the returned information could be beyond the capacity + of the publisher, this would identify the estimated + data size that could result from this selection filter."; + } + leaf kilobytes-limit { + type uint32; + description + "If the returned information would be beyond the capacity + of the publisher, this identifies the upper limit of the + publisher's ability to service this subscription."; + } + } + + /* + * RPCs + */ + + rpc resync-subscription { + if-feature "on-change"; + description + "This RPC allows a subscriber of an active on-change + subscription to request a full push of objects. + + A successful invocation results in a 'push-update' of all + datastore nodes that the subscriber is permitted to access. + This RPC can only be invoked on the same session on which the + subscription is currently active. In the case of an error, a + 'resync-subscription-error' is sent as part of an error + response."; + input { + leaf id { + type sn:subscription-id; + mandatory true; + description + "Identifier of the subscription that is to be resynced."; + } + } + } + + rc:yang-data resync-subscription-error { + container resync-subscription-error { + description + "If a 'resync-subscription' RPC fails, the subscription is + not resynced and the RPC error response MUST indicate the + reason for this failure. This yang-data MAY be inserted as + structured data in a subscription's RPC error response + to indicate the reason for the failure."; + leaf reason { + type identityref { + base resync-subscription-error; + } + mandatory true; + description + "Indicates the reason why the publisher has declined a + request for subscription resynchronization."; + } + uses hints; + } + } + + augment "/sn:establish-subscription/sn:input" { + description + "This augmentation adds additional subscription parameters + that apply specifically to datastore updates to RPC input."; + uses update-policy; + } + + augment "/sn:establish-subscription/sn:input/sn:target" { + description + "This augmentation adds the datastore as a valid target + for the subscription to RPC input."; + case datastore { + description + "Information specifying the parameters of a request for a + datastore subscription."; + uses datastore-criteria; + } + } + + rc:yang-data establish-subscription-datastore-error-info { + container establish-subscription-datastore-error-info { + description + "If any 'establish-subscription' RPC parameters are + unsupportable against the datastore, a subscription is not + created and the RPC error response MUST indicate the reason + why the subscription failed to be created. This yang-data + MAY be inserted as structured data in a subscription's + RPC error response to indicate the reason for the failure. + This yang-data MUST be inserted if hints are to be provided + back to the subscriber."; + leaf reason { + type identityref { + base sn:establish-subscription-error; + } + description + "Indicates the reason why the subscription has failed to + be created to a targeted datastore."; + } + uses hints; + } + } + + augment "/sn:modify-subscription/sn:input" { + description + "This augmentation adds additional subscription parameters + specific to datastore updates."; + uses update-policy-modifiable; + } + + augment "/sn:modify-subscription/sn:input/sn:target" { + description + "This augmentation adds the datastore as a valid target + for the subscription to RPC input."; + case datastore { + description + "Information specifying the parameters of a request for a + datastore subscription."; + uses datastore-criteria; + } + } + + rc:yang-data modify-subscription-datastore-error-info { + container modify-subscription-datastore-error-info { + description + "This yang-data MAY be provided as part of a subscription's + RPC error response when there is a failure of a + 'modify-subscription' RPC that has been made against a + datastore. This yang-data MUST be used if hints are to be + provided back to the subscriber."; + leaf reason { + type identityref { + base sn:modify-subscription-error; + } + description + "Indicates the reason why the subscription has failed to + be modified."; + } + uses hints; + } + } + + /* + * NOTIFICATIONS + */ + + notification push-update { + description + "This notification contains a push update that in turn contains + data subscribed to via a subscription. In the case of a + periodic subscription, this notification is sent for periodic + updates. It can also be used for synchronization updates of + an on-change subscription. This notification shall only be + sent to receivers of a subscription. It does not constitute + a general-purpose notification that would be subscribable as + part of the NETCONF event stream by any receiver."; + leaf id { + type sn:subscription-id; + description + "This references the subscription that drove the + notification to be sent."; + } + anydata datastore-contents { + description + "This contains the updated data. It constitutes a snapshot + at the time of update of the set of data that has been + subscribed to. The snapshot corresponds to the same + snapshot that would be returned in a corresponding 'get' + operation with the same selection filter parameters + applied."; + } + leaf incomplete-update { + type empty; + description + "This is a flag that indicates that not all datastore + nodes subscribed to are included with this update. In + other words, the publisher has failed to fulfill its full + subscription obligations and, despite its best efforts, is + providing an incomplete set of objects."; + } + } + + notification push-change-update { + if-feature "on-change"; + description + "This notification contains an on-change push update. This + notification shall only be sent to the receivers of a + subscription. It does not constitute a general-purpose + notification that would be subscribable as part of the + NETCONF event stream by any receiver."; + leaf id { + type sn:subscription-id; + description + "This references the subscription that drove the + notification to be sent."; + } + container datastore-changes { + description + "This contains the set of datastore changes of the target + datastore, starting at the time of the previous update, per + the terms of the subscription."; + uses ypatch:yang-patch; + } + leaf incomplete-update { + type empty; + description + "The presence of this object indicates that not all changes + that have occurred since the last update are included with + this update. In other words, the publisher has failed to + fulfill its full subscription obligations -- for example, + in cases where it was not able to keep up with a burst of + changes."; + } + } + + augment "/sn:subscription-started" { + description + "This augmentation adds datastore-specific objects to + the notification that a subscription has started."; + uses update-policy; + } + + augment "/sn:subscription-started/sn:target" { + description + "This augmentation allows the datastore to be included as + part of the notification that a subscription has started."; + case datastore { + uses datastore-criteria { + refine "selection-filter/within-subscription" { + description + "Specifies the selection filter and where it originated + from. If the 'selection-filter-ref' is populated, the + filter in the subscription came from the 'filters' + container. Otherwise, it is populated in-line as part + of the subscription itself."; + } + } + } + } + + augment "/sn:subscription-modified" { + description + "This augmentation adds datastore-specific objects to + the notification that a subscription has been modified."; + uses update-policy; + } + + augment "/sn:subscription-modified/sn:target" { + description + "This augmentation allows the datastore to be included as + part of the notification that a subscription has been + modified."; + case datastore { + uses datastore-criteria { + refine "selection-filter/within-subscription" { + description + "Specifies the selection filter and where it originated + from. If the 'selection-filter-ref' is populated, the + filter in the subscription came from the 'filters' + container. Otherwise, it is populated in-line as part + of the subscription itself."; + } + } + } + } + + /* + * DATA NODES + */ + + augment "/sn:filters" { + description + "This augmentation allows the datastore to be included as part + of the selection-filtering criteria for a subscription."; + list selection-filter { + key "filter-id"; + description + "A list of preconfigured filters that can be applied + to datastore subscriptions."; + leaf filter-id { + type string; + description + "An identifier to differentiate between selection + filters."; + } + uses selection-filter-types; + } + } + + augment "/sn:subscriptions/sn:subscription" { + when 'yp:datastore'; + description + "This augmentation adds objects to a subscription that are + specific to a datastore subscription, i.e., a subscription to + a stream of datastore node updates."; + uses update-policy; + } + + augment "/sn:subscriptions/sn:subscription/sn:target" { + description + "This augmentation allows the datastore to be included as + part of the selection-filtering criteria for a subscription."; + case datastore { + uses datastore-criteria; + } + } +} diff --git a/models/ietf/RFC/ietf-yang-push@2019-09-09.yang b/models/ietf/RFC/ietf-yang-push@2019-09-09.yang new file mode 100644 index 0000000000000000000000000000000000000000..ea38fb34ebb4f446fae00fe9537dfb245bb1fbc0 --- /dev/null +++ b/models/ietf/RFC/ietf-yang-push@2019-09-09.yang @@ -0,0 +1,797 @@ +module ietf-yang-push { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-push"; + prefix yp; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-subscribed-notifications { + prefix sn; + reference + "RFC 8639: Subscription to YANG Notifications"; + } + import ietf-datastores { + prefix ds; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + import ietf-restconf { + prefix rc; + reference + "RFC 8040: RESTCONF Protocol"; + } + import ietf-yang-patch { + prefix ypatch; + reference + "RFC 8072: YANG Patch Media Type"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <https:/datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Alexander Clemm + <mailto:ludwig@clemm.org> + + Author: Eric Voit + <mailto:evoit@cisco.com>"; + + description + "This module contains YANG specifications for YANG-Push. + + 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. + + Copyright (c) 2019 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 Simplified 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 8641; see the + RFC itself for full legal notices."; + + revision 2019-09-09 { + description + "Initial revision."; + reference + "RFC 8641: Subscriptions to YANG Datastores"; + } + + /* + * FEATURES + */ + + feature on-change { + description + "This feature indicates that on-change triggered subscriptions + are supported."; + } + + /* + * IDENTITIES + */ + + /* Error type identities for datastore subscription */ + + identity resync-subscription-error { + description + "Problem found while attempting to fulfill a + 'resync-subscription' RPC request."; + } + + identity cant-exclude { + base sn:establish-subscription-error; + description + "Unable to remove the set of 'excluded-change' parameters. + This means that the publisher is unable to restrict + 'push-change-update' notifications to just the change types + requested for this subscription."; + } + + identity datastore-not-subscribable { + base sn:establish-subscription-error; + base sn:subscription-terminated-reason; + description + "This is not a subscribable datastore."; + } + + identity no-such-subscription-resync { + base resync-subscription-error; + description + "The referenced subscription doesn't exist. This may be as a + result of a nonexistent subscription ID, an ID that belongs to + another subscriber, or an ID for a configured subscription."; + } + + identity on-change-unsupported { + base sn:establish-subscription-error; + description + "On-change is not supported for any objects that are + selectable by this filter."; + } + + identity on-change-sync-unsupported { + base sn:establish-subscription-error; + description + "Neither 'sync-on-start' nor resynchronization is supported for + this subscription. This error will be used for two reasons: + (1) if an 'establish-subscription' RPC includes + 'sync-on-start' but the publisher can't support sending a + 'push-update' for this subscription for reasons other than + 'on-change-unsupported' or 'sync-too-big' + (2) if the 'resync-subscription' RPC is invoked for either an + existing periodic subscription or an on-change subscription + that can't support resynchronization."; + } + + identity period-unsupported { + base sn:establish-subscription-error; + base sn:modify-subscription-error; + base sn:subscription-suspended-reason; + description + "The requested time period or 'dampening-period' is too short. + This can be for both periodic and on-change subscriptions + (with or without dampening). Hints suggesting alternative + periods may be returned as supplemental information."; + } + + identity update-too-big { + base sn:establish-subscription-error; + base sn:modify-subscription-error; + base sn:subscription-suspended-reason; + description + "Periodic or on-change push update data trees exceed a maximum + size limit. Hints on the estimated size of what was too big + may be returned as supplemental information."; + } + + identity sync-too-big { + base sn:establish-subscription-error; + base sn:modify-subscription-error; + base resync-subscription-error; + base sn:subscription-suspended-reason; + description + "The 'sync-on-start' or resynchronization data tree exceeds a + maximum size limit. Hints on the estimated size of what was + too big may be returned as supplemental information."; + } + + identity unchanging-selection { + base sn:establish-subscription-error; + base sn:modify-subscription-error; + base sn:subscription-terminated-reason; + description + "The selection filter is unlikely to ever select data tree + nodes. This means that based on the subscriber's current + access rights, the publisher recognizes that the selection + filter is unlikely to ever select data tree nodes that change. + Examples for this might be that the node or subtree doesn't + exist, read access is not permitted for a receiver, or static + objects that only change at reboot have been chosen."; + } + + /* + * TYPE DEFINITIONS + */ + + typedef change-type { + type enumeration { + enum create { + description + "A change that refers to the creation of a new + datastore node."; + } + enum delete { + description + "A change that refers to the deletion of a + datastore node."; + } + enum insert { + description + "A change that refers to the insertion of a new + user-ordered datastore node."; + } + enum move { + description + "A change that refers to a reordering of the target + datastore node."; + } + enum replace { + description + "A change that refers to a replacement of the target + datastore node's value."; + } + } + description + "Specifies different types of datastore changes. + + This type is based on the edit operations defined for + YANG Patch, with the difference that it is valid for a + receiver to process an update record that performs a + 'create' operation on a datastore node the receiver believes + exists or to process a delete on a datastore node the + receiver believes is missing."; + reference + "RFC 8072: YANG Patch Media Type, Section 2.5"; + } + + typedef selection-filter-ref { + type leafref { + path "/sn:filters/yp:selection-filter/yp:filter-id"; + } + description + "This type is used to reference a selection filter."; + } + + typedef centiseconds { + type uint32; + description + "A period of time, measured in units of 0.01 seconds."; + } + + /* + * GROUP DEFINITIONS + */ + + grouping datastore-criteria { + description + "A grouping to define criteria for which selected objects from + a targeted datastore should be included in push updates."; + leaf datastore { + type identityref { + base ds:datastore; + } + mandatory true; + description + "Datastore from which to retrieve data."; + } + uses selection-filter-objects; + } + + grouping selection-filter-types { + description + "This grouping defines the types of selectors for objects + from a datastore."; + choice filter-spec { + description + "The content filter specification for this request."; + anydata datastore-subtree-filter { + if-feature "sn:subtree"; + description + "This parameter identifies the portions of the + target datastore to retrieve."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 6"; + } + leaf datastore-xpath-filter { + if-feature "sn:xpath"; + type yang:xpath1.0; + description + "This parameter contains an XPath expression identifying + the portions of the target datastore to retrieve. + + If the expression returns a node set, all nodes in the + node set are selected by the filter. Otherwise, if the + expression does not return a node set, the filter + doesn't select any nodes. + + The expression is evaluated in the following XPath + context: + + o The set of namespace declarations is the set of prefix + and namespace pairs for all YANG modules implemented + by the server, where the prefix is the YANG module + name and the namespace is as defined by the + 'namespace' statement in the YANG module. + + If the leaf is encoded in XML, all namespace + declarations in scope on the 'stream-xpath-filter' + leaf element are added to the set of namespace + declarations. If a prefix found in the XML is + already present in the set of namespace declarations, + the namespace in the XML is used. + + o The set of variable bindings is empty. + + o The function library is comprised of the core + function library and the XPath functions defined in + Section 10 in RFC 7950. + + o The context node is the root node of the target + datastore."; + reference + "XML Path Language (XPath) Version 1.0 + (https://www.w3.org/TR/1999/REC-xpath-19991116) + RFC 7950: The YANG 1.1 Data Modeling Language, + Section 10"; + } + } + } + + grouping selection-filter-objects { + description + "This grouping defines a selector for objects from a + datastore."; + choice selection-filter { + description + "The source of the selection filter applied to the + subscription. This will either (1) come referenced from a + global list or (2) be provided in the subscription itself."; + case by-reference { + description + "Incorporates a filter that has been configured + separately."; + leaf selection-filter-ref { + type selection-filter-ref; + mandatory true; + description + "References an existing selection filter that is to be + applied to the subscription."; + } + } + case within-subscription { + description + "A local definition allows a filter to have the same + lifecycle as the subscription."; + uses selection-filter-types; + } + } + } + + grouping update-policy-modifiable { + description + "This grouping describes the datastore-specific subscription + conditions that can be changed during the lifetime of the + subscription."; + choice update-trigger { + description + "Defines necessary conditions for sending an event record to + the subscriber."; + case periodic { + container periodic { + presence "indicates a periodic subscription"; + description + "The publisher is requested to periodically notify the + receiver regarding the current values of the datastore + as defined by the selection filter."; + leaf period { + type centiseconds; + mandatory true; + description + "Duration of time that should occur between periodic + push updates, in units of 0.01 seconds."; + } + leaf anchor-time { + type yang:date-and-time; + description + "Designates a timestamp before or after which a series + of periodic push updates are determined. The next + update will take place at a point in time that is a + multiple of a period from the 'anchor-time'. + For example, for an 'anchor-time' that is set for the + top of a particular minute and a period interval of a + minute, updates will be sent at the top of every + minute that this subscription is active."; + } + } + } + case on-change { + if-feature "on-change"; + container on-change { + presence "indicates an on-change subscription"; + description + "The publisher is requested to notify the receiver + regarding changes in values in the datastore subset as + defined by a selection filter."; + leaf dampening-period { + type centiseconds; + default "0"; + description + "Specifies the minimum interval between the assembly of + successive update records for a single receiver of a + subscription. Whenever subscribed objects change and + a dampening-period interval (which may be zero) has + elapsed since the previous update record creation for + a receiver, any subscribed objects and properties + that have changed since the previous update record + will have their current values marshalled and placed + in a new update record."; + } + } + } + } + } + + grouping update-policy { + description + "This grouping describes the datastore-specific subscription + conditions of a subscription."; + uses update-policy-modifiable { + augment "update-trigger/on-change/on-change" { + description + "Includes objects that are not modifiable once a + subscription is established."; + leaf sync-on-start { + type boolean; + default "true"; + description + "When this object is set to 'false', (1) it restricts an + on-change subscription from sending 'push-update' + notifications and (2) pushing a full selection per the + terms of the selection filter MUST NOT be done for + this subscription. Only updates about changes + (i.e., only 'push-change-update' notifications) + are sent. When set to 'true' (the default behavior), + in order to facilitate a receiver's synchronization, + a full update is sent, via a 'push-update' notification, + when the subscription starts. After that, + 'push-change-update' notifications are exclusively sent, + unless the publisher chooses to resync the subscription + via a new 'push-update' notification."; + } + leaf-list excluded-change { + type change-type; + description + "Used to restrict which changes trigger an update. For + example, if a 'replace' operation is excluded, only the + creation and deletion of objects are reported."; + } + } + } + } + + grouping hints { + description + "Parameters associated with an error for a subscription + made upon a datastore."; + leaf period-hint { + type centiseconds; + description + "Returned when the requested time period is too short. This + hint can assert a viable period for either a periodic push + cadence or an on-change dampening interval."; + } + leaf filter-failure-hint { + type string; + description + "Information describing where and/or why a provided filter + was unsupportable for a subscription."; + } + leaf object-count-estimate { + type uint32; + description + "If there are too many objects that could potentially be + returned by the selection filter, this identifies the + estimate of the number of objects that the filter would + potentially pass."; + } + leaf object-count-limit { + type uint32; + description + "If there are too many objects that could be returned by + the selection filter, this identifies the upper limit of + the publisher's ability to service this subscription."; + } + leaf kilobytes-estimate { + type uint32; + description + "If the returned information could be beyond the capacity + of the publisher, this would identify the estimated + data size that could result from this selection filter."; + } + leaf kilobytes-limit { + type uint32; + description + "If the returned information would be beyond the capacity + of the publisher, this identifies the upper limit of the + publisher's ability to service this subscription."; + } + } + + /* + * RPCs + */ + + rpc resync-subscription { + if-feature "on-change"; + description + "This RPC allows a subscriber of an active on-change + subscription to request a full push of objects. + + A successful invocation results in a 'push-update' of all + datastore nodes that the subscriber is permitted to access. + This RPC can only be invoked on the same session on which the + subscription is currently active. In the case of an error, a + 'resync-subscription-error' is sent as part of an error + response."; + input { + leaf id { + type sn:subscription-id; + mandatory true; + description + "Identifier of the subscription that is to be resynced."; + } + } + } + + rc:yang-data resync-subscription-error { + container resync-subscription-error { + description + "If a 'resync-subscription' RPC fails, the subscription is + not resynced and the RPC error response MUST indicate the + reason for this failure. This yang-data MAY be inserted as + structured data in a subscription's RPC error response + to indicate the reason for the failure."; + leaf reason { + type identityref { + base resync-subscription-error; + } + mandatory true; + description + "Indicates the reason why the publisher has declined a + request for subscription resynchronization."; + } + uses hints; + } + } + + augment "/sn:establish-subscription/sn:input" { + description + "This augmentation adds additional subscription parameters + that apply specifically to datastore updates to RPC input."; + uses update-policy; + } + + augment "/sn:establish-subscription/sn:input/sn:target" { + description + "This augmentation adds the datastore as a valid target + for the subscription to RPC input."; + case datastore { + description + "Information specifying the parameters of a request for a + datastore subscription."; + uses datastore-criteria; + } + } + + rc:yang-data establish-subscription-datastore-error-info { + container establish-subscription-datastore-error-info { + description + "If any 'establish-subscription' RPC parameters are + unsupportable against the datastore, a subscription is not + created and the RPC error response MUST indicate the reason + why the subscription failed to be created. This yang-data + MAY be inserted as structured data in a subscription's + RPC error response to indicate the reason for the failure. + This yang-data MUST be inserted if hints are to be provided + back to the subscriber."; + leaf reason { + type identityref { + base sn:establish-subscription-error; + } + description + "Indicates the reason why the subscription has failed to + be created to a targeted datastore."; + } + uses hints; + } + } + + augment "/sn:modify-subscription/sn:input" { + description + "This augmentation adds additional subscription parameters + specific to datastore updates."; + uses update-policy-modifiable; + } + + augment "/sn:modify-subscription/sn:input/sn:target" { + description + "This augmentation adds the datastore as a valid target + for the subscription to RPC input."; + case datastore { + description + "Information specifying the parameters of a request for a + datastore subscription."; + uses datastore-criteria; + } + } + + rc:yang-data modify-subscription-datastore-error-info { + container modify-subscription-datastore-error-info { + description + "This yang-data MAY be provided as part of a subscription's + RPC error response when there is a failure of a + 'modify-subscription' RPC that has been made against a + datastore. This yang-data MUST be used if hints are to be + provided back to the subscriber."; + leaf reason { + type identityref { + base sn:modify-subscription-error; + } + description + "Indicates the reason why the subscription has failed to + be modified."; + } + uses hints; + } + } + + /* + * NOTIFICATIONS + */ + + notification push-update { + description + "This notification contains a push update that in turn contains + data subscribed to via a subscription. In the case of a + periodic subscription, this notification is sent for periodic + updates. It can also be used for synchronization updates of + an on-change subscription. This notification shall only be + sent to receivers of a subscription. It does not constitute + a general-purpose notification that would be subscribable as + part of the NETCONF event stream by any receiver."; + leaf id { + type sn:subscription-id; + description + "This references the subscription that drove the + notification to be sent."; + } + anydata datastore-contents { + description + "This contains the updated data. It constitutes a snapshot + at the time of update of the set of data that has been + subscribed to. The snapshot corresponds to the same + snapshot that would be returned in a corresponding 'get' + operation with the same selection filter parameters + applied."; + } + leaf incomplete-update { + type empty; + description + "This is a flag that indicates that not all datastore + nodes subscribed to are included with this update. In + other words, the publisher has failed to fulfill its full + subscription obligations and, despite its best efforts, is + providing an incomplete set of objects."; + } + } + + notification push-change-update { + if-feature "on-change"; + description + "This notification contains an on-change push update. This + notification shall only be sent to the receivers of a + subscription. It does not constitute a general-purpose + notification that would be subscribable as part of the + NETCONF event stream by any receiver."; + leaf id { + type sn:subscription-id; + description + "This references the subscription that drove the + notification to be sent."; + } + container datastore-changes { + description + "This contains the set of datastore changes of the target + datastore, starting at the time of the previous update, per + the terms of the subscription."; + uses ypatch:yang-patch; + } + leaf incomplete-update { + type empty; + description + "The presence of this object indicates that not all changes + that have occurred since the last update are included with + this update. In other words, the publisher has failed to + fulfill its full subscription obligations -- for example, + in cases where it was not able to keep up with a burst of + changes."; + } + } + + augment "/sn:subscription-started" { + description + "This augmentation adds datastore-specific objects to + the notification that a subscription has started."; + uses update-policy; + } + + augment "/sn:subscription-started/sn:target" { + description + "This augmentation allows the datastore to be included as + part of the notification that a subscription has started."; + case datastore { + uses datastore-criteria { + refine "selection-filter/within-subscription" { + description + "Specifies the selection filter and where it originated + from. If the 'selection-filter-ref' is populated, the + filter in the subscription came from the 'filters' + container. Otherwise, it is populated in-line as part + of the subscription itself."; + } + } + } + } + + augment "/sn:subscription-modified" { + description + "This augmentation adds datastore-specific objects to + the notification that a subscription has been modified."; + uses update-policy; + } + + augment "/sn:subscription-modified/sn:target" { + description + "This augmentation allows the datastore to be included as + part of the notification that a subscription has been + modified."; + case datastore { + uses datastore-criteria { + refine "selection-filter/within-subscription" { + description + "Specifies the selection filter and where it originated + from. If the 'selection-filter-ref' is populated, the + filter in the subscription came from the 'filters' + container. Otherwise, it is populated in-line as part + of the subscription itself."; + } + } + } + } + + /* + * DATA NODES + */ + + augment "/sn:filters" { + description + "This augmentation allows the datastore to be included as part + of the selection-filtering criteria for a subscription."; + list selection-filter { + key "filter-id"; + description + "A list of preconfigured filters that can be applied + to datastore subscriptions."; + leaf filter-id { + type string; + description + "An identifier to differentiate between selection + filters."; + } + uses selection-filter-types; + } + } + + augment "/sn:subscriptions/sn:subscription" { + when 'yp:datastore'; + description + "This augmentation adds objects to a subscription that are + specific to a datastore subscription, i.e., a subscription to + a stream of datastore node updates."; + uses update-policy; + } + + augment "/sn:subscriptions/sn:subscription/sn:target" { + description + "This augmentation allows the datastore to be included as + part of the selection-filtering criteria for a subscription."; + case datastore { + uses datastore-criteria; + } + } +} diff --git a/models/ietf/RFC/ietf-yang-schema-mount.yang b/models/ietf/RFC/ietf-yang-schema-mount.yang new file mode 100644 index 0000000000000000000000000000000000000000..c49458a11c36f34ad664ff7cfb0dd305559bb9e6 --- /dev/null +++ b/models/ietf/RFC/ietf-yang-schema-mount.yang @@ -0,0 +1,224 @@ +module ietf-yang-schema-mount { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"; + prefix yangmnt; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz>"; + + description + "This module defines a YANG extension statement that can be used + to incorporate data models defined in other YANG modules in a + module. It also defines operational state data that specify the + overall structure of the data model. + + 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. + + Copyright (c) 2019 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 Simplified 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 8528; + see the RFC itself for full legal notices."; + + revision 2019-01-14 { + description + "Initial revision."; + reference + "RFC 8528: YANG Schema Mount"; + } + + /* + * Extensions + */ + + extension mount-point { + argument label; + description + "The argument 'label' is a YANG identifier, i.e., it is of the + type 'yang:yang-identifier'. + + The 'mount-point' statement MUST NOT be used in a YANG + version 1 module, neither explicitly nor via a 'uses' + statement. + The 'mount-point' statement MAY be present as a substatement + of 'container' and 'list' and MUST NOT be present elsewhere. + There MUST NOT be more than one 'mount-point' statement in a + given 'container' or 'list' statement. + + If a mount point is defined within a grouping, its label is + bound to the module where the grouping is used. + + A mount point defines a place in the node hierarchy where + other data models may be attached. A server that implements a + module with a mount point populates the + '/schema-mounts/mount-point' list with detailed information on + which data models are mounted at each mount point. + + Note that the 'mount-point' statement does not define a new + data node."; + } + + /* + * State data nodes + */ + + container schema-mounts { + config false; + description + "Contains information about the structure of the overall + mounted data model implemented in the server."; + list namespace { + key "prefix"; + description + "This list provides a mapping of namespace prefixes that are + used in XPath expressions of 'parent-reference' leafs to the + corresponding namespace URI references."; + leaf prefix { + type yang:yang-identifier; + description + "Namespace prefix."; + } + leaf uri { + type inet:uri; + description + "Namespace URI reference."; + } + } + list mount-point { + key "module label"; + + description + "Each entry of this list specifies a schema for a particular + mount point. + + Each mount point MUST be defined using the 'mount-point' + extension in one of the modules listed in the server's + YANG library instance with conformance type 'implement'."; + leaf module { + type yang:yang-identifier; + description + "Name of a module containing the mount point."; + } + leaf label { + type yang:yang-identifier; + description + "Label of the mount point defined using the 'mount-point' + extension."; + } + leaf config { + type boolean; + default "true"; + description + "If this leaf is set to 'false', then all data nodes in the + mounted schema are read-only ('config false'), regardless + of their 'config' property."; + } + choice schema-ref { + mandatory true; + description + "Alternatives for specifying the schema."; + container inline { + presence + "A complete self-contained schema is mounted at the + mount point."; + description + "This node indicates that the server has mounted at least + the module 'ietf-yang-library' at the mount point, and + its instantiation provides the information about the + mounted schema. + + Different instances of the mount point may have + different schemas mounted."; + } + container shared-schema { + presence + "The mounted schema together with the 'parent-reference' + make up the schema for this mount point."; + + description + "This node indicates that the server has mounted at least + the module 'ietf-yang-library' at the mount point, and + its instantiation provides the information about the + mounted schema. When XPath expressions in the mounted + schema are evaluated, the 'parent-reference' leaf-list + is taken into account. + + Different instances of the mount point MUST have the + same schema mounted."; + leaf-list parent-reference { + type yang:xpath1.0; + description + "Entries of this leaf-list are XPath 1.0 expressions + that are evaluated in the following context: + + - The context node is the node in the parent data tree + where the mount-point is defined. + + - The accessible tree is the parent data tree + *without* any nodes defined in modules that are + mounted inside the parent schema. + + - The context position and context size are both equal + to 1. + + - The set of variable bindings is empty. + + - The function library is the core function library + defined in the W3C XPath 1.0 document + (http://www.w3.org/TR/1999/REC-xpath-19991116) and + the functions defined in Section 10 of RFC 7950. + + - The set of namespace declarations is defined by the + 'namespace' list under 'schema-mounts'. + + Each XPath expression MUST evaluate to a node-set + (possibly empty). For the purposes of evaluating + XPath expressions whose context nodes are defined in + the mounted schema, the union of all these node-sets + together with ancestor nodes are added to the + accessible data tree. + + Note that in the case 'ietf-yang-schema-mount' is + itself mounted, a 'parent-reference' in the mounted + module may refer to nodes that were brought into the + accessible tree through a 'parent-reference' in the + parent schema."; + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-yang-schema-mount@2019-01-14.yang b/models/ietf/RFC/ietf-yang-schema-mount@2019-01-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..c49458a11c36f34ad664ff7cfb0dd305559bb9e6 --- /dev/null +++ b/models/ietf/RFC/ietf-yang-schema-mount@2019-01-14.yang @@ -0,0 +1,224 @@ +module ietf-yang-schema-mount { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"; + prefix yangmnt; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz>"; + + description + "This module defines a YANG extension statement that can be used + to incorporate data models defined in other YANG modules in a + module. It also defines operational state data that specify the + overall structure of the data model. + + 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. + + Copyright (c) 2019 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 Simplified 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 8528; + see the RFC itself for full legal notices."; + + revision 2019-01-14 { + description + "Initial revision."; + reference + "RFC 8528: YANG Schema Mount"; + } + + /* + * Extensions + */ + + extension mount-point { + argument label; + description + "The argument 'label' is a YANG identifier, i.e., it is of the + type 'yang:yang-identifier'. + + The 'mount-point' statement MUST NOT be used in a YANG + version 1 module, neither explicitly nor via a 'uses' + statement. + The 'mount-point' statement MAY be present as a substatement + of 'container' and 'list' and MUST NOT be present elsewhere. + There MUST NOT be more than one 'mount-point' statement in a + given 'container' or 'list' statement. + + If a mount point is defined within a grouping, its label is + bound to the module where the grouping is used. + + A mount point defines a place in the node hierarchy where + other data models may be attached. A server that implements a + module with a mount point populates the + '/schema-mounts/mount-point' list with detailed information on + which data models are mounted at each mount point. + + Note that the 'mount-point' statement does not define a new + data node."; + } + + /* + * State data nodes + */ + + container schema-mounts { + config false; + description + "Contains information about the structure of the overall + mounted data model implemented in the server."; + list namespace { + key "prefix"; + description + "This list provides a mapping of namespace prefixes that are + used in XPath expressions of 'parent-reference' leafs to the + corresponding namespace URI references."; + leaf prefix { + type yang:yang-identifier; + description + "Namespace prefix."; + } + leaf uri { + type inet:uri; + description + "Namespace URI reference."; + } + } + list mount-point { + key "module label"; + + description + "Each entry of this list specifies a schema for a particular + mount point. + + Each mount point MUST be defined using the 'mount-point' + extension in one of the modules listed in the server's + YANG library instance with conformance type 'implement'."; + leaf module { + type yang:yang-identifier; + description + "Name of a module containing the mount point."; + } + leaf label { + type yang:yang-identifier; + description + "Label of the mount point defined using the 'mount-point' + extension."; + } + leaf config { + type boolean; + default "true"; + description + "If this leaf is set to 'false', then all data nodes in the + mounted schema are read-only ('config false'), regardless + of their 'config' property."; + } + choice schema-ref { + mandatory true; + description + "Alternatives for specifying the schema."; + container inline { + presence + "A complete self-contained schema is mounted at the + mount point."; + description + "This node indicates that the server has mounted at least + the module 'ietf-yang-library' at the mount point, and + its instantiation provides the information about the + mounted schema. + + Different instances of the mount point may have + different schemas mounted."; + } + container shared-schema { + presence + "The mounted schema together with the 'parent-reference' + make up the schema for this mount point."; + + description + "This node indicates that the server has mounted at least + the module 'ietf-yang-library' at the mount point, and + its instantiation provides the information about the + mounted schema. When XPath expressions in the mounted + schema are evaluated, the 'parent-reference' leaf-list + is taken into account. + + Different instances of the mount point MUST have the + same schema mounted."; + leaf-list parent-reference { + type yang:xpath1.0; + description + "Entries of this leaf-list are XPath 1.0 expressions + that are evaluated in the following context: + + - The context node is the node in the parent data tree + where the mount-point is defined. + + - The accessible tree is the parent data tree + *without* any nodes defined in modules that are + mounted inside the parent schema. + + - The context position and context size are both equal + to 1. + + - The set of variable bindings is empty. + + - The function library is the core function library + defined in the W3C XPath 1.0 document + (http://www.w3.org/TR/1999/REC-xpath-19991116) and + the functions defined in Section 10 of RFC 7950. + + - The set of namespace declarations is defined by the + 'namespace' list under 'schema-mounts'. + + Each XPath expression MUST evaluate to a node-set + (possibly empty). For the purposes of evaluating + XPath expressions whose context nodes are defined in + the mounted schema, the union of all these node-sets + together with ancestor nodes are added to the + accessible data tree. + + Note that in the case 'ietf-yang-schema-mount' is + itself mounted, a 'parent-reference' in the mounted + module may refer to nodes that were brought into the + accessible tree through a 'parent-reference' in the + parent schema."; + } + } + } + } + } +} diff --git a/models/ietf/RFC/ietf-yang-smiv2.yang b/models/ietf/RFC/ietf-yang-smiv2.yang new file mode 100644 index 0000000000000000000000000000000000000000..5127e22f7457d46f32ab305dd21257be45bd768e --- /dev/null +++ b/models/ietf/RFC/ietf-yang-smiv2.yang @@ -0,0 +1,146 @@ +module ietf-yang-smiv2 { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-smiv2"; + prefix "smiv2"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module defines YANG extensions that are used to translate + SMIv2 concepts into YANG. + + Copyright (c) 2012 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6643; see + the RFC itself for full legal notices."; + + revision 2012-06-22 { + description + "Initial revision."; + reference + "RFC 6643: Translation of Structure of Management Information + Version 2 (SMIv2) MIB Modules to YANG Modules"; + } + + identity object-identity { + description + "Base identity for all SMIv2 OBJECT-IDENTITYs."; + } + + typedef opaque { + type binary; + description + "The Opaque type supports the capability to pass arbitrary ASN.1 + syntax. A value is encoded using the ASN.1 Basic Encoding Rules + into a string of octets. This, in turn, is encoded as an OCTET + STRING, in effect 'double-wrapping' the original ASN.1 value. + + In the value set and its semantics, this type is equivalent to + the Opaque type of the SMIv2. This type exists in the SMIv2 + solely for backward-compatibility reasons and this is also + true for this YANG data type."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension display-hint { + argument "format"; + description + "The display-hint statement takes as an argument the DISPLAY-HINT + assigned to an SMIv2 textual convention."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + extension max-access { + argument "access"; + description + "The max-access statement takes as an argument the MAX-ACCESS + assigned to an SMIv2 object definition. + + The MAX-ACCESS value is SMIv2 specific and has no impact on + the access provided to YANG objects through protocols such + as NETCONF."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension defval { + argument "value"; + description + "The defval statement takes as an argument a default value + defined by an SMIv2 DEFVAL clause. Note that the value is in + the SMIv2 value space defined by the SMIv2 syntax of the + corresponding object and not in the YANG value space + defined by the corresponding YANG data type."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension implied { + argument "index"; + description + "If an SMIv2 INDEX object is preceded by the IMPLIED keyword, then + the implied statement is present in the YANG module and takes as + an argument the name of the IMPLIED index object."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension alias { + argument "descriptor"; + description + "The alias statement introduces an SMIv2 descriptor. The body of + the alias statement is expected to contain an oid statement that + provides the numeric OID associated with the descriptor."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension oid { + argument "value"; + description + "The oid statement takes as an argument the object identifier + assigned to an SMIv2 definition. The object identifier value + is written in decimal dotted notation."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension subid { + argument "value"; + description + "The subid statement takes as an argument the last sub-identifier + of the object identifier assigned to an SMIv2 definition. The + sub-identifier value is a single positive decimal natural number. + The subid statement may not be used as a substatement to any + top-level node in a YANG document. The subid substatement may + be used only as a substatement to a node having a parent node + defined with either an smiv2:oid or smiv2:subid substatement."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + +} diff --git a/models/ietf/RFC/ietf-yang-smiv2@2012-06-22.yang b/models/ietf/RFC/ietf-yang-smiv2@2012-06-22.yang new file mode 100644 index 0000000000000000000000000000000000000000..5127e22f7457d46f32ab305dd21257be45bd768e --- /dev/null +++ b/models/ietf/RFC/ietf-yang-smiv2@2012-06-22.yang @@ -0,0 +1,146 @@ +module ietf-yang-smiv2 { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-smiv2"; + prefix "smiv2"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module defines YANG extensions that are used to translate + SMIv2 concepts into YANG. + + Copyright (c) 2012 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6643; see + the RFC itself for full legal notices."; + + revision 2012-06-22 { + description + "Initial revision."; + reference + "RFC 6643: Translation of Structure of Management Information + Version 2 (SMIv2) MIB Modules to YANG Modules"; + } + + identity object-identity { + description + "Base identity for all SMIv2 OBJECT-IDENTITYs."; + } + + typedef opaque { + type binary; + description + "The Opaque type supports the capability to pass arbitrary ASN.1 + syntax. A value is encoded using the ASN.1 Basic Encoding Rules + into a string of octets. This, in turn, is encoded as an OCTET + STRING, in effect 'double-wrapping' the original ASN.1 value. + + In the value set and its semantics, this type is equivalent to + the Opaque type of the SMIv2. This type exists in the SMIv2 + solely for backward-compatibility reasons and this is also + true for this YANG data type."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension display-hint { + argument "format"; + description + "The display-hint statement takes as an argument the DISPLAY-HINT + assigned to an SMIv2 textual convention."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + extension max-access { + argument "access"; + description + "The max-access statement takes as an argument the MAX-ACCESS + assigned to an SMIv2 object definition. + + The MAX-ACCESS value is SMIv2 specific and has no impact on + the access provided to YANG objects through protocols such + as NETCONF."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension defval { + argument "value"; + description + "The defval statement takes as an argument a default value + defined by an SMIv2 DEFVAL clause. Note that the value is in + the SMIv2 value space defined by the SMIv2 syntax of the + corresponding object and not in the YANG value space + defined by the corresponding YANG data type."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension implied { + argument "index"; + description + "If an SMIv2 INDEX object is preceded by the IMPLIED keyword, then + the implied statement is present in the YANG module and takes as + an argument the name of the IMPLIED index object."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension alias { + argument "descriptor"; + description + "The alias statement introduces an SMIv2 descriptor. The body of + the alias statement is expected to contain an oid statement that + provides the numeric OID associated with the descriptor."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension oid { + argument "value"; + description + "The oid statement takes as an argument the object identifier + assigned to an SMIv2 definition. The object identifier value + is written in decimal dotted notation."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + extension subid { + argument "value"; + description + "The subid statement takes as an argument the last sub-identifier + of the object identifier assigned to an SMIv2 definition. The + sub-identifier value is a single positive decimal natural number. + The subid statement may not be used as a substatement to any + top-level node in a YANG document. The subid substatement may + be used only as a substatement to a node having a parent node + defined with either an smiv2:oid or smiv2:subid substatement."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + +} diff --git a/models/ietf/RFC/ietf-yang-structure-ext.yang b/models/ietf/RFC/ietf-yang-structure-ext.yang new file mode 100644 index 0000000000000000000000000000000000000000..1382ea567220aba42ea84756a8775db59aace8fb --- /dev/null +++ b/models/ietf/RFC/ietf-yang-structure-ext.yang @@ -0,0 +1,206 @@ +module ietf-yang-structure-ext { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-structure-ext"; + prefix sx; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj+ietf@4668.se> + + Author: Kent Watsen + <mailto:kent+ietf@watsen.net>"; + description + "This module contains conceptual YANG specifications for defining + abstract data structures. + + 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. + + Copyright (c) 2020 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8791 + (https://www.rfc-editor.org/info/rfc8791); see the RFC itself + for full legal notices."; + + revision 2020-06-17 { + description + "Initial revision."; + reference + "RFC 8791: YANG Data Structure Extensions."; + } + + extension structure { + argument name { + yin-element true; + } + description + "This extension is used to specify a YANG data structure that + represents conceptual data defined in YANG. It is intended to + describe hierarchical data independent of protocol context or + specific message encoding format. Data definition statements + within a 'structure' extension statement specify the generic + syntax for the specific YANG data structure, whose name is the + argument of the 'structure' extension statement. + + Note that this extension does not define a media type. A + specification using this extension MUST specify the message + encoding rules, including the content media type, if + applicable. + + The mandatory 'name' parameter value identifies the YANG data + structure that is being defined. + + This extension is only valid as a top-level statement, i.e., + given as a substatement to 'module' or 'submodule'. + + The substatements of this extension MUST follow the ABNF + rules below, where the rules are defined in RFC 7950: + + *must-stmt + [status-stmt] + [description-stmt] + [reference-stmt] + *(typedef-stmt / grouping-stmt) + *data-def-stmt + + A YANG data structure defined with this extension statement is + encoded in the same way as an 'anydata' node. This means + that the name of the structure is encoded as a 'container', + with the instantiated child statements encoded as child nodes + to this node. + + The module name and namespace value for the YANG module using + the extension statement are assigned to each of the data + definition statements resulting from the YANG data structure. + + The XPath document element is the extension statement itself, + such that the child nodes of the document element are + represented by the data-def-stmt substatements within this + extension. This conceptual document is the context for the + following YANG statements: + + - must-stmt + - when-stmt + - path-stmt + - min-elements-stmt + - max-elements-stmt + - mandatory-stmt + - unique-stmt + - ordered-by + - instance-identifier data type + + The following data-def-stmt substatements are constrained + when used within a 'structure' extension statement. + + - The list-stmt is not required to have a key-stmt defined. + - The config-stmt is ignored if present. + "; + } + + extension augment-structure { + argument path { + yin-element true; + } + description + "This extension is used to specify an augmentation to a YANG + data structure defined with the 'structure' statement. It is + intended to describe hierarchical data independent of protocol + context or specific message encoding format. + + This statement has almost the same structure as the + 'augment-stmt'. Data definition statements within this + statement specify the semantics and generic syntax for the + additional data to be added to the specific YANG data + structure, identified by the 'path' argument. + + The mandatory 'path' parameter value identifies the YANG + conceptual data node that is being augmented and is + represented as an absolute-schema-nodeid string, where the + first node in the absolute-schema-nodeid string identifies the + YANG data structure to augment, and the rest of the nodes in + the string identifies the node within the YANG structure to + augment. + + This extension is only valid as a top-level statement, i.e., + given as a substatement to 'module' or 'submodule'. + + The substatements of this extension MUST follow the ABNF + rules below, where the rules are defined in RFC 7950: + + [status-stmt] + [description-stmt] + [reference-stmt] + 1*(data-def-stmt / case-stmt) + + The module name and namespace value for the YANG module using + the extension statement are assigned to instance document data + conforming to the data definition statements within this + extension. + + The XPath document element is the augmented extension + statement itself, such that the child nodes of the document + element are represented by the data-def-stmt substatements + within the augmented 'structure' statement. + + The context node of the 'augment-structure' statement is + derived in the same way as the 'augment' statement, as defined + in Section 6.4.1 of [RFC7950]. This conceptual node is + considered the context node for the following YANG statements: + + - must-stmt + - when-stmt + - path-stmt + - min-elements-stmt + - max-elements-stmt + - mandatory-stmt + - unique-stmt + - ordered-by + - instance-identifier data type + + The following data-def-stmt substatements are constrained + when used within an 'augment-structure' extension statement. + + - The list-stmt is not required to have a key-stmt defined. + - The config-stmt is ignored if present. + + Example: + + module foo { + import ietf-yang-structure-ext { prefix sx; } + + sx:structure foo-data { + container foo-con { } + } + } + + module bar { + import ietf-yang-structure-ext { prefix sx; } + import foo { prefix foo; } + + sx:augment-structure /foo:foo-data/foo:foo-con { + leaf add-leaf1 { type int32; } + leaf add-leaf2 { type string; } + } + } + "; + } +} diff --git a/models/ietf/RFC/ietf-yang-structure-ext@2020-06-17.yang b/models/ietf/RFC/ietf-yang-structure-ext@2020-06-17.yang new file mode 100644 index 0000000000000000000000000000000000000000..1382ea567220aba42ea84756a8775db59aace8fb --- /dev/null +++ b/models/ietf/RFC/ietf-yang-structure-ext@2020-06-17.yang @@ -0,0 +1,206 @@ +module ietf-yang-structure-ext { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-structure-ext"; + prefix sx; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj+ietf@4668.se> + + Author: Kent Watsen + <mailto:kent+ietf@watsen.net>"; + description + "This module contains conceptual YANG specifications for defining + abstract data structures. + + 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. + + Copyright (c) 2020 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 Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8791 + (https://www.rfc-editor.org/info/rfc8791); see the RFC itself + for full legal notices."; + + revision 2020-06-17 { + description + "Initial revision."; + reference + "RFC 8791: YANG Data Structure Extensions."; + } + + extension structure { + argument name { + yin-element true; + } + description + "This extension is used to specify a YANG data structure that + represents conceptual data defined in YANG. It is intended to + describe hierarchical data independent of protocol context or + specific message encoding format. Data definition statements + within a 'structure' extension statement specify the generic + syntax for the specific YANG data structure, whose name is the + argument of the 'structure' extension statement. + + Note that this extension does not define a media type. A + specification using this extension MUST specify the message + encoding rules, including the content media type, if + applicable. + + The mandatory 'name' parameter value identifies the YANG data + structure that is being defined. + + This extension is only valid as a top-level statement, i.e., + given as a substatement to 'module' or 'submodule'. + + The substatements of this extension MUST follow the ABNF + rules below, where the rules are defined in RFC 7950: + + *must-stmt + [status-stmt] + [description-stmt] + [reference-stmt] + *(typedef-stmt / grouping-stmt) + *data-def-stmt + + A YANG data structure defined with this extension statement is + encoded in the same way as an 'anydata' node. This means + that the name of the structure is encoded as a 'container', + with the instantiated child statements encoded as child nodes + to this node. + + The module name and namespace value for the YANG module using + the extension statement are assigned to each of the data + definition statements resulting from the YANG data structure. + + The XPath document element is the extension statement itself, + such that the child nodes of the document element are + represented by the data-def-stmt substatements within this + extension. This conceptual document is the context for the + following YANG statements: + + - must-stmt + - when-stmt + - path-stmt + - min-elements-stmt + - max-elements-stmt + - mandatory-stmt + - unique-stmt + - ordered-by + - instance-identifier data type + + The following data-def-stmt substatements are constrained + when used within a 'structure' extension statement. + + - The list-stmt is not required to have a key-stmt defined. + - The config-stmt is ignored if present. + "; + } + + extension augment-structure { + argument path { + yin-element true; + } + description + "This extension is used to specify an augmentation to a YANG + data structure defined with the 'structure' statement. It is + intended to describe hierarchical data independent of protocol + context or specific message encoding format. + + This statement has almost the same structure as the + 'augment-stmt'. Data definition statements within this + statement specify the semantics and generic syntax for the + additional data to be added to the specific YANG data + structure, identified by the 'path' argument. + + The mandatory 'path' parameter value identifies the YANG + conceptual data node that is being augmented and is + represented as an absolute-schema-nodeid string, where the + first node in the absolute-schema-nodeid string identifies the + YANG data structure to augment, and the rest of the nodes in + the string identifies the node within the YANG structure to + augment. + + This extension is only valid as a top-level statement, i.e., + given as a substatement to 'module' or 'submodule'. + + The substatements of this extension MUST follow the ABNF + rules below, where the rules are defined in RFC 7950: + + [status-stmt] + [description-stmt] + [reference-stmt] + 1*(data-def-stmt / case-stmt) + + The module name and namespace value for the YANG module using + the extension statement are assigned to instance document data + conforming to the data definition statements within this + extension. + + The XPath document element is the augmented extension + statement itself, such that the child nodes of the document + element are represented by the data-def-stmt substatements + within the augmented 'structure' statement. + + The context node of the 'augment-structure' statement is + derived in the same way as the 'augment' statement, as defined + in Section 6.4.1 of [RFC7950]. This conceptual node is + considered the context node for the following YANG statements: + + - must-stmt + - when-stmt + - path-stmt + - min-elements-stmt + - max-elements-stmt + - mandatory-stmt + - unique-stmt + - ordered-by + - instance-identifier data type + + The following data-def-stmt substatements are constrained + when used within an 'augment-structure' extension statement. + + - The list-stmt is not required to have a key-stmt defined. + - The config-stmt is ignored if present. + + Example: + + module foo { + import ietf-yang-structure-ext { prefix sx; } + + sx:structure foo-data { + container foo-con { } + } + } + + module bar { + import ietf-yang-structure-ext { prefix sx; } + import foo { prefix foo; } + + sx:augment-structure /foo:foo-data/foo:foo-con { + leaf add-leaf1 { type int32; } + leaf add-leaf2 { type string; } + } + } + "; + } +} diff --git a/models/third_party/ietf/ietf-yang-types.yang b/models/ietf/RFC/ietf-yang-types.yang similarity index 100% rename from models/third_party/ietf/ietf-yang-types.yang rename to models/ietf/RFC/ietf-yang-types.yang diff --git a/models/ietf/RFC/ietf-yang-types@2010-09-24.yang b/models/ietf/RFC/ietf-yang-types@2010-09-24.yang new file mode 100644 index 0000000000000000000000000000000000000000..5e9e0f20e3742803b5fb90e1ef54cc3ecc417b7c --- /dev/null +++ b/models/ietf/RFC/ietf-yang-types@2010-09-24.yang @@ -0,0 +1,392 @@ +module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Partain + <mailto:david.partain@ericsson.com> + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2010 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 Simplified BSD License set forth in Section + 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6021; see + the RFC itself for full legal notices."; + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifier. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type, the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + /*** collection of date and time related types ***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z all + represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using the + time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually referring + to the notion of local time) uses the time-offset -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence happened. + The specific occurrence must be defined in the description + of any schema node defined using this type. When the specific + occurrence occurred prior to the last time the associated + timeticks attribute was zero, then the timestamp value is + zero. Note that this requires all timestamp values to be + reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + +} diff --git a/models/ietf/RFC/ietf-yang-types@2013-07-15.yang b/models/ietf/RFC/ietf-yang-types@2013-07-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..ee58fa3ab0042120d5607b8713d21fa0ba845895 --- /dev/null +++ b/models/ietf/RFC/ietf-yang-types@2013-07-15.yang @@ -0,0 +1,474 @@ +module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 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 Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +} diff --git a/models/openconfig/public/release/models/acl/.spec.yml b/models/openconfig/public/release/models/acl/.spec.yml deleted file mode 100644 index 3ff7c9c5f1c78eb5acd97a642edd50a8aa2643ac..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/acl/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-acl - docs: - - yang/acl/openconfig-packet-match-types.yang - - yang/acl/openconfig-acl.yang - build: - - yang/acl/openconfig-acl.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/acl/openconfig-packet-match-types.yang b/models/openconfig/public/release/models/acl/openconfig-packet-match-types.yang index 89b42f68e18eb4e6af401ba20f4243ba134a2acd..3e007cf81adc7e5bd4d75df9b846cbb086ac5a09 100644 --- a/models/openconfig/public/release/models/acl/openconfig-packet-match-types.yang +++ b/models/openconfig/public/release/models/acl/openconfig-packet-match-types.yang @@ -23,23 +23,7 @@ module openconfig-packet-match-types { "This module defines common types for use in models requiring data definitions related to packet matches."; - oc-ext:openconfig-version "1.1.0"; - - revision "2021-01-07" { - description - "Remove module extension oc-ext:regexp-posix by making pattern regexes - conform to RFC7950. - - Types impacted: - - port-num-range"; - reference "1.1.0"; - } - - revision "2020-10-20" { - description - "Fix pattern regex for port-num-range."; - reference "1.0.4"; - } + oc-ext:openconfig-version "1.0.3"; revision "2020-06-30" { description @@ -78,6 +62,7 @@ module openconfig-packet-match-types { } // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -279,14 +264,12 @@ module openconfig-packet-match-types { typedef port-num-range { type union { type string { - pattern '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + - '6[0-4][0-9]{3}|[0-5][0-9]{4}|[0-9]{1,4})\.\.' + - '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + - '6[0-4][0-9]{3}|[0-5][0-9]{4}|[0-9]{1,4})'; - oc-ext:posix-pattern '^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + - '6[0-4][0-9]{3}|[0-5][0-9]{4}|[0-9]{1,4})\.\.' + - '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + - '6[0-4][0-9]{3}|[0-5][0-9]{4}|[0-9]{1,4})$'; + pattern '^(6[0-5][0-5][0-3][0-5]|[0-5]?[0-9]?[0-9]?[0-9]?' + + '[0-9]?)\.\.(6[0-5][0-5][0-3][0-5]|[0-5]?[0-9]?[0-9]?' + + '[0-9]?[0-9]?)$'; + oc-ext:posix-pattern '^(6[0-5][0-5][0-3][0-5]|[0-5]?[0-9]?[0-9]?[0-9]?' + + '[0-9]?)\.\.(6[0-5][0-5][0-3][0-5]|[0-5]?[0-9]?[0-9]?' + + '[0-9]?[0-9]?)$'; } type oc-inet:port-number; type enumeration { diff --git a/models/openconfig/public/release/models/aft/.spec.yml b/models/openconfig/public/release/models/aft/.spec.yml deleted file mode 100644 index 6320b24691401750b88d3a9b0ff4a7cf5a2615b5..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/aft/.spec.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: openconfig-aft - docs: - - yang/aft/openconfig-aft.yang - - yang/aft/openconfig-aft-types.yang - build: - - yang/network-instance/openconfig-network-instance.yang - - yang/aft/openconfig-aft-network-instance.yang - run-ci: true diff --git a/models/openconfig/public/release/models/aft/openconfig-aft-common.yang b/models/openconfig/public/release/models/aft/openconfig-aft-common.yang index a4840e010e0593ee0f02c76b28419349559703e2..84b8aeb98b39cf69de332de4ade6b0f2a65da04b 100644 --- a/models/openconfig/public/release/models/aft/openconfig-aft-common.yang +++ b/models/openconfig/public/release/models/aft/openconfig-aft-common.yang @@ -22,22 +22,7 @@ submodule openconfig-aft-common { "Submodule containing definitions of groupings that are re-used across multiple contexts within the AFT model."; - oc-ext:openconfig-version "0.6.0"; - - revision "2020-11-06" { - description - "Make AFT model read-only."; - reference "0.6.0"; - } - - revision "2020-09-09" { - description - "Remove leafs that are not used as keys from config containers as - AFT model is ready-only. - * next-hop/interface-ref/config. - * all leafs under policy-forwarding-entry/config except index."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2019-11-07" { description @@ -106,7 +91,7 @@ submodule openconfig-aft-common { leaf index { type leafref { - path "../state/index"; + path "../config/index"; } description "A unique index identifying the next-hop entry for the @@ -114,17 +99,26 @@ submodule openconfig-aft-common { } + container config { + description + "Configuration parameters relating to the AFT next-hop + entry"; + + uses aft-common-entry-nexthop-config; + } + container state { config false; description "Operational state parameters relating to the AFT next-hop entry"; + uses aft-common-entry-nexthop-config; uses aft-common-entry-nexthop-state; uses aft-labeled-entry-state; } - uses oc-if:interface-ref-state; + uses oc-if:interface-ref; } } } @@ -150,7 +144,7 @@ submodule openconfig-aft-common { // We are at $afi/$entry/state/next-hop-group leaf next-hop-group { type leafref { - path "../../../../next-hop-groups/next-hop-group/state/id"; + path "../../../../next-hop-groups/next-hop-group/config/id"; } description "A reference to the next-hop-group that is in use for the entry @@ -173,15 +167,21 @@ submodule openconfig-aft-common { } } - grouping aft-common-entry-nexthop-state { + grouping aft-common-entry-nexthop-config { description - "Parameters relating to a next-hop."; + "Configuration parameters relating to a next-hop entry for a AFT + entry"; leaf index { type uint64; description "A unique entry for the next-hop."; } + } + + grouping aft-common-entry-nexthop-state { + description + "Parameters relating to a next-hop."; leaf ip-address { type oc-inet:ip-address; @@ -287,16 +287,23 @@ submodule openconfig-aft-common { leaf id { type leafref { - path "../state/id"; + path "../config/id"; } description "A reference to a unique identifier for the next-hop-group."; } + container config { + description + "Configuration parameters related to the next-hop-group."; + uses aft-nhg-config; + } + container state { config false; description "Operational state parameters relating to next-hop-groups."; + uses aft-nhg-config; uses aft-nhg-state; } @@ -315,18 +322,26 @@ submodule openconfig-aft-common { leaf index { type leafref { - path "../state/index"; + path "../config/index"; } description "A reference to the index for the next-hop within the the next-hop-group."; } + container config { + description + "Configuration parameters related to a next-hop within + the next-hop-group."; + uses aft-nhg-nh-config; + } + container state { config false; description "Operational state parameters related to a next-hop within the next-hop-group."; + uses aft-nhg-nh-config; uses aft-nhg-nh-state; } } @@ -356,17 +371,26 @@ submodule openconfig-aft-common { leaf id { type leafref { - path "../state/id"; + path "../config/id"; } description "A reference to the identifier for the condition."; } + container config { + description + "Configuration parameters related to the conditional + next-hop selection."; + + uses aft-nhg-conditional-config; + } + container state { config false; description "Operational state parameters related to the conditional next-hop selection."; + uses aft-nhg-conditional-config; uses aft-nhg-conditional-state; } @@ -388,17 +412,24 @@ submodule openconfig-aft-common { leaf id { type leafref { - path "../state/id"; + path "../config/id"; } description "Reference to the unique ID assigned to the input interface within the conditions list."; } + container config { + description + "Configuration parameters that relate to the input interface."; + uses aft-nhg-conditional-interface-config; + } + container state { config false; description "Operational state parameters that relate to the input interface."; + uses aft-nhg-conditional-interface-config; uses aft-nhg-conditional-interface-state; } } @@ -409,9 +440,9 @@ submodule openconfig-aft-common { } } - grouping aft-nhg-state { + grouping aft-nhg-config { description - "Operational state parameters related to a next-hop-group."; + "Configuration parameters related to a next-hop-group."; leaf id { type uint64; @@ -426,6 +457,11 @@ submodule openconfig-aft-common { is changed, all AFT entries that reference it must also be updated."; } + } + + grouping aft-nhg-state { + description + "Operational state parameters related to a next-hop-group."; leaf color { type uint64; @@ -447,9 +483,9 @@ submodule openconfig-aft-common { } leaf backup-next-hop-group { - // We are at afts/next-hop-groups/next-hop-group/state/backup-next-hop-group + // We are at afts/next-hop-groups/next-hop-group/config/backup-next-hop-group type leafref { - path "../../../next-hop-group/state/id"; + path "../../../next-hop-group/config/id"; } description "The backup next-hop-group for the current group. When all @@ -458,20 +494,26 @@ submodule openconfig-aft-common { } } - grouping aft-nhg-nh-state { + grouping aft-nhg-nh-config { description - "Operational state parameters relating to an individual next-hop - within the next-hop-group."; + "Configuration parameters relating to an individual next-hop within + a next-hop-group."; leaf index { type leafref { - // We are at afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/id - path "../../../../../../next-hops/next-hop/state/index"; + // We are at afts/next-hop-groups/next-hop-group/next-hops/next-hop/config/id + path "../../../../../../next-hops/next-hop/config/index"; } description "A reference to the identifier for the next-hop to which the entry in the next-hop group corresponds."; } + } + + grouping aft-nhg-nh-state { + description + "Operational state parameters relating to an individual next-hop + within the next-hop-group."; leaf weight { type uint64; @@ -483,16 +525,22 @@ submodule openconfig-aft-common { } } - grouping aft-nhg-conditional-state { + grouping aft-nhg-conditional-config { description - "Operational state parameters relating to the conditional selection - of a next-hop group for an AFT entry."; + "Configuration parameters relating to the conditional selection of + a next-hop group for an AFT entry."; leaf id { type uint64; description "A unique identifier for the conditional criteria."; } + } + + grouping aft-nhg-conditional-state { + description + "Operational state parameters relating to the conditional selection + of a next-hop group for an AFT entry."; leaf-list dscp { type oc-inet:dscp; @@ -505,7 +553,7 @@ submodule openconfig-aft-common { leaf next-hop-group { type leafref { // we are at afts/next-hop-groups/next-hop-group/conditions/condition/state/next-hop-group - path "../../../../../next-hop-group/state/id"; + path "../../../../../next-hop-group/config/id"; } description "The next-hop-group that is used by the system for packets that match @@ -513,17 +561,22 @@ submodule openconfig-aft-common { } } - grouping aft-nhg-conditional-interface-state { + grouping aft-nhg-conditional-interface-config { description - "Operational state parameters relating to the input-interface condition - for a next-hop-group."; + "Configuration parameters relating to the input-interface condition for + a next-hop-group."; leaf id { type string; description "A unique reference for the input interface."; } + } + grouping aft-nhg-conditional-interface-state { + description + "Operational state parameters relating to the input-interface condition + for a next-hop-group."; uses oc-if:interface-ref-common; } } diff --git a/models/openconfig/public/release/models/aft/openconfig-aft-ethernet.yang b/models/openconfig/public/release/models/aft/openconfig-aft-ethernet.yang index 3a1ef8e7f8fd52129b3ccfed22726fe5254dcd1c..5a9c465a8d30d0967f2ddd8b080d00b26b573517 100644 --- a/models/openconfig/public/release/models/aft/openconfig-aft-ethernet.yang +++ b/models/openconfig/public/release/models/aft/openconfig-aft-ethernet.yang @@ -20,22 +20,7 @@ submodule openconfig-aft-ethernet { "Submodule containing definitions of groupings for the abstract forwarding tables for Ethernet."; - oc-ext:openconfig-version "0.6.0"; - - revision "2020-11-06" { - description - "Make AFT model read-only."; - reference "0.6.0"; - } - - revision "2020-09-09" { - description - "Remove leafs that are not used as keys from config containers as - AFT model is ready-only. - * next-hop/interface-ref/config. - * all leafs under policy-forwarding-entry/config except index."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2019-11-07" { description @@ -92,26 +77,33 @@ submodule openconfig-aft-ethernet { leaf mac-address { type leafref { - path "../state/mac-address"; + path "../config/mac-address"; } description "Reference to the outer MAC address matched by the entry."; } + container config { + description + "Configuration parameters for the Ethernet AFT entry."; + uses aft-ethernet-entry-config; + } + container state { config false; description "Operational state parameters for the Ethernet AFT entry."; + uses aft-ethernet-entry-config; uses aft-ethernet-entry-state; } } } - grouping aft-ethernet-entry-state { + grouping aft-ethernet-entry-config { description - "Operational state parameters for the Ethernet AFT entry."; + "Configuration parameters for the Ethernet AFT entry."; leaf mac-address { type oc-yang:mac-address; @@ -119,7 +111,11 @@ submodule openconfig-aft-ethernet { "The outer MAC address of the Ethernet frame that must be matched for the AFT entry to be utilised."; } + } + grouping aft-ethernet-entry-state { + description + "Operational state parameters for the Ethernet AFT entry."; uses aft-common-entry-state; } } diff --git a/models/openconfig/public/release/models/aft/openconfig-aft-ipv4.yang b/models/openconfig/public/release/models/aft/openconfig-aft-ipv4.yang index 1474e4f50f7fbdef9938c5fe75bcb77aa4a89c51..d230a6069ad2285379c5d5a02ac80045775eb2d4 100644 --- a/models/openconfig/public/release/models/aft/openconfig-aft-ipv4.yang +++ b/models/openconfig/public/release/models/aft/openconfig-aft-ipv4.yang @@ -20,22 +20,7 @@ submodule openconfig-aft-ipv4 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv4."; - oc-ext:openconfig-version "0.6.0"; - - revision "2020-11-06" { - description - "Make AFT model read-only."; - reference "0.6.0"; - } - - revision "2020-09-09" { - description - "Remove leafs that are not used as keys from config containers as - AFT model is ready-only. - * next-hop/interface-ref/config. - * all leafs under policy-forwarding-entry/config except index."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2019-11-07" { description @@ -92,32 +77,45 @@ submodule openconfig-aft-ipv4 { leaf prefix { type leafref { - path "../state/prefix"; + path "../config/prefix"; } description "Reference to the IPv4 unicast destination prefix which must be matched to utilise the AFT entry."; } + container config { + description + "Configuration parameters for the IPv4 unicast AFT entry."; + uses aft-ipv4-unicast-entry-config; + } + container state { config false; description "Operational state parameters for the IPv4 unicast AFT entry."; + uses aft-ipv4-unicast-entry-config; uses aft-ipv4-unicast-entry-state; } } } - grouping aft-ipv4-unicast-entry-state { + grouping aft-ipv4-unicast-entry-config { description - "Operational state parameters for the IPv4 unicast entry."; + "Configuration parameters for the IPv4 unicast entry."; + leaf prefix { type oc-inet:ipv4-prefix; description "The IPv4 destination prefix that should be matched to utilise the AFT entry."; } + } + + grouping aft-ipv4-unicast-entry-state { + description + "Operational state parameters for the IPv4 unicast entry."; uses aft-common-entry-state; uses aft-common-ip-state; } diff --git a/models/openconfig/public/release/models/aft/openconfig-aft-ipv6.yang b/models/openconfig/public/release/models/aft/openconfig-aft-ipv6.yang index 9f071268a7378020d0e053db1414ed4f98485b8b..3fbaf08dead3a5ff8932f79b0459a598addd618f 100644 --- a/models/openconfig/public/release/models/aft/openconfig-aft-ipv6.yang +++ b/models/openconfig/public/release/models/aft/openconfig-aft-ipv6.yang @@ -20,22 +20,7 @@ submodule openconfig-aft-ipv6 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv6."; - oc-ext:openconfig-version "0.6.0"; - - revision "2020-11-06" { - description - "Make AFT model read-only."; - reference "0.6.0"; - } - - revision "2020-09-09" { - description - "Remove leafs that are not used as keys from config containers as - AFT model is ready-only. - * next-hop/interface-ref/config. - * all leafs under policy-forwarding-entry/config except index."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2019-11-07" { description @@ -92,32 +77,45 @@ submodule openconfig-aft-ipv6 { leaf prefix { type leafref { - path "../state/prefix"; + path "../config/prefix"; } description "Reference to the IPv6 unicast destination prefix which must be matched to utilise the AFT entry."; } + container config { + description + "Configuration parameters for the IPv6 unicast AFT entry."; + uses aft-ipv6-unicast-entry-config; + } + container state { config false; description "Operational state parameters for the IPv6 unicast AFT entry."; + uses aft-ipv6-unicast-entry-config; uses aft-ipv6-unicast-entry-state; } } } - grouping aft-ipv6-unicast-entry-state { + grouping aft-ipv6-unicast-entry-config { description - "Operational state parameters for the IPv6 unicast entry."; + "Configuration parameters for the IPv6 unicast entry."; + leaf prefix { type oc-inet:ipv6-prefix; description "The IPv6 destination prefix that should be matched to utilise the AFT entry."; } + } + + grouping aft-ipv6-unicast-entry-state { + description + "Operational state parameters for the IPv6 unicast entry."; uses aft-common-entry-state; uses aft-common-ip-state; } diff --git a/models/openconfig/public/release/models/aft/openconfig-aft-mpls.yang b/models/openconfig/public/release/models/aft/openconfig-aft-mpls.yang index ec9c6aded7d89731925f0757d6429cb12653c69e..823a0348da696d008a7d409599b13a041f08efa5 100644 --- a/models/openconfig/public/release/models/aft/openconfig-aft-mpls.yang +++ b/models/openconfig/public/release/models/aft/openconfig-aft-mpls.yang @@ -21,22 +21,7 @@ submodule openconfig-aft-mpls { "Submodule containing definitions of groupings for the abstract forwarding table for MPLS label forwarding."; - oc-ext:openconfig-version "0.6.0"; - - revision "2020-11-06" { - description - "Make AFT model read-only."; - reference "0.6.0"; - } - - revision "2020-09-09" { - description - "Remove leafs that are not used as keys from config containers as - AFT model is ready-only. - * next-hop/interface-ref/config. - * all leafs under policy-forwarding-entry/config except index."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2019-11-07" { description @@ -93,34 +78,45 @@ submodule openconfig-aft-mpls { leaf label { type leafref { - path "../state/label"; + path "../config/label"; } description "Reference to the top-most MPLS label matched by the entry."; } + container config { + description + "Configuration parameters for the MPLS AFT entry."; + uses aft-mpls-entry-config; + } + container state { config false; description "Operational state parameters for the MPLS AFT entry."; + uses aft-mpls-entry-config; uses aft-mpls-entry-state; } } } - grouping aft-mpls-entry-state { + grouping aft-mpls-entry-config { description - "Operational state parameters for the MPLS entry."; + "Configuration parameters for the MPLS entry."; leaf label { - type oc-mplst:mpls-label; - description - "The top-most MPLS label that should be matched to - utilise the AFT entry."; + type oc-mplst:mpls-label; + description + "The top-most MPLS label that should be matched to + utilise the AFT entry."; } + } + grouping aft-mpls-entry-state { + description + "Operational state parameters for the MPLS entry."; uses aft-common-entry-state; leaf-list popped-mpls-label-stack { diff --git a/models/openconfig/public/release/models/aft/openconfig-aft-pf.yang b/models/openconfig/public/release/models/aft/openconfig-aft-pf.yang index 1d831108055f109fcdbb4a5e531766154d9b25be..8ed8cf6b7bb1a247c123a9e5d1f0fd7568ac66a5 100644 --- a/models/openconfig/public/release/models/aft/openconfig-aft-pf.yang +++ b/models/openconfig/public/release/models/aft/openconfig-aft-pf.yang @@ -28,22 +28,7 @@ submodule openconfig-aft-pf { fields other than the destination address that is used in other forwarding tables."; - oc-ext:openconfig-version "0.6.0"; - - revision "2020-11-06" { - description - "Make AFT model read only."; - reference "0.6.0"; - } - - revision "2020-09-09" { - description - "Remove leafs that are not used as keys from config containers as - AFT model is ready-only. - * next-hop/interface-ref/config. - * all leafs under policy-forwarding-entry/config except index."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2019-11-07" { description @@ -105,26 +90,34 @@ submodule openconfig-aft-pf { leaf index { type leafref { - path "../state/index"; + path "../config/index"; } description "Reference to the arbitary index for the policy forwarding AFT entry."; } + container config { + description + "Configuration parameters for the Policy forwarding + AFT entry."; + uses aft-pf-entry-config; + } + container state { config false; description "Operational state parameters for the Policy Forwarding AFT entry."; + uses aft-pf-entry-config; uses aft-pf-entry-state; } } } - grouping aft-pf-entry-state { + grouping aft-pf-entry-config { description - "Operational state parameters for the Policy Forwarding + "Configuration parameters for the Policy Forwarding AFT entry."; leaf index { @@ -196,7 +189,12 @@ submodule openconfig-aft-pf { "The value of the destination port field of the transport header that is to be matched by the AFT entry."; } + } + grouping aft-pf-entry-state { + description + "Operational state parameters for the Policy Forwarding + AFT entry."; uses aft-common-entry-state; } } diff --git a/models/openconfig/public/release/models/aft/openconfig-aft.yang b/models/openconfig/public/release/models/aft/openconfig-aft.yang index 23aed962dd274ffb9f00e13f6877ceee32b74229..89e99da798c66059c38736dcb287ff227e088f74 100644 --- a/models/openconfig/public/release/models/aft/openconfig-aft.yang +++ b/models/openconfig/public/release/models/aft/openconfig-aft.yang @@ -40,22 +40,7 @@ module openconfig-aft { is referred to as an Abstract Forwarding Table (AFT), rather than the FIB."; - oc-ext:openconfig-version "0.6.0"; - - revision "2020-11-06" { - description - "Make AFT model read-only."; - reference "0.6.0"; - } - - revision "2020-09-09" { - description - "Remove leafs that are not used as keys from config containers as - AFT model is ready-only. - * next-hop/interface-ref/config. - * all leafs under policy-forwarding-entry/config except index."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2019-11-07" { description @@ -112,7 +97,6 @@ module openconfig-aft { AFT."; container afts { - config false; description "The abstract forwarding tables (AFTs) that are associated with the network instance. An AFT is instantiated per-protocol diff --git a/models/openconfig/public/release/models/bfd/.spec.yml b/models/openconfig/public/release/models/bfd/.spec.yml deleted file mode 100644 index 623e6b5c56e34afa489d876d04a7909d0b5591c6..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/bfd/.spec.yml +++ /dev/null @@ -1,11 +0,0 @@ -- name: openconfig-bfd - docs: - - yang/bfd/openconfig-bfd.yang - build: - - yang/bfd/openconfig-bfd.yang - run-ci: true -- name: openconfig-bfd-ni - build: - - yang/bfd/openconfig-bfd.yang - - yang/network-instance/openconfig-network-instance.yang - run-ci: true diff --git a/models/openconfig/public/release/models/bfd/openconfig-bfd.yang b/models/openconfig/public/release/models/bfd/openconfig-bfd.yang index b36fa100ba4c06ea551032ab63ba96e92f189359..9f8a585db368210f4becfd03e41f13c7d0de0e92 100644 --- a/models/openconfig/public/release/models/bfd/openconfig-bfd.yang +++ b/models/openconfig/public/release/models/bfd/openconfig-bfd.yang @@ -13,6 +13,7 @@ module openconfig-bfd { import openconfig-interfaces { prefix "oc-if"; } import openconfig-if-types { prefix "oc-ift"; } import openconfig-inet-types { prefix "oc-inet"; } + import openconfig-network-instance { prefix "oc-ni"; } import openconfig-policy-types { prefix "oc-pol-types"; } import ietf-inet-types { prefix "ietf-if"; } @@ -27,14 +28,7 @@ module openconfig-bfd { "An OpenConfig model of Bi-Directional Forwarding Detection (BFD) configuration and operational state."; - oc-ext:openconfig-version "0.2.2"; - - revision "2021-03-17" { - description - "Remove augments from bfd module. - Add bfd support directly on the protocols"; - reference "0.2.2"; - } + oc-ext:openconfig-version "0.2.1"; revision "2020-05-08" { description @@ -725,10 +719,43 @@ module openconfig-bfd { "Operational state parameters relating to enabing BFD."; uses enable-bfd-config; - //uses enable-bfd-state; + uses enable-bfd-state; } } } - + + // rjs - TODO - should these be specified within each model? The + // answer here is probably yes, since otherwise openconfig + // network-instance ends up with a circular reference. + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:protocols/oc-ni:protocol/oc-ni:bgp/" + + "oc-ni:neighbors/oc-ni:neighbor" { + description + "Augment the BGP routing protocol to add a link to BFD for + neighbour detection."; + + uses bfd-enable; + } + + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:protocols/oc-ni:protocol/oc-ni:bgp/" + + "oc-ni:peer-groups/oc-ni:peer-group" { + description + "Augment the BGP routing protocol to add a link to BFD for + neighbor detection when specified within a peer-group."; + + uses bfd-enable; + } + + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:protocols/oc-ni:protocol/oc-ni:static-routes/" + + "oc-ni:static/oc-ni:next-hops/oc-ni:next-hop" { + description + "Augment the static route configuration to allow a next-hop + to be tracked by BFD."; + + uses bfd-enable; + } + uses bfd-top; } diff --git a/models/openconfig/public/release/models/bgp/.spec.yml b/models/openconfig/public/release/models/bgp/.spec.yml deleted file mode 100644 index 393020373b68fc2e68dba1104543cb6534e9b5f4..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/bgp/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-bgp - docs: - - yang/bgp/openconfig-bgp-types.yang - - yang/bgp/openconfig-bgp.yang - build: - - yang/bgp/openconfig-bgp.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/bgp/openconfig-bgp-neighbor.yang b/models/openconfig/public/release/models/bgp/openconfig-bgp-neighbor.yang index dbdd765ff3aac1e04a79dd580468fabc34874a75..5b83a0c3ebd1589f3b18a39db734184c5b4ce68b 100644 --- a/models/openconfig/public/release/models/bgp/openconfig-bgp-neighbor.yang +++ b/models/openconfig/public/release/models/bgp/openconfig-bgp-neighbor.yang @@ -10,7 +10,6 @@ submodule openconfig-bgp-neighbor { import openconfig-bgp-types { prefix oc-bgp-types; } import openconfig-inet-types { prefix oc-inet; } import openconfig-yang-types { prefix oc-yang; } - import openconfig-bfd { prefix oc-bfd; } // Include the common submodule include openconfig-bgp-common; @@ -30,13 +29,7 @@ submodule openconfig-bgp-neighbor { "This sub-module contains groupings that are specific to the neighbor context of the OpenConfig BGP module."; - oc-ext:openconfig-version "6.1.0"; - - revision "2021-03-17" { - description - "Add bfd support without augmentation."; - reference "6.1.0"; - } + oc-ext:openconfig-version "6.0.0"; revision "2019-07-10" { description @@ -755,7 +748,6 @@ submodule openconfig-bgp-neighbor { } uses bgp-neighbor-base; - uses oc-bfd:bfd-enable; } } diff --git a/models/openconfig/public/release/models/bgp/openconfig-bgp-peer-group.yang b/models/openconfig/public/release/models/bgp/openconfig-bgp-peer-group.yang index 78f747c74b4bb98368fcb36551ce1817ef8c52aa..a8787ddcea4f3d7d724e7a7182532519f0ee3e5b 100644 --- a/models/openconfig/public/release/models/bgp/openconfig-bgp-peer-group.yang +++ b/models/openconfig/public/release/models/bgp/openconfig-bgp-peer-group.yang @@ -6,7 +6,6 @@ submodule openconfig-bgp-peer-group { import openconfig-extensions { prefix oc-ext; } import openconfig-routing-policy { prefix oc-rpol; } - import openconfig-bfd { prefix oc-bfd; } // Include the common submodule include openconfig-bgp-common; @@ -25,14 +24,7 @@ submodule openconfig-bgp-peer-group { "This sub-module contains groupings that are specific to the peer-group context of the OpenConfig BGP module."; - oc-ext:openconfig-version "6.1.0"; - - - revision "2021-03-17" { - description - "Add bfd support without augmentation."; - reference "6.1.0"; - } + oc-ext:openconfig-version "6.0.0"; revision "2019-07-10" { description @@ -292,7 +284,6 @@ submodule openconfig-bgp-peer-group { } uses bgp-peer-group-base; - uses oc-bfd:bfd-enable; } } diff --git a/models/openconfig/public/release/models/bgp/openconfig-bgp-types.yang b/models/openconfig/public/release/models/bgp/openconfig-bgp-types.yang index 8b1d2b4ee836fc2f19b6d1a6c5e17b566a399f88..59824e6a2eb8eb3326a9058a6a19671e1f96b22d 100644 --- a/models/openconfig/public/release/models/bgp/openconfig-bgp-types.yang +++ b/models/openconfig/public/release/models/bgp/openconfig-bgp-types.yang @@ -25,18 +25,7 @@ module openconfig-bgp-types { policy. It can be imported by modules that make use of BGP attributes"; - oc-ext:openconfig-version "5.3.0"; - - revision "2021-01-07" { - description - "Remove module extension oc-ext:regexp-posix by making pattern regexes - conform to RFC7950. - - Types impacted: - - bgp-std-community-type - - bgp-ext-community-type"; - reference "5.3.0"; - } + oc-ext:openconfig-version "5.2.1"; revision "2020-06-30" { description @@ -118,6 +107,7 @@ module openconfig-bgp-types { } // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -379,10 +369,10 @@ module openconfig-bgp-types { // 0xFFFFFFFF are reserved } type string { - pattern '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + pattern '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + - '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; oc-ext:posix-pattern '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + @@ -401,12 +391,12 @@ module openconfig-bgp-types { type string { // Type 1: 2-octet global and 4-octet local // (AS number) (Integer) - pattern '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + pattern '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + - '[1-9][0-9]{1,8}|[0-9])'; + '[1-9][0-9]{1,8}|[0-9])$'; oc-ext:posix-pattern '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + @@ -417,11 +407,11 @@ module openconfig-bgp-types { type string { // Type 2: 4-octet global and 2-octet local // (ipv4-address) (integer) - pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + - '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; oc-ext:posix-pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + @@ -431,12 +421,12 @@ module openconfig-bgp-types { type string { // RFC5668: 4-octet global and 2-octet local // (AS number) (integer) - pattern '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + + pattern '^(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + - '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; oc-ext:posix-pattern '^(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + @@ -447,13 +437,13 @@ module openconfig-bgp-types { type string { // route-target with Type 1 // route-target:(ASN):(local-part) - pattern 'route\-target:' + + pattern '^route\-target:' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + - '[1-9][0-9]{1,8}|[0-9])'; + '[1-9][0-9]{1,8}|[0-9])$'; oc-ext:posix-pattern '^route\-target:' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + @@ -465,12 +455,12 @@ module openconfig-bgp-types { type string { // route-target with Type 2 // route-target:(IPv4):(local-part) - pattern 'route\-target:' + + pattern '^route\-target:' + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + - '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; oc-ext:posix-pattern '^route\-target:' + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + @@ -480,13 +470,13 @@ module openconfig-bgp-types { } type string { // 4-byte AS Type 1 route-target - pattern 'route\-target:' + + pattern '^route\-target:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + - '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; oc-ext:posix-pattern '^route\-target:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + @@ -497,13 +487,13 @@ module openconfig-bgp-types { } type string { // route-origin with Type 1 - pattern 'route\-origin:' + + pattern '^route\-origin:' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + - '[1-9][0-9]{1,8}|[0-9])'; + '[1-9][0-9]{1,8}|[0-9])$'; oc-ext:posix-pattern '^route\-origin:' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + @@ -514,12 +504,12 @@ module openconfig-bgp-types { } type string { // route-origin with Type 2 - pattern 'route\-origin:' + + pattern '^route\-origin:' + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + - '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; oc-ext:posix-pattern '^route\-origin:' + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + @@ -529,13 +519,13 @@ module openconfig-bgp-types { } type string { // 4-byte AS Type 1 route-origin - pattern 'route\-origin:' + + pattern '^route\-origin:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + - '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; oc-ext:posix-pattern '^route\-origin:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + @@ -546,12 +536,12 @@ module openconfig-bgp-types { } type string { // Extended Color Community - pattern 'color:' + + pattern '^color:' + '[0-1]{2}:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + - '[1-9][0-9]{1,8}|[0-9])'; + '[1-9][0-9]{1,8}|[0-9])$'; oc-ext:posix-pattern '^color:' + '[0-1]{2}:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + diff --git a/models/openconfig/public/release/models/bgp/openconfig-bgp.yang b/models/openconfig/public/release/models/bgp/openconfig-bgp.yang index d863adf25d78aaabac63b13bbf75d3a8a7eac01e..35e5bb09ea8a9ae01770778740cdfc23bce2ccc7 100644 --- a/models/openconfig/public/release/models/bgp/openconfig-bgp.yang +++ b/models/openconfig/public/release/models/bgp/openconfig-bgp.yang @@ -60,13 +60,7 @@ module openconfig-bgp { +-> [ optional pointer to peer-group ] +-> AFI / SAFI [ per-AFI overrides ]"; - oc-ext:openconfig-version "0.6.1"; - - revision "2021-03-17" { - description - "Add bfd support without augmentation."; - reference "0.6.1"; - } + oc-ext:openconfig-version "6.0.0"; revision "2019-07-10" { description diff --git a/models/openconfig/public/release/models/catalog/.spec.yml b/models/openconfig/public/release/models/catalog/.spec.yml deleted file mode 100644 index ce41cde5fe66c733133b5d6a66ea23bb4306fc8f..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/catalog/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-catalog - build: - - yang/catalog/openconfig-module-catalog.yang - docs: - - yang/catalog/openconfig-catalog-types.yang - - yang/catalog/openconfig-module-catalog.yang - run-ci: false diff --git a/models/openconfig/public/release/models/firewall/.spec.yml b/models/openconfig/public/release/models/firewall/.spec.yml deleted file mode 100644 index 8218d44e175af45d22ebc302738900f55c21e478..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/firewall/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-firewall - docs: - - yang/firewall/openconfig-fw-high-availability.yang - - yang/firewall/openconfig-fw-link-monitoring.yang - build: - - yang/firewall/openconfig-fw-high-availability.yang - run-ci: true diff --git a/models/openconfig/public/release/models/firewall/openconfig-fw-high-availability.yang b/models/openconfig/public/release/models/firewall/openconfig-fw-high-availability.yang deleted file mode 100644 index c0e2a6dc1921b61a7bf8e7de63ab525799518e8c..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/firewall/openconfig-fw-high-availability.yang +++ /dev/null @@ -1,544 +0,0 @@ -module openconfig-fw-high-availability { - - yang-version "1"; - - // namespace - namespace "http://openconfig.net/yang/oc-fw-ha"; - - // Assign this module a prefix to be used by others, when imported. - prefix "oc-fw-ha"; - - // Imports - import openconfig-extensions { prefix oc-ext; } - import openconfig-interfaces { prefix oc-if; } - import openconfig-inet-types { prefix oc-inet; } - import openconfig-fw-link-monitoring { prefix oc-fw-linkmon; } - import openconfig-aaa-types { prefix oc-aaa-types; } - import openconfig-types { prefix oc-types; } - - // Meta - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "Model used to configure & monitor firewall High Availability(HA). - The model is comprised primarily of the following sections - - - Various global config parameters - (such as ha-group-id, ha-mode etc.) - - Control link configuration parameters - (control link is used to exchange HA control msgs) - - Data link configuration parameters - (data link is used to exchange information for seamless failover) - - HA timers - - This model also imports/uses the link-monitoring module, to - determine health of firewall cluster based on the status of the - interfaces being monitored. Please see that module description - for additional details"; - - oc-ext:openconfig-version "0.2.0"; - - revision 2021-03-21 { - description - "Adding HA_PEER_MISMATCHED_ITEM identity."; - reference "0.2.0"; - } - - revision "2020-06-23" { - description - "Initial version"; - reference "0.1.0"; - } - - // Extend HA_PEER_MISMATCHED_ITEM here, when applicable. - identity HA_PEER_MISMATCHED_ITEM { - description - "Base type to specify the HA parameters that are not matching - amongst HA peers."; - } - - identity SOFTWARE_MISMATCH { - base HA_PEER_MISMATCHED_ITEM; - description - "Software version is not matching between HA peers."; - } - - identity RUNNING_CONFIG_MISMATCH { - base HA_PEER_MISMATCHED_ITEM; - description - "Running configuration is not matching between HA peers."; - } - - identity IPS_SIGNATURES_MISMATCH { - base HA_PEER_MISMATCHED_ITEM; - description - "IPS/IDS signatures are not matching between HA peers."; - } - - identity AVC_SIGNATURES_MISMATCH { - base HA_PEER_MISMATCHED_ITEM; - description - "AVC signatures are not matching between HA peers."; - } - - grouping control-link-common-config { - description - "HA Control link configuration parameters"; - leaf control-link-interface { - type oc-if:base-interface-ref; - description - "Specify which interface will be used to exchange HA control - messages between peers"; - } - - leaf control-link-port { - type oc-inet:port-number; - description - "Specify which TCP/UDP port will be used to exchange control - messages"; - } - - leaf control-link-ipv4 { - type oc-inet:ipv4-prefix; - description - "Specify the ipv4 address used by the fw for the control link"; - } - - leaf control-link-gateway { - type oc-inet:ipv4-address; - description - "If peer control ipv4 is in a different subnet, specify the - gateway ipv4 here to provide reachability"; - } - - leaf control-link-ipv6 { - type oc-inet:ipv6-prefix; - description - "Specify the ipv6 address used by the fw for the control link"; - } - - leaf control-link-ipv6-gateway { - type oc-inet:ipv6-address; - description - "If peer control ipv6 is in a different subnet, specify the - gateway ipv6 here to provide reachability"; - } - - leaf control-link-peer-ipv4 { - type oc-inet:ipv4-prefix; - description - "Specify the peer ipv4 address, if control link is utilizing - Layer 3"; - } - - leaf control-link-peer-ipv6 { - type oc-inet:ipv6-prefix; - description - "Specify the peer ipv6 address, if control link is utilizing - Layer 3"; - } - } - - grouping data-link-common-config { - description - "HA data link configuration parameters"; - - leaf data-link-interface { - type oc-if:base-interface-ref; - description - "Specify which interface will be used to sync session tables, - forwarding tables, ARP tables, IPSEC SAs and any other - messages that MUST be exchanged to facilitate seamless traffic - handling during a failover event"; - } - - leaf data-link-port { - type oc-inet:port-number; - description - "Specify which TCP/UDP port will be used to exchange data link - messages"; - } - - leaf data-link-ipv4 { - type oc-inet:ipv4-prefix; - description - "If data link is layer 3, specify the local unit's ipv4 - address"; - } - - leaf data-link-gateway { - type oc-inet:ipv4-address; - description - "If peer data ip is in a different subnet, specify the gateway - ip here to provide reachability"; - } - - leaf data-link-ipv6 { - type oc-inet:ipv6-prefix; - description - "If data link is layer 3, specify the local unit's ipv6 - address"; - } - - leaf data-link-ipv6-gateway { - type oc-inet:ipv6-address; - description - "If peer data ipv6 is in a different subnet, specify the - gateway ipv6 here to provide reachability"; - } - - leaf data-link-peer-ipv4 { - type oc-inet:ipv4-prefix; - description - "If data link is layer 3, specify the peer's ipv4 address"; - } - - leaf data-link-peer-ipv6 { - type oc-inet:ipv6-prefix; - description - "If data link is layer 3, specify the peer's ipv6 address"; - } - } - - grouping ha-timers-config { - description - "Used to specify various HA timers"; - - leaf preempt-hold-timer { - type uint32; - units milliseconds; - description - "Length of time, from the last received Hello message, - a firewall will wait before taking over the active role in a - HA pair"; - } - - leaf hello-interval { - type uint32; - units milliseconds; - description - "Interval between hello messages exchanged by the HA peers"; - } - } - - grouping ha-parameters-config { - description - "All parameters needed to bootstrap a HA cluster"; - - leaf ha-enabled { - type boolean; - default false; - description - "This must be set to 'true' to initiate firewall participation - in a HA cluster. Once set to 'true', this boolean can be - flipped to 'false' to DISABLE HA and put a unit in a - 'suspended' state while retaining all other HA settings & - configuration parameters. At the same time the 'ha-state' leaf - under 'ha-parameters-state' must then be updated to - 'SUSPENDED'"; - } - - leaf ha-mode { - type enumeration { - enum ACTIVE_PASSIVE { - description - "This value indicates the HA cluster is operating in - active/passive mode. In this scenario there are only - ever two firewalls in the cluster. The active firewall - serves as the 'primary' handling the traffic & the - passive firewall acts as a 'secondary' ready to take - over if the 'active' unit fails"; - } - } - description - "Configurable HA modes"; - } - - leaf ha-key { - type string; - description - "HA key used to encrypt & authenticate HA messages betwen - the peers. This is provided in clear-text by the client & - expected to be hashed by the firewall in the configuration"; - } - - leaf ha-key-hashed { - type oc-aaa-types:crypt-password-type; - description - "HA key,used to encrypt & authenticate HA messages between - the peers, supplied as a hashed value using the notation - described in the definition of the crypt-password-type"; - } - - leaf ha-msg-encryption { - type boolean; - default false; - description - "When set to true all traffic between firewall units in a HA - cluster are encrypted. If operator provided encryption key is - supported, that value must be derived from the - ha-key/ha-key-hashed leaf nodes. If that is not supported, the - vendor is expected to derive it's own keying material"; - } - - leaf id { - type uint8; - description - "The high availbility group id for a unit. This value MUST - match across both units participating in a HA cluster"; - } - - leaf ha-device-id { - type uint8; - description - "Specify the device-id to identify the firewall within a HA - group. This value MUST be unique to the local-unit and MUST - NOT clash with the peer within a ha-group"; - } - - leaf preempt { - type boolean; - default false; - description - "When set to true the firewall forces reelection of the active - role after joining the cluster"; - } - - leaf priority { - type uint8; - description - "Set priority value for the firewall. This value is used - to participate in the election of the active unit in the HA - cluster. Firewall with highest priority is elected as the - ACTIVE unit"; - } - - uses ha-timers-config; - uses oc-fw-linkmon:global-health-config; - } - - grouping ha-parameters-state { - description - "All parameters needed to monitor a HA cluster"; - - leaf ha-state { - type enumeration { - enum ACTIVE { - description - "Firewall is 'active' and handling all traffic in a - cluster"; - } - enum PASSIVE { - description - "Firewall is 'passive' in a two-unit cluster ready to - handle traffic if the 'active' unit fails"; - } - enum DEGRADED { - description - "Firewall is in a 'degraded' state and unable to join - the cluster due to config or operational failures"; - } - enum SUSPENDED { - description - "This state represents a firewall which will not join - the cluster due to 'ha-enable' set to, or left at it's - default of, 'false'"; - } - } - description - "Firewall's operational ha-state"; - } - - leaf ha-state-last-change { - type oc-types:timeticks64; - units nanoseconds; - description - "Reports the time the firewall entered its current HA - operational state. The value is the timestamp in nanoseconds - relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; - } - - leaf ha-config-sync { - type boolean; - description - "Returns 'TRUE' if config sync is operational between HA - peers. Returns 'FALSE' otherwise."; - } - - leaf ha-session-sync { - type boolean; - description - "Returns 'TRUE' if session sync is operational between HA - peers. Returns 'FALSE' otherwise."; - } - leaf-list ha-mismatched-parameters { - type identityref { - base HA_PEER_MISMATCHED_ITEM; - } - description - "List of HA parameters that are mismatched between peers. Use - this list to highlight root cause of HA operational issues - that an operator must fix"; - } - - uses oc-fw-linkmon:global-health-state; - } - - grouping control-link-backup { - description - "Structural grouping for backup HA control link"; - - container backup { - description - "Data related to backup HA control link"; - - container config { - description - "Configuration data related to backup HA control link"; - - uses control-link-common-config; - } - - container state { - config false; - - description - "Operational state data related to backup HA control link"; - - uses control-link-common-config; - } - } - } - - grouping control-link-top { - description - "Structural grouping for HA control link"; - - container control-link { - description - "Top-level container for HA control link"; - - container config { - description - "Configuration parameters related to primary HA control - link"; - - uses control-link-common-config; - } - - container state { - config false; - - description - "Operational state data related to primary HA control link"; - - uses control-link-common-config; - } - - uses control-link-backup; - } - } - - grouping data-link-backup { - description - "Structural grouping for backup HA data link"; - - container backup { - description - "Parameters related to backup HA data link"; - - container config { - description - "Configuration parameters related to backup HA data link"; - - uses data-link-common-config; - } - - container state { - config false; - - description - "Operational state parameters related to backup HA data - link"; - - uses data-link-common-config; - } - } - } - - grouping data-link-top { - description - "Structural grouping for HA data link"; - - container data-link { - description - "Top-level container for HA data link"; - - container config { - description - "Configuration parameters related to primary HA data link"; - - uses data-link-common-config; - } - - container state { - config false; - - description - "Operational state parameters related to primary HA data - link"; - - uses data-link-common-config; - } - - uses data-link-backup; - } - } - - grouping ha-configuration-top { - description - "Top level grouping for HA configuration and operational state - data"; - container ha-groups { - description - "Top level container for HA groups"; - list ha-group { - key "id"; - description - "HA group id used to create a logical HA group"; - - leaf id { - type leafref { - path "../config/id"; - } - description - "References the group id key."; - } - - container config { - description - "Config container for HA parameters"; - - uses ha-parameters-config; - } - - container state { - config false; - description - "State container for HA parameters"; - uses ha-parameters-config; - uses ha-parameters-state; - } - - uses control-link-top; - uses data-link-top; - uses oc-fw-linkmon:interface-group-top; - } - } - } - uses ha-configuration-top; -} - diff --git a/models/openconfig/public/release/models/firewall/openconfig-fw-link-monitoring.yang b/models/openconfig/public/release/models/firewall/openconfig-fw-link-monitoring.yang deleted file mode 100644 index 1a0cf37d894b1b1ea5e26ff5a3838122a464282d..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/firewall/openconfig-fw-link-monitoring.yang +++ /dev/null @@ -1,183 +0,0 @@ -module openconfig-fw-link-monitoring { - - yang-version "1"; - - // namespace - namespace "http://openconfig.net/yang/openconfig-fw-link-monitoring"; - - // Assign this module a prefix to be used when imported. - prefix "oc-fw-linkmon"; - - // Imports - import openconfig-extensions { prefix oc-ext; } - import openconfig-interfaces { prefix oc-if; } - - // Meta - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This model defines interface groups and corresponding monitoring - policies for firewall HA groups. It also provides modeling for a - global health monitoring policy for the HA group."; - - oc-ext:openconfig-version "0.2.0"; - - revision "2021-03-21" { - description - "Removed redundandt uses statement from root node."; - reference "0.2.0"; - } - - revision "2020-06-23" { - description - "Initial version"; - reference "0.1.0"; - } - - grouping interface-group-config { - description - "Parameters to bundle monitored interfaces together"; - - leaf id { - type union { - type uint8; - type string; - } - description - "Assign a unique id to an interface group"; - } - - leaf-list monitored-interfaces { - type oc-if:base-interface-ref; - description - "Interface being monitored"; - } - - leaf group-policy { - type enumeration { - enum ANY { - description - "Group status is DOWN if the status of ANY interface - within the group is down."; - } - enum ALL { - description - "Group status is DOWN if the status of ALL interfaces - within the group are down."; - } - } - description - "Determines how the State of monitored-interfaces is used to - determine the State of the group they are a member of"; - } - } - - grouping interface-group-state { - description - "State data associated with the interface groups"; - - leaf group-status { - type enumeration { - enum UP { - description - "Group status is UP"; - } - enum DOWN { - description - "Group status is DOWN"; - } - } - description - "The status of this interface group"; - } - } - - grouping global-health-config { - description - "Configuration parameters used to drive the decision criteria to - determine the global health of the interface monitoring state - machine. The global health is a derivative of the status of the - individual interface groups"; - - leaf global-health-policy { - type enumeration { - enum ANY { - description - "Global health is DOWN if ANY of the monitored interface - groups are DOWN"; - } - enum ALL { - description - "Global health is DOWN if ALL of the monitored interface - groups are DOWN"; - } - } - description - "Global health values associated with the interface monitoring - state machine"; - } - } - - grouping global-health-state { - description - "State parameters associated with the global health of the - interface monitoring state machine"; - - leaf global-health-status { - type enumeration { - enum UP { - description - "Global interface monitoring status is UP"; - } - enum DOWN { - description - "Global interface monitoring status is DOWN"; - } - } - description - "Global interface monitoring status"; - } - } - - grouping interface-group-top { - description - "Top level grouping for monitored interface-groups"; - container interface-groups { - description - "Top level container for monitored interface groups"; - - list interface-group { - key "id"; - description - "List of interface groups being monitored"; - - leaf id { - type leafref { - path "../config/id"; - } - description - "Reference to the interface-group key used to bundle - interfaces in a logical group"; - } - - container config { - description - "Configuration parameters for the interface-groups"; - uses interface-group-config; - } - - container state { - config false; - description - "State container for monitored interface-groups."; - uses interface-group-config; - uses interface-group-state; - } - } - } - } - } diff --git a/models/openconfig/public/release/models/interfaces/.spec.yml b/models/openconfig/public/release/models/interfaces/.spec.yml deleted file mode 100644 index a192cd795a3d390a0f1582734c89ae53763e9418..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/interfaces/.spec.yml +++ /dev/null @@ -1,31 +0,0 @@ -- name: openconfig-interfaces - docs: - - yang/interfaces/openconfig-if-types.yang - - yang/interfaces/openconfig-interfaces.yang - - yang/interfaces/openconfig-if-ip.yang - - yang/interfaces/openconfig-if-aggregate.yang - - yang/interfaces/openconfig-if-ethernet.yang - - yang/interfaces/openconfig-if-ethernet-ext.yang - - yang/interfaces/openconfig-if-poe.yang - - yang/interfaces/openconfig-if-ip-ext.yang - - yang/interfaces/openconfig-if-8021x.yang - - yang/vlan/openconfig-vlan.yang - - yang/interfaces/openconfig-if-tunnel.yang - - yang/platform/openconfig-platform-port.yang - - yang/platform/openconfig-platform-transceiver.yang - - yang/interfaces/openconfig-if-sdn-ext.yang - build: - - yang/interfaces/openconfig-interfaces.yang - - yang/interfaces/openconfig-if-ip.yang - - yang/interfaces/openconfig-if-aggregate.yang - - yang/interfaces/openconfig-if-ethernet.yang - - yang/interfaces/openconfig-if-ethernet-ext.yang - - yang/interfaces/openconfig-if-poe.yang - - yang/interfaces/openconfig-if-ip-ext.yang - - yang/interfaces/openconfig-if-8021x.yang - - yang/vlan/openconfig-vlan.yang - - yang/interfaces/openconfig-if-tunnel.yang - - yang/platform/openconfig-platform-port.yang - - yang/platform/openconfig-platform-transceiver.yang - - yang/interfaces/openconfig-if-sdn-ext.yang - run-ci: true diff --git a/models/openconfig/public/release/models/interfaces/openconfig-if-ethernet.yang b/models/openconfig/public/release/models/interfaces/openconfig-if-ethernet.yang index adbee515fc317eb02bcb312919ff883f30711f6d..6ea60fc0076247bdd6800185eb1a1c32bc016f3c 100644 --- a/models/openconfig/public/release/models/interfaces/openconfig-if-ethernet.yang +++ b/models/openconfig/public/release/models/interfaces/openconfig-if-ethernet.yang @@ -24,21 +24,7 @@ module openconfig-if-ethernet { "Model for managing Ethernet interfaces -- augments the OpenConfig model for interface configuration and state."; - oc-ext:openconfig-version "2.10.0"; - - revision "2021-05-17" { - description - "Add ethernet counters: in-carrier-errors, - in-interrupted-tx, in-late-collision, in-mac-errors-rx, - in-single-collision, in-symbol-error and out-mac-errors-tx"; - reference "2.10.0"; - } - - revision "2021-03-30" { - description - "Add counter for drops due to oversized frames."; - reference "2.9.0"; - } + oc-ext:openconfig-version "2.8.1"; revision "2020-05-06" { description @@ -380,86 +366,6 @@ module openconfig-if-ethernet { bits within the block"; } - leaf in-carrier-errors { - type oc-yang:counter64; - description - "The number of received errored frames due to a carrier issue. - The value refers to MIB counter for - dot3StatsCarrierSenseErrors - oid=1.3.6.1.2.1.10.7.2.1.11"; - reference - "RFC 1643 Definitions of Managed - Objects for the Ethernet-like Interface Types."; - } - - leaf in-interrupted-tx { - type oc-yang:counter64; - description - "The number of received errored frames due to interrupted - transmission issue. The value refers to MIB counter for - dot3StatsDeferredTransmissions - oid=1.3.6.1.2.1.10.7.2.1.7"; - reference - "RFC 1643 Definitions of Managed - Objects for the Ethernet-like Interface Types."; - } - - leaf in-late-collision { - type oc-yang:counter64; - description - "The number of received errored frames due to late collision - issue. The value refers to MIB counter for - dot3StatsLateCollisions - oid=1.3.6.1.2.1.10.7.2.1.8"; - reference - "RFC 1643 Definitions of Managed - Objects for the Ethernet-like Interface Types."; - } - - leaf in-mac-errors-rx { - type oc-yang:counter64; - description - "The number of received errored frames due to MAC errors - received. The value refers to MIB counter for - dot3StatsInternalMacReceiveErrors - oid=1.3.6.1.2.1.10.7.2.1.16"; - reference - "RFC 1643 Definitions of Managed - Objects for the Ethernet-like Interface Types."; - } - - leaf in-single-collision { - type oc-yang:counter64; - description - "The number of received errored frames due to single collision - issue. The value refers to MIB counter for - dot3StatsSingleCollisionFrames - oid=1.3.6.1.2.1.10.7.2.1.4"; - reference - "RFC 1643 Definitions of Managed - Objects for the Ethernet-like Interface Types."; - } - - leaf in-symbol-error { - type oc-yang:counter64; - description - "The number of received errored frames due to symbol error. - The value refers to MIB counter for - in-symbol-error - oid=1.3.6.1.2.1.10.7.2.1.18"; - reference - "RFC 1643 Definitions of Managed - Objects for the Ethernet-like Interface Types."; - } - - leaf in-maxsize-exceeded { - type oc-yang:counter64; - description - "The total number frames received that are well-formed but - dropped due to exceeding the maximum frame size on the interface - (e.g., MTU or MRU)"; - } - // egress counters leaf out-mac-control-frames { @@ -479,19 +385,6 @@ module openconfig-if-ethernet { description "Number of 802.1q tagged frames sent on the interface"; } - - leaf out-mac-errors-tx { - type oc-yang:counter64; - description - "The number of sent errored frames due to MAC errors - transmitted. The value refers to MIB counter for - dot3StatsInternalMacTransmitErrors - oid=1.3.6.1.2.1.10.7.2.1.10"; - reference - "RFC 1643 Definitions of Managed - Objects for the Ethernet-like Interface Types."; - } - } grouping ethernet-interface-state { @@ -501,7 +394,7 @@ module openconfig-if-ethernet { leaf hw-mac-address { type oc-yang:mac-address; description - "Represenets the 'burned-in', or system-assigned, MAC + "Represenets the 'burned-in', or system-assigned, MAC address for the Ethernet interface."; } diff --git a/models/openconfig/public/release/models/interfaces/openconfig-if-sdn-ext.yang b/models/openconfig/public/release/models/interfaces/openconfig-if-sdn-ext.yang deleted file mode 100644 index fb4cfeef090d32522037fcd854566eb31a4a3ed0..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/interfaces/openconfig-if-sdn-ext.yang +++ /dev/null @@ -1,69 +0,0 @@ -module openconfig-if-sdn-ext { - yang-version "1"; - - namespace "http://openconfig.net/interfaces/sdn-ext"; - prefix "oc-if-sdn"; - - import openconfig-extensions { prefix oc-ext; } - import openconfig-interfaces { prefix oc-if; } - - organization - "OpenConfig working group"; - - contact - "www.openconfig.net"; - - description - "This module provides extensions to the OpenConfig interfaces - module for network elements that support external 'SDN' control - of their interfaces."; - - oc-ext:catalog-organization "openconfig"; - oc-ext:origin "openconfig"; - - oc-ext:openconfig-version "0.1.0"; - - revision 2021-03-30 { - description - "Initial revision."; - reference "0.1.0"; - } - - grouping sdn-interface-config { - description - "Configuration parameters applicable to interfaces on devices - that support SDN control."; - - leaf forwarding-viable { - type boolean; - default true; - description - "This value indicates whether the interface may be used - to route traffic or not. If set to false, the - interface is not used for forwarding traffic, but as long as - it is up, the interface still maintains its layer-2 - adjacencies and runs its configured layer-2 functions - (e.g., LLDP, etc.). - This is used by an external programming entity to disable an interface - (usually part of an aggregate) for the purposes of forwarding - traffic. This allows a logical aggregate to continue to be - used with partial capacity, for example. Note that setting - `forwarding-viable = false` is not equivalent to - administratively disabling the interface -- in particular, the - interface is expected to participate in L2 protocols such as - LLDP or LACP even if it blocked from forwarding traffic."; - } - } - - augment "/oc-if:interfaces/oc-if:interface/oc-if:config" { - description - "Add SDN extensions to interface intended configuration."; - uses sdn-interface-config; - } - - augment "/oc-if:interfaces/oc-if:interface/oc-if:state" { - description - "Add SDN extensions to interface applied configuration."; - uses sdn-interface-config; - } -} diff --git a/models/openconfig/public/release/models/interfaces/openconfig-interfaces.yang b/models/openconfig/public/release/models/interfaces/openconfig-interfaces.yang index a91d43980121641c001647e5e19423f965b12993..b242f2bfac88f5a9ea30b09e914d505c0bbd1a01 100644 --- a/models/openconfig/public/release/models/interfaces/openconfig-interfaces.yang +++ b/models/openconfig/public/release/models/interfaces/openconfig-interfaces.yang @@ -50,13 +50,7 @@ module openconfig-interfaces { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "2.5.0"; - - revision "2021-04-06" { - description - "Add leaves for management and cpu interfaces"; - reference "2.5.0"; - } + oc-ext:openconfig-version "2.4.3"; revision "2019-11-19" { description @@ -586,28 +580,6 @@ module openconfig-interfaces { channel on the system."; oc-ext:telemetry-on-change; } - - leaf management { - type boolean; - description - "When set to true, the interface is a dedicated - management interface that is not connected to dataplane - interfaces. It may be used to connect the system to an - out-of-band management network, for example."; - oc-ext:telemetry-on-change; - } - - leaf cpu { - type boolean; - description - "When set to true, the interface is for traffic - that is handled by the system CPU, sometimes also called the - control plane interface. On systems that represent the CPU - interface as an Ethernet interface, for example, this leaf - should be used to distinguish the CPU interface from dataplane - interfaces."; - oc-ext:telemetry-on-change; - } } diff --git a/models/openconfig/public/release/models/isis/.spec.yml b/models/openconfig/public/release/models/isis/.spec.yml deleted file mode 100644 index d68a8b0846e9f509ddb8f955822d1ecdfc3e6d2c..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/isis/.spec.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: openconfig-isis - docs: - - yang/isis/openconfig-isis-lsdb-types.yang - - yang/isis/openconfig-isis-types.yang - - yang/isis/openconfig-isis.yang - build: - - yang/isis/openconfig-isis.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/isis/openconfig-isis-routing.yang b/models/openconfig/public/release/models/isis/openconfig-isis-routing.yang index 4675cce5b40fe0dadf30ba59200f41567f650413..aab25d9ad4aa809a4c585bb40cfa7337e782aa98 100644 --- a/models/openconfig/public/release/models/isis/openconfig-isis-routing.yang +++ b/models/openconfig/public/release/models/isis/openconfig-isis-routing.yang @@ -20,13 +20,7 @@ submodule openconfig-isis-routing { description "This module describes YANG model for ISIS Routing"; - oc-ext:openconfig-version "0.6.1"; - - revision "2021-03-17" { - description - "Add bfd support without augmentation."; - reference "0.6.1"; - } + oc-ext:openconfig-version "0.6.0"; revision "2020-03-24" { description diff --git a/models/openconfig/public/release/models/isis/openconfig-isis.yang b/models/openconfig/public/release/models/isis/openconfig-isis.yang index 2739f218981348a400bed9d6702f6e45abd3abb9..51a42cf2aec0e2e1a23804306dd898e43437486f 100644 --- a/models/openconfig/public/release/models/isis/openconfig-isis.yang +++ b/models/openconfig/public/release/models/isis/openconfig-isis.yang @@ -16,7 +16,6 @@ module openconfig-isis { import openconfig-extensions { prefix "oc-ext"; } import openconfig-interfaces { prefix "oc-if"; } import openconfig-segment-routing { prefix "oc-sr"; } - import openconfig-bfd { prefix "oc-bfd"; } // TODO(robjs): Import authentication and keychain following merge of these // modules. //import openconfig-authentication-types { prefix "oc-auth-types"; } @@ -56,13 +55,7 @@ module openconfig-isis { +-> { levels config } +-> { level adjacencies }"; - oc-ext:openconfig-version "0.6.1"; - - revision "2021-03-17" { - description - "Add bfd support without augmentation."; - reference "0.6.1"; - } + oc-ext:openconfig-version "0.6.0"; revision "2020-03-24" { description @@ -233,6 +226,25 @@ module openconfig-isis { } } + grouping isis-bfd-config { + description + "This grouping defines Bidirectionl-Forwarding-Detection + configuration."; + + //There is also BFD state under adjacency + leaf bfd-tlv { + type boolean; + description + "When set to true, BFD TLV is used. This enables support for the IS-IS + BFD TLV options, which specify that a BFD session must be established + before an IS-IS adjacency can transition to the established state. + This option should be enabled on all IS-IS neighbors on a shared + interface."; + reference "RFC6213. TLV 148"; + } + reference "RFC5880: Bidirectional Forwarding Detection (BFD)."; + } + grouping isis-authentication-check-config { description "This grouping defines ISIS authentication check."; @@ -1302,8 +1314,8 @@ module openconfig-isis { } } - uses oc-bfd:bfd-enable; container bfd { + //TODO(bogdanov): Integrate BFD model/module description "This container defines BFD."; @@ -1324,26 +1336,6 @@ module openconfig-isis { } } - grouping isis-bfd-config { - description - "This grouping defines Bidirectionl-Forwarding-Detection - configuration."; - - //There is also BFD state under adjacency - leaf bfd-tlv { - type boolean; - description - "When set to true, BFD TLV is used. This enables support for the IS-IS - BFD TLV options, which specify that a BFD session must be established - before an IS-IS adjacency can transition to the established state. - This option should be enabled on all IS-IS neighbors on a shared - interface."; - reference "RFC6213. TLV 148"; - } - reference "RFC5880: Bidirectional Forwarding Detection (BFD)."; - } - - grouping isis-levels { description "This grouping defines global ISIS Levels."; diff --git a/models/openconfig/public/release/models/lacp/.spec.yml b/models/openconfig/public/release/models/lacp/.spec.yml deleted file mode 100644 index 5c9d15d8c0216d3c668cbec4e428eaab9aa9c9cc..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/lacp/.spec.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: openconfig-lacp - docs: - - yang/lacp/openconfig-lacp.yang - build: - - yang/lacp/openconfig-lacp.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/lldp/.spec.yml b/models/openconfig/public/release/models/lldp/.spec.yml deleted file mode 100644 index 9cd1a7f3e9a1a506675a83e79be6343b56bfa074..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/lldp/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-lldp - docs: - - yang/lldp/openconfig-lldp.yang - - yang/lldp/openconfig-lldp-types.yang - build: - - yang/lldp/openconfig-lldp.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/local-routing/.spec.yml b/models/openconfig/public/release/models/local-routing/.spec.yml deleted file mode 100644 index 684f3f832ee9015aef24f0a32812ec81e185e8d0..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/local-routing/.spec.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: openconfig-local-routing - docs: - - yang/local-routing/openconfig-local-routing.yang - build: - - yang/local-routing/openconfig-local-routing.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/local-routing/openconfig-local-routing.yang b/models/openconfig/public/release/models/local-routing/openconfig-local-routing.yang index 37a65388140979d513bb46d0e06099ec3cd6fe13..97503cd1a96b4a9ed8ba14607857090e2d256c94 100644 --- a/models/openconfig/public/release/models/local-routing/openconfig-local-routing.yang +++ b/models/openconfig/public/release/models/local-routing/openconfig-local-routing.yang @@ -12,7 +12,6 @@ module openconfig-local-routing { import openconfig-policy-types { prefix oc-pt; } import openconfig-extensions { prefix oc-ext; } import openconfig-interfaces { prefix oc-if; } - import openconfig-bfd { prefix oc-bfd; } // meta organization "OpenConfig working group"; @@ -43,13 +42,7 @@ module openconfig-local-routing { protocol-specific policy after importing the route into the protocol for distribution (again via routing policy)."; - oc-ext:openconfig-version "1.2.0"; - - revision "2020-03-24" { - description - "Add bfd support without augmentation."; - reference "1.2.0"; - } + oc-ext:openconfig-version "1.1.0"; revision "2020-03-24" { description @@ -308,7 +301,6 @@ module openconfig-local-routing { uses local-static-nexthop-state; } - uses oc-bfd:bfd-enable; uses oc-if:interface-ref; } } diff --git a/models/openconfig/public/release/models/macsec/.spec.yml b/models/openconfig/public/release/models/macsec/.spec.yml deleted file mode 100644 index 9bf6cb11156f1b0c03a50ee973f048178402e9c2..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/macsec/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-macsec - docs: - - yang/macsec/openconfig-macsec.yang - - yang/macsec/openconfig-macsec-types.yang - build: - - yang/macsec/openconfig-macsec.yang - run-ci: true diff --git a/models/openconfig/public/release/models/mpls/.spec.yml b/models/openconfig/public/release/models/mpls/.spec.yml deleted file mode 100644 index f771049f96b9d2396a68e95e052c5695a029f1f1..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/mpls/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-mpls - docs: - - yang/mpls/openconfig-mpls-types.yang - - yang/mpls/openconfig-mpls.yang - build: - - yang/mpls/openconfig-mpls.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/mpls/openconfig-mpls-ldp.yang b/models/openconfig/public/release/models/mpls/openconfig-mpls-ldp.yang index 4810fafe88794d0eb2116c5743273b0a74e78384..baa6ed2a812237235890b7723119c2583b3b2f88 100644 --- a/models/openconfig/public/release/models/mpls/openconfig-mpls-ldp.yang +++ b/models/openconfig/public/release/models/mpls/openconfig-mpls-ldp.yang @@ -43,13 +43,7 @@ module openconfig-mpls-ldp { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "3.1.0"; - - revision "2020-01-09" { - description - "Added session-state leaf"; - reference "3.1.0"; - } + oc-ext:openconfig-version "3.0.2"; revision "2019-07-09" { description @@ -258,7 +252,6 @@ module openconfig-mpls-ldp { description "Neighbor state attributes."; uses mpls-ldp-neighbor-config; - uses mpls-ldp-neighbor-state; } container hello-adjacencies { @@ -345,38 +338,6 @@ module openconfig-mpls-ldp { } - grouping mpls-ldp-neighbor-state { - description - "Grouping containing operational attributes for LDP neighbors."; - - leaf session-state { - type enumeration { - enum NON_EXISTENT { - description "LDP session state: NON EXISTENT."; - } - enum INITIALIZED { - description "LDP session state: INITIALIZED."; - } - enum OPENREC { - description "LDP session state: OPENREC."; - } - enum OPENSENT { - description "LDP session state: OPENSENT."; - } - enum OPERATIONAL { - description "LDP session state: OPERATIONAL."; - } - } - description - "Operational status of the LDP session, - based on the state machine for session - negotiation behavior."; - reference - "RFC5036, Sec. 2.5.4."; - } - - } - grouping mpls-ldp-adjacency-state { description diff --git a/models/openconfig/public/release/models/multicast/.spec.yml b/models/openconfig/public/release/models/multicast/.spec.yml deleted file mode 100644 index b9a86d6653701b0c91d12ae3d7352bed67e5c4a4..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/multicast/.spec.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: openconfig-multicast - docs: - - yang/multicast/openconfig-igmp-types.yang - - yang/multicast/openconfig-igmp.yang - - yang/multicast/openconfig-pim-types.yang - - yang/multicast/openconfig-pim.yang - build: - - yang/multicast/openconfig-igmp.yang - - yang/multicast/openconfig-pim.yang - run-ci: true diff --git a/models/openconfig/public/release/models/multicast/openconfig-pim.yang b/models/openconfig/public/release/models/multicast/openconfig-pim.yang index 4b87d00ae3856431c2a720b686f27c69270acb67..f5faffe9f8069677c3699f98b29326333606cad2 100644 --- a/models/openconfig/public/release/models/multicast/openconfig-pim.yang +++ b/models/openconfig/public/release/models/multicast/openconfig-pim.yang @@ -14,7 +14,6 @@ module openconfig-pim { import openconfig-types { prefix "oc-types"; } import openconfig-extensions { prefix "oc-ext"; } import ietf-inet-types { prefix "inet"; } - import openconfig-bfd { prefix "oc-bfd"; } // meta organization @@ -27,30 +26,7 @@ module openconfig-pim { description "An OpenConfig model for Protocol Independent Multicast (PIM)."; - oc-ext:openconfig-version "0.4.1"; - - revision "2021-04-21" { - description - "Reindent to two spaces and remove trailing whitespace "; - reference "0.4.1"; - } - - revision "2021-04-21" { - description - "Allow to limit the maximum number of groups to join - via PIM protocol. It can be configured at two levels, - depending on hardware implementation: - 1. Network-instance level, the limit will apply - to all PIM sessions/joins ending in that network-instance. - 2. Interface level, the limit would be discriminated per interface."; - reference "0.4.0"; - } - - revision "2021-03-17" { - description - "Add bfd support without augmentation."; - reference "0.3.0"; - } + oc-ext:openconfig-version "0.2.0"; revision "2019-07-09" { description @@ -155,6 +131,7 @@ module openconfig-pim { outside of the PIM domain."; } + leaf dr-priority { type oc-pim-types:dr-priority-type; description @@ -183,14 +160,6 @@ module openconfig-pim { "Number of missed hello messages after which a neighbor is expired."; } - - leaf maximum-groups { - type uint32; - description - "Limit the number of (S, G) and (*, G) PIM - entries accepted on the interface. - This feature depends on hardware implementation."; - } } grouping pim-neighbor-state { @@ -319,26 +288,14 @@ module openconfig-pim { uses pim-neighbors-top; uses oc-if:interface-ref; - uses oc-bfd:bfd-enable; } } } - - grouping pim-global-config { - description - "Configuration data for PIM."; - leaf maximum-groups { - type uint32; - description - "Limit the number of accepted (S, G) and (*, G) - PIM join states on the network-instance."; - } - } - grouping pim-global-state { description "State and session data for PIM on each interface."; + leaf neighbor-count { type uint8; description @@ -443,20 +400,6 @@ module openconfig-pim { description "Top level grouping for global PIM configuration."; - container config { - description - "Configuration for global PIM parameters"; - uses pim-global-config; - } - - container state { - config false; - description - "Global PIM state."; - uses pim-global-config; - uses pim-global-state; - } - container ssm { description "Source specific multicast (SSM)."; @@ -504,6 +447,14 @@ module openconfig-pim { } } } + + container state { + config false; + description + "Global PIM state."; + uses pim-global-state; + } + uses pim-sources-joined-top; } diff --git a/models/openconfig/public/release/models/network-instance/.spec.yml b/models/openconfig/public/release/models/network-instance/.spec.yml deleted file mode 100644 index 3c617ec6ddcf8cedbd83a25ca14d81f441471dc9..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/network-instance/.spec.yml +++ /dev/null @@ -1,11 +0,0 @@ -- name: openconfig-network-instance - docs: - - yang/network-instance/openconfig-network-instance-types.yang - - yang/network-instance/openconfig-network-instance.yang - build: - - yang/network-instance/openconfig-network-instance.yang - run-ci: true -- name: openconfig-network-instance-bgp-rib-augment - build: - - yang/network-instance/openconfig-network-instance.yang - - yang/rib/openconfig-rib-bgp-ext.yang diff --git a/models/openconfig/public/release/models/network-instance/openconfig-network-instance-types.yang b/models/openconfig/public/release/models/network-instance/openconfig-network-instance-types.yang index a17fe04826786dd58035441679f2c5c406536f4a..662d7f57671dd1b2370922b16bb389a37799af6d 100644 --- a/models/openconfig/public/release/models/network-instance/openconfig-network-instance-types.yang +++ b/models/openconfig/public/release/models/network-instance/openconfig-network-instance-types.yang @@ -19,14 +19,7 @@ module openconfig-network-instance-types { description "Types associated with a network instance"; - oc-ext:openconfig-version "0.9.0"; - - revision "2021-03-03" { - description - "Fix route-distinguisher's pattern statement, and remove the regexp-posix - extension, which makes pattern statements conform to the YANG standard."; - reference "0.9.0"; - } + oc-ext:openconfig-version "0.8.3"; revision "2020-06-30" { description @@ -113,6 +106,7 @@ module openconfig-network-instance-types { } // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -255,58 +249,41 @@ module openconfig-network-instance-types { typedef route-distinguisher { type union { // type 0: <2-byte administrator>:<4-byte assigned number> - // <0-65535>:<0-4294967295> type string { - pattern - '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|[0-5][0-9]{4}|[1-9][0-9]{0,3}|0):' - + '(429496729[0-5]|42949672[0-8][0-9]|' - + '4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|' - + '42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' - + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|' - + '4[0-1][0-9]{8}|3[0-9]{9}|[1-9][0-9]{0,8}|0)'; - oc-ext:posix-pattern - '^((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|[0-5][0-9]{4}|[1-9][0-9]{0,3}|0):' - + '(429496729[0-5]|42949672[0-8][0-9]|' - + '4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|' - + '42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' - + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|' - + '4[0-1][0-9]{8}|3[0-9]{9}|[1-9][0-9]{0,8}|0))$'; + pattern '^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|' + + '[1-9]?[1-9]?[0-9][0-9]|[1-9]):' + + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|' + + '[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$'; + oc-ext:posix-pattern '^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|' + + '[1-9]?[1-9]?[0-9][0-9]|[1-9]):' + + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|' + + '[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$'; } // type 1: <ip-address>:<2-byte assigned number> - // <ipv4>:<0-65535> type string { pattern - '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|[0-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + + '(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|' + + '[1-9]?[1-9]?[0-9][0-9]|[1-9])$'; oc-ext:posix-pattern - '^((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|[0-5][0-9]{4}|[1-9][0-9]{0,3}|0))$'; + + '(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|' + + '[1-9]?[1-9]?[0-9][0-9]|[1-9])$'; } // type 2: <4-byte as-number>:<2-byte assigned number> - // <0-4294967295>:<0-65535> type string { pattern - '(429496729[0-5]|42949672[0-8][0-9]|' - + '4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|' - + '42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' - + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|' - + '4[0-1][0-9]{8}|3[0-9]{9}|[1-9][0-9]{0,8}|0):' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|[0-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + '^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|' + + '[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):' + + '(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|' + + '[1-9]{0,2}[0-9][0-9]|[1-9])$'; oc-ext:posix-pattern - '^((429496729[0-5]|42949672[0-8][0-9]|' - + '4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|' - + '42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' - + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|' - + '4[0-1][0-9]{8}|3[0-9]{9}|[1-9][0-9]{0,8}|0):' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|[0-5][0-9]{4}|[1-9][0-9]{0,3}|0))$'; + '^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|' + + '[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):' + + '(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|' + + '[1-9]{0,2}[0-9][0-9]|[1-9])$'; } } description "A route distinguisher value"; diff --git a/models/openconfig/public/release/models/openflow/.spec.yml b/models/openconfig/public/release/models/openflow/.spec.yml deleted file mode 100644 index 69883b60ebc8bb83e8a2a2d2c4387deff68a063e..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/openflow/.spec.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: openconfig-openflow - docs: - - yang/openflow/openconfig-openflow-types.yang - - yang/system/openconfig-system.yang - - yang/openflow/openconfig-openflow.yang - build: - - yang/system/openconfig-system.yang - - yang/openflow/openconfig-openflow.yang - run-ci: true diff --git a/models/openconfig/public/release/models/optical-transport/.spec.yml b/models/openconfig/public/release/models/optical-transport/.spec.yml deleted file mode 100644 index 672c664a92fdc18e70519742e25d72ae064a9992..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/optical-transport/.spec.yml +++ /dev/null @@ -1,50 +0,0 @@ -- name: openconfig-terminal-device - docs: - - yang/optical-transport/openconfig-transport-types.yang - - yang/platform/openconfig-platform-types.yang - - yang/optical-transport/openconfig-terminal-device.yang - - yang/platform/openconfig-platform-transceiver.yang - build: - - yang/optical-transport/openconfig-terminal-device.yang - - yang/platform/openconfig-platform.yang - run-ci: true -- name: openconfig-optical-amplifier - docs: - - yang/optical-transport/openconfig-transport-types.yang - - yang/platform/openconfig-platform-types.yang - - yang/optical-transport/openconfig-transport-line-common.yang - - yang/optical-transport/openconfig-optical-amplifier.yang - - yang/optical-transport/openconfig-channel-monitor.yang - - yang/platform/openconfig-platform.yang - build: - - yang/optical-transport/openconfig-optical-amplifier.yang - run-ci: true -- name: openconfig-wavelength-router - docs: - - yang/optical-transport/openconfig-transport-types.yang - - yang/optical-transport/openconfig-transport-line-common.yang - - yang/optical-transport/openconfig-wavelength-router.yang - - yang/optical-transport/openconfig-channel-monitor.yang - - yang/optical-transport/openconfig-transport-line-connectivity.yang - build: - - yang/optical-transport/openconfig-transport-line-connectivity.yang - - yang/optical-transport/openconfig-wavelength-router.yang - run-ci: true -- name: openconfig-transport-line-protection - docs: - - yang/platform/openconfig-platform-types.yang - - yang/optical-transport/openconfig-transport-line-protection.yang - - yang/platform/openconfig-platform.yang - build: - - yang/optical-transport/openconfig-transport-line-protection.yang - run-ci: true -- name: openconfig-optical-attenuator - docs: - - yang/optical-transport/openconfig-optical-attenuator.yang - build: - - yang/optical-transport/openconfig-optical-attenuator.yang - run-ci: true -- name: openconfig-channel-monitor - build: - - yang/optical-transport/openconfig-channel-monitor.yang - run-ci: true diff --git a/models/openconfig/public/release/models/optical-transport/openconfig-terminal-device.yang b/models/openconfig/public/release/models/optical-transport/openconfig-terminal-device.yang index 4c77457eff5a79e5770fa79d568ab4696af2cd68..ee873b841f3e1bde1ae04b6dfb2102632b6ac9e7 100644 --- a/models/openconfig/public/release/models/optical-transport/openconfig-terminal-device.yang +++ b/models/openconfig/public/release/models/optical-transport/openconfig-terminal-device.yang @@ -10,7 +10,6 @@ module openconfig-terminal-device { import openconfig-types { prefix oc-types; } import openconfig-transport-types { prefix oc-opt-types; } import openconfig-if-ethernet { prefix oc-eth; } - import openconfig-interfaces { prefix oc-if; } import openconfig-platform { prefix oc-platform; } import openconfig-platform-transceiver { prefix oc-transceiver; } import openconfig-lldp { prefix oc-lldp; } @@ -77,14 +76,7 @@ module openconfig-terminal-device { ports per linecard, separate linecards for client and line ports, etc.)."; - oc-ext:openconfig-version "1.8.0"; - - revision "2021-02-23" { - description - "Small additions to support ZR transceivers. Adds a new - ingress type of interface and a client mapping mode leaf."; - reference "1.8.0"; - } + oc-ext:openconfig-version "1.7.3"; revision "2020-05-09" { description @@ -988,17 +980,6 @@ module openconfig-terminal-device { all physical channels in the transceiver are assumed to be mapped to the logical channel."; } - - leaf interface { - type oc-if:base-interface-ref; - description - "Reference to the interface carrying the input signal - for the logical channel. The ingress will specify an interface - in the case of a transceiver being utilized directly in a - router and bypassing a dedicated terminal device. When - specified, the other leaves in the ingress config must be - empty."; - } } grouping terminal-logical-channel-ingress-state { @@ -1014,7 +995,7 @@ module openconfig-terminal-device { description "Top-level container for specifying references to the source of signal for the logical channel, either a - transceiver, individual physical channels, or an interface"; + transceiver or individual physical channels"; container config { description @@ -1128,23 +1109,6 @@ module openconfig-terminal-device { "When enabled the logical channel's DSP will generate a pseudo randmon bit stream (PRBS) which can be used during testing."; } - - leaf client-mapping-mode { - type identityref { - base oc-opt-types:CLIENT_MAPPING_MODE; - } - description - "The client side mapping mode internal to the device that - specifies the number of client electrical interfaces and - the data rate of each client electrical interface. For - example, a ZR+ transceiver with an optical line rate of 400G - could be configured to break out into four 100G client - signals which might connect to an interface or a - physical-channel. This would be configured on the aggregate - logical channel as MODE_4X100G. This is only valid on the - aggregate logical channel that is connected directly to the - optical-channel."; - } } diff --git a/models/openconfig/public/release/models/optical-transport/openconfig-transport-types.yang b/models/openconfig/public/release/models/optical-transport/openconfig-transport-types.yang index 549d50a26fe62e1215e86a9da9de0bb9cccb638a..04b92e58ca9b21285b2f39bd13163e3892b54529 100644 --- a/models/openconfig/public/release/models/optical-transport/openconfig-transport-types.yang +++ b/models/openconfig/public/release/models/optical-transport/openconfig-transport-types.yang @@ -22,19 +22,7 @@ module openconfig-transport-types { "This module contains general type definitions and identities for optical transport models."; - oc-ext:openconfig-version "0.14.0"; - - revision "2021-03-22" { - description - "Add client mapping mode identityref."; - reference "0.14.0"; - } - - revision "2021-02-26" { - description - "Additional PMD types, form factors, and protocol types."; - reference "0.13.0"; - } + oc-ext:openconfig-version "0.12.0"; revision "2020-08-12" { description @@ -563,21 +551,6 @@ module openconfig-transport-types { description "400G Ethernet protocol"; } - identity PROT_OTSIG { - base TRIBUTARY_PROTOCOL_TYPE; - description "Optical tributary signal group protocol"; - } - - identity PROT_ODUFLEX_CBR { - base TRIBUTARY_PROTOCOL_TYPE; - description "ODU Flex with CBR protocol"; - } - - identity PROT_ODUFLEX_GFP { - base TRIBUTARY_PROTOCOL_TYPE; - description "ODU Flex with GFP protocol"; - } - identity TRANSCEIVER_FORM_FACTOR_TYPE { description "Base identity for identifying the type of pluggable optic @@ -634,21 +607,6 @@ module openconfig-transport-types { channels"; } - identity QSFP56_DD_TYPE1 { - base TRANSCEIVER_FORM_FACTOR_TYPE; - description - "QSFP DD pluggable optic with support for up to 8x56G physical - channels. Type 1 uses eight optical and electrical signals."; - } - - identity QSFP56_DD_TYPE2 { - base TRANSCEIVER_FORM_FACTOR_TYPE; - description - "QSFP DD pluggable optic with support for up to 4x112G physical - channels. Type 2 uses four optical and eight electrical - signals."; - } - identity CPAK { base TRANSCEIVER_FORM_FACTOR_TYPE; description @@ -683,13 +641,6 @@ module openconfig-transport-types { 10 GbE using a XAUI inerface and 4 data channels."; } - identity OSFP { - base TRANSCEIVER_FORM_FACTOR_TYPE; - description - "Octal small form factor pluggable transceiver supporting - 400 Gb/s."; - } - identity NON_PLUGGABLE { base TRANSCEIVER_FORM_FACTOR_TYPE; description @@ -854,36 +805,6 @@ module openconfig-transport-types { description "Ethernet compliance code: 100GBASE_CR4"; } - identity ETH_100GBASE_FR { - base ETHERNET_PMD_TYPE; - description "Ethernet compliance code: 100GBASE_FR"; - } - - identity ETH_400GBASE_ZR { - base ETHERNET_PMD_TYPE; - description "Ethernet compliance code: 400GBASE_ZR"; - } - - identity ETH_400GBASE_LR4 { - base ETHERNET_PMD_TYPE; - description "Ethernet compliance code: 400GBASE_LR4"; - } - - identity ETH_400GBASE_FR4 { - base ETHERNET_PMD_TYPE; - description "Ethernet compliance code: 400GBASE_FR4"; - } - - identity ETH_400GBASE_LR8 { - base ETHERNET_PMD_TYPE; - description "Ethernet compliance code: 400GBASE_LR8"; - } - - identity ETH_400GBASE_DR4 { - base ETHERNET_PMD_TYPE; - description "Ethernet compliance code: 400GBASE_DR4"; - } - identity ETH_UNDEFINED { base ETHERNET_PMD_TYPE; description "Ethernet compliance code: undefined"; @@ -1266,70 +1187,4 @@ module openconfig-transport-types { transponder or muxponder)."; } - identity CLIENT_MAPPING_MODE { - description - "Type definition for optical transport client mapping modes."; - } - - identity MODE_1X100G { - base CLIENT_MAPPING_MODE; - description - "1 x 100G client mapping mode."; - } - - identity MODE_1X200G { - base CLIENT_MAPPING_MODE; - description - "1 x 200G client mapping mode."; - } - - identity MODE_1X400G { - base CLIENT_MAPPING_MODE; - description - "1 x 400G client mapping mode."; - } - - identity MODE_2X100G { - base CLIENT_MAPPING_MODE; - description - "2 x 100G client mapping mode."; - } - - identity MODE_2X200G { - base CLIENT_MAPPING_MODE; - description - "2 x 200G client mapping mode."; - } - - identity MODE_3X100G { - base CLIENT_MAPPING_MODE; - description - "3 x 100G client mapping mode."; - } - - identity MODE_4X100G { - base CLIENT_MAPPING_MODE; - description - "4 x 100G client mapping mode."; - } - - identity TRANSCEIVER_MODULE_FUNCTIONAL_TYPE { - description - "Type definition for transceiver module functional types."; - } - - identity TYPE_STANDARD_OPTIC { - base TRANSCEIVER_MODULE_FUNCTIONAL_TYPE; - description - "Standard optic using a grey wavelength (i.e. 1310, 1550, etc.) - and on-off-keying (OOK) modulation."; - } - - identity TYPE_DIGITAL_COHERENT_OPTIC { - base TRANSCEIVER_MODULE_FUNCTIONAL_TYPE; - description - "Digital coherent module which transmits a phase / amplitude - modulated signal and uses a digital signal processor to receive - and decode the received signal."; - } } diff --git a/models/openconfig/public/release/models/optical-transport/openconfig-wavelength-router.yang b/models/openconfig/public/release/models/optical-transport/openconfig-wavelength-router.yang index 8cca516117c2b32708e9305f3a4216d695097ee2..fb090382eff716b2908fe40857f61b86f514a193 100644 --- a/models/openconfig/public/release/models/optical-transport/openconfig-wavelength-router.yang +++ b/models/openconfig/public/release/models/optical-transport/openconfig-wavelength-router.yang @@ -41,13 +41,7 @@ module openconfig-wavelength-router { target spectrum power profile over the full spectrum instead of individual media channels."; - oc-ext:openconfig-version "1.0.0"; - - revision "2020-08-28" { - description - "Add ase-injection-delta-threshold leaf."; - reference "1.0.0"; - } + oc-ext:openconfig-version "0.8.0"; revision "2020-06-03" { description @@ -487,53 +481,20 @@ module openconfig-wavelength-router { } description "Sets the ASE control mode for the media channel. - The control mode defines if and when ASE noise is injected - on the media channel"; - } - - leaf ase-injection-mode { - type enumeration { - enum MODE_THRESHOLD { - description - "When set ASE noise will be injected when a defined - threshold is crossed."; - } - enum MODE_DELTA { - description - "When set ASE noise will be injected when a defined - delta in optical power occurs."; - } - } - description - "When specified, defines the mode used to determine whether - ASE noise should be injected on the media channel."; + The control mode defines the behavior of when and if + ASE noise is injected on the media channel"; } leaf ase-injection-threshold { type decimal64 { fraction-digits 2; } - when "../ase-injection-mode = 'MODE_THRESHOLD'"; units dBm; description - "Defines the optical power threshold value below which ASE - noise should be injected on the media channel. This or - ase-injection-delta is required if an ase-control-mode is - configured"; - } - - leaf ase-injection-delta { - type decimal64 { - fraction-digits 2; - } - when "../ase-injection-mode = 'MODE_DELTA'"; - units dB; - description - "Defines the optical power loss from the configured spectrum - power profile, which would indicate that ASE noise should be - injected on the media channel. This or - ase-injection-threshold is required if an ase-control-mode - is configured"; + "Defines the optical power threshold value which would + indicate that ASE noise should be injected on the media + channel. This is required if a threshold based + ase-control-mode is configured"; } leaf attenuation-control-mode { diff --git a/models/openconfig/public/release/models/ospf/.spec.yml b/models/openconfig/public/release/models/ospf/.spec.yml deleted file mode 100644 index 6501eb8f32d4d4a85de1042db67f9de9e12e41a7..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/ospf/.spec.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: openconfig-ospf - docs: - - yang/ospf/openconfig-ospf-types.yang - - yang/ospf/openconfig-ospfv2.yang - build: - - yang/network-instance/openconfig-network-instance.yang - - yang/policy/openconfig-routing-policy.yang - - yang/ospf/openconfig-ospf-policy.yang - run-ci: true diff --git a/models/openconfig/public/release/models/ospf/openconfig-ospfv2-area-interface.yang b/models/openconfig/public/release/models/ospf/openconfig-ospfv2-area-interface.yang index fc0975a5d0f4015f11cdd23bc3cbbaf07f0b4e63..840b609c357cd335d3636c9dde1cbd3a4853a739 100644 --- a/models/openconfig/public/release/models/ospf/openconfig-ospfv2-area-interface.yang +++ b/models/openconfig/public/release/models/ospf/openconfig-ospfv2-area-interface.yang @@ -9,7 +9,6 @@ submodule openconfig-ospfv2-area-interface { import openconfig-types { prefix "oc-types"; } import openconfig-interfaces { prefix "oc-if"; } import openconfig-ospf-types { prefix "oc-ospf-types"; } - import openconfig-bfd { prefix "oc-bfd"; } // include common submodule include openconfig-ospfv2-common; @@ -25,13 +24,7 @@ submodule openconfig-ospfv2-area-interface { "This submodule provides OSPFv2 configuration and operational state parameters that are specific to the area context"; - oc-ext:openconfig-version "0.3.0"; - - revision "2021-03-17" { - description - "Add bfd support without augmentation."; - reference "0.3.0"; - } + oc-ext:openconfig-version "0.2.2"; revision "2019-11-28" { description @@ -490,7 +483,6 @@ submodule openconfig-ospfv2-area-interface { } } - uses oc-bfd:bfd-enable; } } } diff --git a/models/openconfig/public/release/models/ospf/openconfig-ospfv2.yang b/models/openconfig/public/release/models/ospf/openconfig-ospfv2.yang index e760e9958eb8dc2f85bab1f11ed0a30211aa0b8a..b9bac251d53f2057a65d0e40c75ff33db67105e1 100644 --- a/models/openconfig/public/release/models/ospf/openconfig-ospfv2.yang +++ b/models/openconfig/public/release/models/ospf/openconfig-ospfv2.yang @@ -34,13 +34,7 @@ module openconfig-ospfv2 { "An OpenConfig model for Open Shortest Path First (OSPF) version 2"; - oc-ext:openconfig-version "0.2.3"; - - revision "2021-03-17" { - description - "Add bfd support without augmentation."; - reference "0.2.3"; - } + oc-ext:openconfig-version "0.2.2"; revision "2019-11-28" { description diff --git a/models/openconfig/public/release/models/p4rt/.spec.yml b/models/openconfig/public/release/models/p4rt/.spec.yml deleted file mode 100644 index 280acf14e51a416707758f2ee346698ccf7d905c..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/p4rt/.spec.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: openconfig-p4rt - docs: - - yang/p4rt/openconfig-p4rt.yang - - yang/interfaces/openconfig-interfaces.yang - - yang/platform/openconfig-platform.yang - build: - - yang/p4rt/openconfig-p4rt.yang - - yang/interfaces/openconfig-interfaces.yang - - yang/platform/openconfig-platform.yang - run-ci: true diff --git a/models/openconfig/public/release/models/p4rt/openconfig-p4rt.yang b/models/openconfig/public/release/models/p4rt/openconfig-p4rt.yang deleted file mode 100644 index 369ce967d8c1dd70d78d9c2fd348629831630039..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/p4rt/openconfig-p4rt.yang +++ /dev/null @@ -1,107 +0,0 @@ -module openconfig-p4rt { - yang-version "1"; - - prefix "oc-p4rt"; - - namespace "http://openconfig.net/yang/p4rt"; - - import openconfig-extensions { prefix oc-ext; } - import openconfig-interfaces { prefix oc-if; } - import openconfig-platform { prefix oc-platform; } - - organization - "OpenConfig Working Group"; - - contact - "www.openconfig.net"; - - description - "This module defines a set of extensions that provide P4Runtime (P4RT) - specific extensions to the OpenConfig data models. Specifically, these - parameters for configuration and state provide extensions that control - the P4RT service, or allow it to be used alongside other OpenConfig - data models. - - The P4RT protocol specification is linkde from https://p4.org/specs/ - under the P4Runtime heading."; - - oc-ext:openconfig-version "0.1.0"; - - revision 2021-04-06 { - description - "Initial revision."; - reference "0.1.0"; - } - - grouping p4rt-interface-config { - description - "Interface-specific configuration that is applicable to devices that - are running the P4RT service."; - - leaf id { - type uint32; - description - "The numeric identifier used by the controller to address the interface. - This ID is assigned by an external-to-the-device entity (e.g., an SDN - management system) to establish an externally deterministic numeric - reference for the interface. The programming entity must ensure that - the ID is unique within the required context. - - Note that this identifier is used only when a numeric reference to the - interface is required, it does not replace the unique name assigned to - the interface."; - } - } - - augment "/oc-if:interfaces/oc-if:interface/oc-if:config" { - description - "Add interface-specific intended configuration for P4RT."; - - uses p4rt-interface-config; - } - - augment "/oc-if:interfaces/oc-if:interface/oc-if:state" { - description - "Add interface-specific applied configuration for P4RT."; - - uses p4rt-interface-config; - } - - grouping p4rt-ic-config { - description - "Integrated-circuit specific configuration that is applicable to devices - that are running the P4RT service."; - - leaf node-id { - type uint64; - description - "The numeric ID used by the controller to address the integrated circuit, - which may be referred to as a 'device', 'node' or 'target' by the P4RT - specification. - - Each switching ASIC (i.e., node) is addressed by the external entity - based on its numeric identifier. - - The node ID is specified in addition to the string identifier assigned to - the integrated circuit within the /components/component list."; - } - } - - augment "/oc-platform:components/oc-platform:component/" + - "oc-platform:integrated-circuit/oc-platform:config" { - description - "Add integrated circuit specific intended configuration that is required - for P4RT."; - - uses p4rt-ic-config; - } - - augment "/oc-platform:components/oc-platform:component/" + - "oc-platform:integrated-circuit/oc-platform:state" { - description - "Add integrated circuit specific operational state that is required - for P4RT."; - - uses p4rt-ic-config; - } -} diff --git a/models/openconfig/public/release/models/platform/.spec.yml b/models/openconfig/public/release/models/platform/.spec.yml deleted file mode 100644 index 510b042d20ec183556ea229ed906d6dc92a59826..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/platform/.spec.yml +++ /dev/null @@ -1,25 +0,0 @@ -- name: openconfig-platform - docs: - - yang/platform/openconfig-platform.yang - - yang/platform/openconfig-platform-types.yang - - yang/platform/openconfig-platform-transceiver.yang - - yang/platform/openconfig-platform-linecard.yang - - yang/platform/openconfig-platform-port.yang - - yang/platform/openconfig-platform-psu.yang - - yang/platform/openconfig-platform-fan.yang - - yang/platform/openconfig-platform-cpu.yang - - yang/platform/openconfig-platform-ext.yang - - yang/platform/openconfig-platform-software.yang - - yang/platform/openconfig-platform-pipeline-counters.yang - build: - - yang/platform/openconfig-platform.yang - - yang/platform/openconfig-platform-transceiver.yang - - yang/platform/openconfig-platform-linecard.yang - - yang/platform/openconfig-platform-port.yang - - yang/platform/openconfig-platform-psu.yang - - yang/platform/openconfig-platform-fan.yang - - yang/platform/openconfig-platform-ext.yang - - yang/platform/openconfig-platform-cpu.yang - - yang/platform/openconfig-platform-software.yang - - yang/platform/openconfig-platform-pipeline-counters.yang - run-ci: true diff --git a/models/openconfig/public/release/models/platform/openconfig-platform-pipeline-counters.yang b/models/openconfig/public/release/models/platform/openconfig-platform-pipeline-counters.yang deleted file mode 100644 index d9c7e41890605e8338951dd4dd9b3bdadb98bec7..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/platform/openconfig-platform-pipeline-counters.yang +++ /dev/null @@ -1,959 +0,0 @@ -module openconfig-platform-pipeline-counters { - - yang-version "1"; - - namespace "http://openconfig.net/yang/platform-pipeline-counters"; - prefix "oc-ppc"; - - import openconfig-yang-types { prefix oc-yang; } - import openconfig-types { prefix oc-types; } - import openconfig-extensions { prefix oc-ext; } - import openconfig-platform { prefix oc-platform; } - - organization - "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "Provide fine grain, per-Integrated Circuit (IC), telemetry data streams - that will identify the health, any packet drops, and any errors on the IC. - With this additional telemetry, the health of the IC, packet drops and - errors, can be explicitly monitored not only on a specific router, but also - on a specific IC on a specific router. The IC is divided into 5 platform - independent sub-blocks. - 1. IC Interface Subsystem - 2. Queueing Subsystem - 3. Lookup Subsystem - 4. Host Interface - 5. Fabric Interface. - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - | | - | +---------------------------------------------------------------+ | - | | Integrated +---------------------------------------+ | | - | | Circuit | Host Interface | | | - | | +---------------------------------------+ | | - | | +------------+ | | - | | +-----------+ | Lookup | +-------------+ | | - | | | IC | | Subsystem | | Fabric | | | - | | | Interface | | | | Interface | | | - | | | Subsystem | +------------+ | | | | - | | +-----------+ +-------------+ +-------------+ | | - | | | Queueing | | | - | | | Subsystem | | | - | | +-------------+ | | - | | | | - | +---------------------------------------------------------------+ | - | | - +-------------------------------------------------------------------+ - Each IC implementation inside forwarding engines may have a different set of - counters. Some counters have different names but the same - functionality and can be grouped together. Most counters are different - between IC families and will have to be aggregated as generic counters. The - aggregation could mean either a specific IC counter needs to be mapped to - one of the values specified in this model, or it may require multiple IC - counters aggregated to produce one of the values in this model. - The following classes of counters will generalize the types of - statistics that are provided from each of the above 5 blocks. - A. Packet Counters - B. Drop Counters - C. Error Counters - The advantage of grouping all the packet counters for all 5 blocks, - all drop counters from all 5 blocks, and all error counters from all - 5 blocks, is to have the abililty to receive all drop counters from - all 5 blocks, for example, with one request."; - - oc-ext:openconfig-version "0.1.0"; - oc-ext:catalog-organization "openconfig"; - oc-ext:origin "openconfig"; - - revision "2020-07-31" { - description - "Initial revision of platform pipeline counters."; - reference "0.1.0"; - } - - grouping platform-pipeline-top { - description - "Top-level structural grouping for platform pipeline - counters."; - - container pipeline-counters { - description - "Top-level container for the packet, drop, and error counters for the - five NPU sub-blocks."; - config false; - container packet { - description - "IC packet counters for all five NPU sub-blocks."; - container interface-block { - description - "The IC interface subsystem connects the IC to the external PHY or - MAC."; - - // We do not need a 'config' container here since there is no configurable state for a particular - // entity. - - container state { - description - "State and counters corresponding to the interface subsystem of - the IC."; - - uses pipeline-counters-packet-interface-block-state; - } - } - - container lookup-block { - description - "The IC lookup subsystem perform the next hop lookup of the packet - and other forwarding features such as firewall filters."; - - container state { - description - "State and counters corresponding to the lookup subsystem of the - IC."; - - uses pipeline-counters-packet-lookup-block-state; - } - } - - container queueing-block { - description - "The IC queueing subsystem buffers the packet while processing it - and queues the packet for delivery to the next stage"; - - container state { - description - "State and counters corresponding to the queueing subsystem of - the IC."; - - uses pipeline-counters-packet-queueing-block-state; - } - } - - container fabric-block { - description - "The IC fabric block subsystem connects the IC to the external - systems fabric subsystem"; - - container state { - description - "State and counters corresponding to the fabric subsystem of the - IC."; - - uses pipeline-counters-packet-fabric-block-state; - } - } - - container host-interface-block { - description - "The IC host interface block subsystem connects the IC to the - external systems host or control subsystem"; - - container state { - description - "State and counters corresponding to the host interface subsystem - of the IC."; - - uses pipeline-counters-packet-host-interface-block-state; - } - } - } - - container drop { - description - "IC drop counters for all five NPU sub-blocks."; - container interface-block { - description - "The IC interface subsystem connects the IC to the external PHY or - MAC."; - - // We do not need a 'config' container here since there is no configurable state for a particular - // entity. - - container state { - description - "Drop counters corresponding to the interface subsystem of the - IC."; - - uses pipeline-drop-packet-interface-block-state; - } - } - - container lookup-block { - description - "The IC lookup subsystem perform the next hop lookup of the packet - and other forwarding features such as firewall filters."; - - container state { - description - "Drop counters corresponding to the lookup subsystem of the IC."; - - uses pipeline-drop-packet-lookup-block-state; - } - } - - container queueing-block { - description - "The IC queueing subsystem buffers the packet while processing it - and queues the packet for delivery to the next stage"; - - container state { - description - "Drop counters corresponding to the queueing subsystem of the - IC."; - - uses pipeline-drop-packet-queueing-block-state; - } - } - - container fabric-block { - description - "The IC fabric block subsystem connects the IC to the external - systems fabric subsystem"; - - container state { - description - "Drop counters corresponding to the fabric subsystem of the IC."; - - uses pipeline-drop-packet-fabric-block-state; - } - } - - container host-interface-block { - description - "The IC host interface block subsystem connects the IC to the - external systems host or control subsystem"; - - container state { - description - "Drop counters corresponding to the host interface subsystem of - the IC."; - - uses pipeline-drop-packet-host-interface-block-state; - } - } - } - - container errors { - description - "IC errors for all five NPU sub-blocks."; - container interface-block { - description - "The IC interface subsystem connects the IC to the external PHY or - MAC."; - - // We do not need a 'config' container here since there is no configurable state for a particular - // entity. - - container state { - description - "Errors corresponding to the interface subsystem of the IC."; - - uses pipeline-errors-packet-interface-block-state; - } - } - - container lookup-block { - description - "The IC lookup subsystem perform the next hop lookup of the packet - and other forwarding features such as firewall filters."; - - container state { - description - "Errors corresponding to the lookup subsystem of the IC."; - - uses pipeline-errors-packet-lookup-block-state; - } - } - - container queueing-block { - description - "The IC queueing subsystem buffers the packet while processing it - and queues the packet for delivery to the next stage"; - - container state { - description - "Errors corresponding to the queueing subsystem of the IC."; - - uses pipeline-errors-packet-queueing-block-state; - } - } - - container fabric-block { - description - "The IC fabric block subsystem connects the IC to the external - systems fabric subsystem"; - - container state { - description - "Errors corresponding to the fabric subsystem of the IC."; - - uses pipeline-errors-packet-fabric-block-state; - } - } - - container host-interface-block { - description - "The IC host interface block subsystem connects the IC to the - external systems host or control subsystem"; - - container state { - description - "Errors corresponding to the host interface subsystem of the IC."; - - uses pipeline-errors-packet-host-interface-block-state; - } - } - } - } - } - - grouping pipeline-packets-common { - description - "A common set of packet counters that apply to multiple packet sections."; - - leaf in-packets { - type oc-yang:counter64; - description - "Incoming packets towards the integrated-circuit interface - subsystem block from the line interfaces or fabric."; - } - - leaf out-packets { - type oc-yang:counter64; - description - "Outgoing packets towards the line interfaces or fabric from the - integrated-circuit interface subsystem block."; - } - - leaf in-bytes { - type oc-yang:counter64; - description - "Incoming bytes towards the integrated-circuit interface - subsystem block from the line interfaces or fabric."; - } - - leaf out-bytes { - type oc-yang:counter64; - description - "Outgoing bytes towards the line interfaces or fabric from the - integrated-circuit interface subsystem block."; - } - - } - - grouping pipeline-counters-common-high-low-packets { - description - "A common set of high and low priority packet counters that apply to - multiple packet sections."; - - leaf in-high-priority-packets { - type oc-yang:counter64; - description - "Incoming high priority packets towards the integrated-circuit - fabric subsystem block from the previous NPU sub block."; - } - - leaf out-high-priority-packets { - type oc-yang:counter64; - description - "Outgoing high priority packets towards the fabric from the - integrated-circuit fabric subsystem block."; - } - - leaf in-low-priority-packets { - type oc-yang:counter64; - description - "Incoming low priority packets towards the integrated-circuit fabric - subsystem block from the previous NPU sub block."; - } - - leaf out-low-priority-packets { - type oc-yang:counter64; - description - "Outgoing low priority packets towards the fabric from the - integrated-circuit fabric subsystem block."; - } - - } - - grouping pipeline-counters-packet-interface-block-state { - description - "Each counter will aggregate incoming and outgoing packets and bytes - that connect the IC to the external MAC or PHY."; - - uses pipeline-packets-common; - - } - - grouping pipeline-counters-packet-lookup-block-state { - description - "The IC lookup subsystem counters include total packets/bytes in/out of - the lookup subsystem and performance metrics for key functionality of this - subsystem such as lookup memory usage, nexthop memory usage, ACL, - and firewall usage"; - - leaf lookup-utilization { - type oc-types:percentage; - description - "The integrated-circuit lookup subsystem block utilization percentage."; - } - - uses pipeline-packets-common; - - leaf lookup-memory { - type uint64; - units bytes; - description - "The total amount of memory available in the lookup subsystem."; - } - - leaf lookup-memory-used { - type uint64; - units bytes; - description - "The amount of memory used in the lookup subsystem."; - } - - leaf nexthop-memory { - type uint64; - units bytes; - description - "The total amount of nexthop memory available in the lookup subsystem."; - } - - leaf nexthop-memory-used { - type uint64; - units bytes; - description - "The amount of nexthops memory used in the lookup subsystem."; - } - - leaf acl-memory-total-entries { - type uint64; - description - "Total firewall or ACL memory counter measured in entries."; - } - - leaf acl-memory-used-entries { - type uint64; - description - "Amount of used firewall or ACL memory counter measured in entries. - The number of used entries must include the entries - that are 'allocated but free' if the memory reaping algorithm makes - these entries practically unusable"; - } - - leaf acl-memory-total-bytes { - type uint64; - units bytes; - description - "Total firewall or ACL memory counter measured in bytes."; - } - - leaf acl-memory-used-bytes { - type uint64; - units bytes; - description - "Amount of used firewall or ACL memory counter measured in bytes. - The number of used bytes must include the bytes - that are 'allocated but free' if the memory reaping algorithm makes - these bytes practically unusable"; - } - - leaf fragment-total-pkts { - type oc-yang:counter64; - description - "Total number of fragments generated by the CPU."; - } - - } - - grouping pipeline-counters-packet-queueing-block-state { - description - "The IC queueing subsystem counters include packets/bytes in/out of the - queueing subsystem and performance metrics for key functionality of this - subsystem such as memory used and loopback counts."; - - uses pipeline-packets-common; - - leaf queue-memory { - type uint64; - units bytes; - description - "The total amount of memory available in the queue subsystem."; - } - - leaf queue-memory-used { - type uint64; - units bytes; - description - "The amount of memory used in the queue subsystem."; - } - - leaf loopback-packets { - type oc-yang:counter64; - description - "The number of packets in the loopback or re-circulate subsystem."; - } - - leaf loopback-bytes { - type uint64; - units bytes; - description - "The number of bytes in the loopback or re-circulate subsystem."; - } - - } - - grouping pipeline-counters-packet-fabric-block-state { - description - "The IC fabric subsystem counters include packets/cells in/out of the - fabric subsystem and performance metrics for key functionality of this - subsystem such as high and low priority packet counts."; - - leaf in-cells { - type oc-yang:counter64; - description - "Incoming cells towards the integrated-circuit fabric - subsystem block from the previous NPU sub block."; - } - - leaf out-cells { - type oc-yang:counter64; - description - "Outgoing cells towards the fabric from the - integrated-circuit fabric subsystem block."; - } - - uses pipeline-packets-common; - - leaf in-high-priority-cells { - type oc-yang:counter64; - description - "Incoming high priority cells towards the integrated-circuit fabric - subsystem block from the previous NPU sub block."; - } - - leaf out-high-priority-cells { - type oc-yang:counter64; - description - "Outgoing high priority cells towards the fabric from the - integrated-circuit fabric subsystem block."; - } - - leaf in-low-priority-cells { - type oc-yang:counter64; - description - "Incoming low priority cells towards the integrated-circuit fabric - subsystem block from the previous NPU sub block."; - } - - leaf out-low-priority-cells { - type oc-yang:counter64; - description - "Outgoing low priority cells towards the fabric from the - integrated-circuit fabric subsystem block."; - } - - uses pipeline-counters-common-high-low-packets; - - } - - grouping pipeline-counters-packet-host-interface-block-state { - description - "The IC host interface counters include packets/bytes in/out of the - host interface subsystem and performance metrics for key functionality - of this subsystem such as fragmented packet counts and hi/low priority - packet counts"; - - uses pipeline-packets-common; - - leaf fragment-punt-pkts{ - type oc-yang:counter64; - description - "The packets that were successfully punted to CPU due to egress MTU - exceeded."; - } - - uses pipeline-counters-common-high-low-packets; - - } - - grouping pipeline-drops-common { - description - "A common set of drop counters that apply to multiple drop sections."; - - leaf oversubscription { - type oc-yang:counter64; - description - "Number of packets dropped due to oversubscription of the - integrated-circuit subsystem block."; - } - } - - grouping pipeline-drops-common-high-low { - description - "A common set of drop counters for high and low priority."; - - leaf in-high-priority { - type oc-yang:counter64; - description - "Incoming high priority drops towards this integrated-circuit - subsystem block from the previous NPU sub-block or interface."; - } - - leaf out-high-priority { - type oc-yang:counter64; - description - "Outgoing high priority drops towards the fabric/interface from this - integrated-circuit subsystem block."; - } - - leaf in-low-priority { - type oc-yang:counter64; - description - "Incoming low priority drops towards this integrated-circuit - subsystem block from the previous NPU sub-block or interface."; - } - - leaf out-low-priority { - type oc-yang:counter64; - description - "Outgoing low priority drops towards the fabric/interface from this - integrated-circuit subsystem block."; - } - } - - grouping pipeline-drop-packet-interface-block-state { - description - "Each drop counter will aggregate incoming and outgoing packets, and - oversubscription drops that connect the IC to the external MAC or PHY."; - - uses pipeline-drops-common; - - leaf in-drops { - type oc-yang:counter64; - description - "Incoming drops towards the integrated-circuit interface - subsystem block from the interfaces due to any reason."; - } - - leaf out-drops { - type oc-yang:counter64; - description - "Outgoing drops towards the interfaces from the - integrated-circuit interface subsystem block due to any reason."; - } - - } - - grouping pipeline-drop-packet-lookup-block-state { - description - "The IC lookup subsystem drop counters track key functionality of this - subsystem such as Oversubscription, no-route, no-label, no-NH, invalid- - packets, forwarding-policy, incorrect-software, rate-limit, fragments, - and firewall drops"; - - uses pipeline-drops-common; - - leaf no-route { - type oc-yang:counter64; - description - "Packets dropped due to no FIB entry for this ipv4 or ipv6 lookup."; - } - - leaf no-label { - type oc-yang:counter64; - description - "Packets dropped due to no FIB entry for this MPLS label."; - } - - leaf no-nexthop { - type oc-yang:counter64; - description - "Packets dropped due to no nexthop information - either the nexthop is - not programmed, or there is an invalid nexthop, or there is no ARP - information so the nexthop is in invalid state."; - } - - leaf invalid-packet { - type oc-yang:counter64; - description - "Packets dropped due to invalid packet format for ipv4, ipv6, or MPLS."; - } - - leaf forwarding-policy { - type oc-yang:counter64; - description - "Packets dropped due to either a filter applied as part of a forwarding - policy or dropped due to a policy-based-routing policy lookup."; - } - - leaf incorrect-software-state { - type oc-yang:counter64; - description - "Packets dropped due to any incorrect or invalid software state of the - forwarding structures during lookup."; - } - - leaf rate-limit { - type oc-yang:counter64; - description - "Packets dropped due to rate limiters - either user configured rate - limiters or system rate limiters in the forwarding path."; - } - - leaf fragment-total-drops { - type oc-yang:counter64; - description - "Total number of packets dropped that could not be fragmented by NPU - due to DF bit."; - } - - leaf lookup-aggregte { - type oc-yang:counter64; - description - "Packets dropped due to aggregate lookup drop counters - this counter - is sometimes referred to as Normal Discards or - ENQ_DISCARDED_PACKET_COUNTER."; - } - - leaf acl-drops { - type oc-yang:counter64; - description - "Packets dropped due to firewall or acl terms."; - } - - } - - grouping pipeline-drop-packet-queueing-block-state { - description - "The IC queueing subsystem drop counters track key functionality of this - subsystem such as oversubscription, memory-limit, incorrect-state, and - loopback drops."; - - uses pipeline-drops-common; - - leaf memory-limit { - type oc-yang:counter64; - description - "Packets dropped due to running out of the queue memory."; - } - - leaf incorrect-state { - type oc-yang:counter64; - description - "Packets dropped due to hardware of software incorrect state of VOQs, - or fabric queues, or interface queues."; - } - - leaf lookup-queue { - type oc-yang:counter64; - description - "Packets dropped in either the lookup or recirculation path."; - } - - } - - grouping pipeline-drop-packet-fabric-block-state { - description - "The IC fabric subsystem drop counters track key functionality of this - subsystem such as oversubscription, lost-packets, high and low priority - packet drops."; - - uses pipeline-drops-common; - - leaf lost-packets { - type oc-yang:counter64; - description - "Fabric drops due to re-ordering, or due to packets arriving late, or - due to some loss in the fabric."; - } - - uses pipeline-drops-common-high-low; - - leaf fabric-aggregate { - type oc-yang:counter64; - description - "Aggregate of fabric-in and fabric-out drops."; - } - - } - - grouping pipeline-drop-packet-host-interface-block-state { - description - "The IC host interface drop counters track key funcitonality of this - subsystem such as oversubscription, rate-limit, fragment, and - hi/low priority drop counts"; - - uses pipeline-drops-common; - - leaf rate-limit { - type oc-yang:counter64; - description - "Packet drops due to the rate limit in the integrated-circuit host - subsystem block."; - } - - uses pipeline-drops-common-high-low; - - leaf fragment-punt { - type oc-yang:counter64; - description - "The packets that were failed to punt to CPU due to policing rate."; - } - - leaf host-aggregate { - type oc-yang:counter64; - description - "Aggregate of all the drops in the host path."; - } - - } - - grouping pipeline-errors-common { - description - "A common set of error counters that apply to multiple error sections."; - - leaf error-name { - type string; - description - "Name of the interrupt, hardware error, or software error in the NPU."; - } - - leaf error-count { - type uint64; - description - "Number of all the errors."; - } - - leaf error-threshold { - type uint64; - description - "Number of errors before recovery action."; - } - - leaf error-action { - type enumeration { - enum LOG { - description - "Log a descriptive message."; - } - enum LINECARD_REBOOT { - description - "The line card is brought offline and then back online."; - } - enum LINECARD_OFFLINE { - description - "The line card is brought offline."; - } - enum NPU_RESET { - description - "The NPU is brought offline and then back online."; - } - enum NPU_OFFLINE { - description - "The NPU is brought offline."; - } - enum GET_DIAGNOSTIC_INFO { - description - "Diagnostic data is gathered at the time of the problem."; - } - enum ALARM { - description - "An Alarm is raised"; - } - } - description - "Error action taken - log, linecard reboot, linecard offline, NPU - reset, NPU offline, gather diagnostic data, raise an alarm."; - } - - leaf error-level { - type enumeration { - enum FATAL { - description - "The Fatal error causes total packet loss"; - } - enum MAJOR { - description - "The Major error causes persistent packet loss"; - } - enum MINOR { - description - "The Minor error is an indication of some past problem, but now is - corrected"; - } - enum INFORMATIONAL { - description - "Some problem happened that is not packet loss affecting."; - } - } - description - "Identify the severity of the error - Fatal, Major, Minor, or - Informational."; - } - } - - grouping pipeline-errors-packet-interface-block-state { - description - "Error counter will aggregate the errors that connect the IC to the - external MAC or PHY. Each error should contain the name, count, - last-occurrence, threshold, action, and severity level."; - - uses pipeline-errors-common; - - } - - grouping pipeline-errors-packet-lookup-block-state { - description - "The IC lookup subsystem error counters include the errors encountered by - the lookup subsystem. Each error should contain the name, count, - last-occurrence, threshold, action, and severity level."; - - uses pipeline-errors-common; - - } - - grouping pipeline-errors-packet-queueing-block-state { - description - "The IC queueing subsystem error counters include the errors encountered - by the queueing subsystem. Each error should contain the name, count, - last-occurrence, threshold, action, and severity level."; - - uses pipeline-errors-common; - - } - - grouping pipeline-errors-packet-fabric-block-state { - description - "The IC fabric subsystem error counters include the errors encountered by - the fabric subsystem. Each error should contain the name, count, - last-occurrence, threshold, action, and severity level."; - - uses pipeline-errors-common; - - } - - grouping pipeline-errors-packet-host-interface-block-state { - description - "The IC host interface error counters include the errors encountered by - the host interface subsystem. Each error should contain the name, count, - last-occurrence, threshold, action, and severity level."; - - uses pipeline-errors-common; - - } - - augment "/oc-platform:components/oc-platform:component/oc-platform:integrated-circuit" { - description - "Add operational state data that corresponds to sub-blocks of an integrated - circuit (NPU, ASIC) to the platform model."; - - uses platform-pipeline-top; - } -} diff --git a/models/openconfig/public/release/models/platform/openconfig-platform-port.yang b/models/openconfig/public/release/models/platform/openconfig-platform-port.yang index f78d481c0d89b641a29387d01ffdb96e383eb453..6dd699374eda98f8fab41a5ba170dae971d8f1bc 100644 --- a/models/openconfig/public/release/models/platform/openconfig-platform-port.yang +++ b/models/openconfig/public/release/models/platform/openconfig-platform-port.yang @@ -24,13 +24,7 @@ module openconfig-platform-port { "This module defines data related to PORT components in the openconfig-platform model"; - oc-ext:openconfig-version "0.4.0"; - - revision "2021-04-22" { - description - "Adding support for flexible port breakout."; - reference "0.4.0"; - } + oc-ext:openconfig-version "0.3.3"; revision "2020-05-06" { description @@ -84,111 +78,57 @@ module openconfig-platform-port { // grouping statements - grouping group-config { + grouping port-breakout-config { description - "Configuration data for the breakout group."; + "Configuration data for the port breakout mode"; - leaf index { - type uint8; - description - "Each index specifies breakouts that are identical in - terms of speed and the number of physical channels."; - } - - leaf num-breakouts { + leaf num-channels { type uint8; description - "Sets the number of interfaces using this breakout group."; + "Sets the number of channels to 'breakout' on a port + capable of channelization"; } - leaf breakout-speed { + leaf channel-speed { type identityref { base oc-eth:ETHERNET_SPEED; } description - "Speed of interfaces in this breakout group, supported - values are defined by the ETHERNET_SPEED identity."; - } - - leaf num-physical-channels { - type uint8; - description - "Sets the number of lanes or physical channels assigned - to the interfaces in this breakout group. This leaf need - not be set if there is only one breakout group where all - the interfaces are of equal speed and have equal number - of physical channels"; + "Sets the channel speed on each channel -- the + supported values are defined by the + ETHERNET_SPEED identity"; } } - grouping group-state { + grouping port-breakout-state { description - "Operational state data for the port breakout group."; + "Operational state data for the port breakout mode "; } grouping port-breakout-top { description - "Top-level grouping for port breakout data."; + "Top-level grouping for port breakout data"; container breakout-mode { description - "Top-level container for port breakout-mode data."; + "Top-level container for port breakout data"; + + container config { + description + "Configuration data for port breakout"; + + uses port-breakout-config; + } + + container state { + + config false; - container groups { description - "Top level container for breakout groups data. - - When a device has the capability to break a port into - interfaces of different speeds and different number of - physical channels, it can breakout a 400G OSFP port with - 8 physical channels (with support for 25G NRZ, 50G PAM4 - and 100G PAM4) in the following configuration: - - 100G + 100G + 200G -> 1 interface with 2 physical channels - and 1 interface with 4 physical channels and 1 interface with - 2 physical channels. With this configuration the interface in - 1st breakout group would use 50G PAM4 modulation, interface - in 2nd breakout group would use 25G NRZ modulation and the - interface in 3rd breakout group would use 100G PAM4 modulation - This configuration would result in 3 entries in the breakout - groups list. - - When a device does not have the capability to break a port - into interfaces of different speeds and different number of - physical channels, it would breakout a 400G OSFP port with - 8 physical channels in the following configuration: - - 50G -> 8 interfaces with 1 physical channel each, this would - result in 1 entry in the breakout groups list."; - - list group { - key "index"; - description - "List of breakout groups."; - - leaf index { - type leafref { - path "../config/index"; - } - description - "Index of the breakout group entry in the breakout groups list."; - } - - container config { - description - "Configuration data for breakout group."; - uses group-config; - } - - container state { - config false; - description - "Operational state data for breakout group."; - - uses group-config; - uses group-state; - } - } + "Operational state data for port breakout"; + + uses port-breakout-config; + uses port-breakout-state; } } } diff --git a/models/openconfig/public/release/models/platform/openconfig-platform-software.yang b/models/openconfig/public/release/models/platform/openconfig-platform-software.yang deleted file mode 100644 index d7a5d9a8db5d03e59428c64014ef7294aee727dc..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/platform/openconfig-platform-software.yang +++ /dev/null @@ -1,94 +0,0 @@ -module openconfig-platform-software { - - yang-version "1"; - - // namespace - namespace "http://openconfig.net/yang/platform/software-module"; - - prefix "oc-sw-module"; - - import openconfig-platform { - prefix oc-platform; - } - - import openconfig-extensions { - prefix oc-ext; - } - - // meta - organization - "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module defines data related to software components in - the openconfig-platform model"; - - oc-ext:openconfig-version "0.1.0"; - - revision "2021-01-18" { - description - "Initial revision."; - reference "0.1.0"; - } - - // OpenConfig specific extensions for module metadata. - oc-ext:catalog-organization "openconfig"; - oc-ext:origin "openconfig"; - - // extension statements - // feature statements - // identity statements - identity SOFTWARE_MODULE_TYPE { - description - "Base identity for defining various types of software - modules."; - } - - identity USERSPACE_PACKAGE_BUNDLE { - base SOFTWARE_MODULE_TYPE; - description - "A collection of userspace software modules that are grouped, and - possibly versioned, together. A package bundle may have - subcomponents that represent individual elements in the bundle - and their properties."; - } - - identity USERSPACE_PACKAGE { - base SOFTWARE_MODULE_TYPE; - description - "An individual software package that runs in user space. The - package may be part of a package bundle."; - } - - // typedef statements - // grouping statements - grouping sw-module-state { - description - "Operational state data for software module components"; - - leaf module-type { - type identityref { - base SOFTWARE_MODULE_TYPE; - } - description - "Type of the software module"; - } - } - - // data definition statements - // augment statements - augment "/oc-platform:components/oc-platform:component/" + - "oc-platform:software-module/oc-platform:state" { - description - "Adding software module operational data to physical inventory. - This subtree is only valid when the type of the component is - SOFTWARE_MODULE."; - - uses sw-module-state; - } -} - diff --git a/models/openconfig/public/release/models/platform/openconfig-platform-transceiver.yang b/models/openconfig/public/release/models/platform/openconfig-platform-transceiver.yang index 344f8e9b4d162bcf2a2da36944216496547c59d9..1cb61f67d63efd1e3ac974d29f932075b0e0d41c 100644 --- a/models/openconfig/public/release/models/platform/openconfig-platform-transceiver.yang +++ b/models/openconfig/public/release/models/platform/openconfig-platform-transceiver.yang @@ -35,43 +35,9 @@ module openconfig-platform-transceiver { In the platform model, a component of type=TRANSCEIVER is expected to be a subcomponent of a PORT component. This module defines a concrete schema for the associated data for - components with type=TRANSCEIVER. - - A transceiver will always contain physical-channel(s), however - when a line side optical-channel is present (i.e. ZR+ optics) - the physical-channel will reference its optical-channel. - In this case, the optical-channels components must be - subcomponents of the transceiver. The relationship between the - physical-channel and the optical-channel allows for multiple - optical-channels to be associated with a transceiver in addition - to ensuring certain leaves (i.e. output-power) are not duplicated - in multiple components. - - If a transceiver contains a digital signal processor (DSP), such - as with ZR+ optics, the modeling will utilize hierarchical - components as follows: - PORT --> TRANSCEIVER --> OPTICAL_CHANNEL(s) - The signal will then traverse through a series of - terminal-device/logical-channels as required. The first - logical-channel connected to the OPTICAL_CHANNEL will utilize the - assignment/optical-channel leaf to create the relationship. At the - conclusion of the series of logical-channels, the logical-channel - will be associated to its host / client side based on: - * If the TRANSCEIVER is directly within a router or switch, then - it will use the logical-channel ingress leaf to specify the - interface it is associated with. - * If the TRANSCEIVER is within a dedicated terminal (Layer 1) - device, then it will use the logical-channel ingress leaf to - specify a physical-channel within a TRANSCEIVER component - (i.e. gray optic) that it is associated with."; - - oc-ext:openconfig-version "0.8.0"; - - revision "2021-02-23" { - description - "Add leafref to an optical channel from a physical channel."; - reference "0.8.0"; - } + components with type=TRANSCEIVER."; + + oc-ext:openconfig-version "0.7.1"; revision "2020-05-06" { description @@ -226,19 +192,6 @@ module openconfig-platform-transceiver { client port"; } - leaf associated-optical-channel { - type leafref { - path "/oc-platform:components/oc-platform:component/" + - "oc-platform:name"; - } - description - "A physical channel may reference an optical channel - component. If the physical channel does make this optional - reference, then a limited set of leaves will apply within - the physical channel to avoid duplication within the optical - channel."; - } - leaf description { type string; description @@ -252,24 +205,6 @@ module openconfig-platform-transceiver { channel"; } - uses physical-channel-config-extended { - when "../../../config/module-functional-type = 'oc-opt-types:TYPE_STANDARD_OPTIC'" { - description - "When the physical channel is of TYPE_STANDARD_OPTIC, the - extended config will be used"; - } - } - } - - grouping physical-channel-config-extended { - description - "Extended configuration data for physical client channels - for applications where the full physical channel config and - state are used. In some cases, such as when the physical - channel has a leafref to an optical channel component and the - module-functional-type is TYPE_DIGITAL_COHERENT_OPTIC this - grouping will NOT be used."; - leaf target-output-power { type decimal64 { fraction-digits 2; @@ -283,28 +218,7 @@ module openconfig-platform-transceiver { grouping physical-channel-state { description - "Operational state data for client channels. In some cases, - such as when the physical channel has a leafref to an optical - channel component and the module-functional-type is - TYPE_DIGITAL_COHERENT_OPTIC this grouping will NOT be used."; - - uses physical-channel-state-extended { - when "../../../state/module-functional-type = 'oc-opt-types:TYPE_STANDARD_OPTIC'" { - description - "When the physical channel is of TYPE_STANDARD_OPTIC, the - extended state will be used"; - } - } - } - - grouping physical-channel-state-extended { - description - "Extended operational state data for physical client channels - for applications where the full physical channel config and - state are used. In some cases, such as when the physical - channel has a leafref to an optical channel component and the - module-functional-type is TYPE_DIGITAL_COHERENT_OPTIC this - grouping will NOT be used."; + "Operational state data for client channels."; uses output-optical-frequency; uses optical-power-state; @@ -412,17 +326,6 @@ module openconfig-platform-transceiver { transceiver's FEC. This defines typical operational modes and does not aim to specify more granular FEC capabilities."; } - - leaf module-functional-type { - type identityref { - base oc-opt-types:TRANSCEIVER_MODULE_FUNCTIONAL_TYPE; - } - description - "Indicates the module functional type which represents the - functional capability of the transceiver. For example, this - would specify the module is a digital coherent optic or a - standard grey optic that performs on-off keying."; - } } grouping port-transceiver-state { diff --git a/models/openconfig/public/release/models/platform/openconfig-platform-types.yang b/models/openconfig/public/release/models/platform/openconfig-platform-types.yang index aa7f697a10a4fc45be8955eda0a1f07d2e3065bc..8dc3ffc1fd5996eabdafe755d4af75f3fbc490d7 100644 --- a/models/openconfig/public/release/models/platform/openconfig-platform-types.yang +++ b/models/openconfig/public/release/models/platform/openconfig-platform-types.yang @@ -10,9 +10,9 @@ module openconfig-platform-types { import openconfig-types { prefix oc-types; } import openconfig-extensions { prefix oc-ext; } + // meta - organization - "OpenConfig working group"; + organization "OpenConfig working group"; contact "OpenConfig working group @@ -22,13 +22,7 @@ module openconfig-platform-types { "This module defines data types (e.g., YANG identities) to support the OpenConfig component inventory model."; - oc-ext:openconfig-version "1.1.0"; - - revision "2021-01-18" { - description - "Add identity for software modules"; - reference "1.1.0"; - } + oc-ext:openconfig-version "1.0.0"; revision "2019-06-03" { description @@ -87,6 +81,8 @@ module openconfig-platform-types { oc-ext:origin "openconfig"; // grouping statements + + grouping avg-min-max-instant-stats-precision1-celsius { description "Common grouping for recording temperature values in @@ -137,6 +133,7 @@ module openconfig-platform-types { } // identity statements + identity OPENCONFIG_HARDWARE_COMPONENT { description "Base identity for hardware related components in a managed @@ -146,6 +143,7 @@ module openconfig-platform-types { "IANA Entity MIB and RFC 6933"; } + identity OPENCONFIG_SOFTWARE_COMPONENT { description "Base identity for software-related components in a managed @@ -153,6 +151,7 @@ module openconfig-platform-types { } // hardware types + identity CHASSIS { base OPENCONFIG_HARDWARE_COMPONENT; description @@ -208,7 +207,7 @@ module openconfig-platform-types { base OPENCONFIG_HARDWARE_COMPONENT; description "A type of linecard whose primary role is management or control - rather than data forwarding."; + rather than data forwarding."; } identity PORT { @@ -263,23 +262,6 @@ module openconfig-platform-types { item"; } - identity BOOT_LOADER { - base OPENCONFIG_SOFTWARE_COMPONENT; - description - "Software layer responsible for loading and booting the - device OS or network OS."; - } - - identity SOFTWARE_MODULE { - base OPENCONFIG_SOFTWARE_COMPONENT; - description - "A base identity for software modules installed and/or - running on the device. Modules include user-space programs - and kernel modules that provide specific functionality. - A component with type SOFTWARE_MODULE should also have a - module type that indicates the specific type of software module"; - } - identity COMPONENT_OPER_STATUS { description "Current operational status of a platform component"; @@ -345,6 +327,7 @@ module openconfig-platform-types { } // typedef statements + typedef component-power-type { type enumeration { enum POWER_ENABLED { @@ -360,4 +343,5 @@ module openconfig-platform-types { "A generic type reflecting whether a hardware component is powered on or off"; } + } diff --git a/models/openconfig/public/release/models/platform/openconfig-platform.yang b/models/openconfig/public/release/models/platform/openconfig-platform.yang index e5d9b2b8005147f942b77d7488ab3cc23bdded6c..ecf38cd1af1d244e434e87f4935bf357fa4cb0e6 100644 --- a/models/openconfig/public/release/models/platform/openconfig-platform.yang +++ b/models/openconfig/public/release/models/platform/openconfig-platform.yang @@ -63,13 +63,7 @@ module openconfig-platform { (presence or absence of a component) and state (physical attributes or status)."; - oc-ext:openconfig-version "0.13.0"; - - revision "2021-01-18" { - description - "Add container for software module component"; - reference "0.13.0"; - } + oc-ext:openconfig-version "0.12.2"; revision "2019-04-16" { description @@ -722,23 +716,6 @@ module openconfig-platform { "Operational state data for backplane components"; } } - - container software-module { - description - "Data for software module components, i.e., for components - with type=SOFTWARE_MODULE"; - - container config { - description - "Configuration data for software module components"; - } - - container state { - config false; - description - "Operational state data for software module components"; - } - } } grouping platform-component-top { diff --git a/models/openconfig/public/release/models/policy-forwarding/.spec.yml b/models/openconfig/public/release/models/policy-forwarding/.spec.yml deleted file mode 100644 index e083b13b4437c86112710227d497228055eeb112..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/policy-forwarding/.spec.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: openconfig-network-instance-srte-policy - docs: - - yang/network-instance/openconfig-network-instance-types.yang - - yang/network-instance/openconfig-network-instance.yang - build: - - yang/network-instance/openconfig-network-instance.yang - - yang/policy-forwarding/openconfig-pf-srte.yang - run-ci: true diff --git a/models/openconfig/public/release/models/policy/.spec.yml b/models/openconfig/public/release/models/policy/.spec.yml deleted file mode 100644 index 123f8f9a947bd0de75ec752b1e5940d516b44804..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/policy/.spec.yml +++ /dev/null @@ -1,18 +0,0 @@ -- name: openconfig-routing-policy - docs: - - yang/policy/openconfig-policy-types.yang - - yang/bgp/openconfig-bgp-types.yang - - yang/isis/openconfig-isis-types.yang - - yang/ospf/openconfig-ospf-types.yang - - yang/policy/openconfig-routing-policy.yang - - yang/network-instance/openconfig-network-instance-policy.yang - - yang/bgp/openconfig-bgp-policy.yang - - yang/isis/openconfig-isis-policy.yang - - yang/ospf/openconfig-ospf-policy.yang - build: - - yang/policy/openconfig-routing-policy.yang - - yang/network-instance/openconfig-network-instance-policy.yang - - yang/bgp/openconfig-bgp-policy.yang - - yang/isis/openconfig-isis-policy.yang - - yang/ospf/openconfig-ospf-policy.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/policy/openconfig-routing-policy.yang b/models/openconfig/public/release/models/policy/openconfig-routing-policy.yang index 0ed2f939218d50a6efba88c3bbf8ca53f110e30d..7d45c31411361a8b5a353361a7d83cd490213a2c 100644 --- a/models/openconfig/public/release/models/policy/openconfig-routing-policy.yang +++ b/models/openconfig/public/release/models/policy/openconfig-routing-policy.yang @@ -77,13 +77,7 @@ module openconfig-routing-policy { the remaining conditions (using a modified route if the subroutine performed any changes to the route)."; - oc-ext:openconfig-version "3.2.2"; - - revision "2020-08-18" { - description - "Fix regex anchors for masklength-range's pattern statement."; - reference "3.2.2"; - } + oc-ext:openconfig-version "3.2.1"; revision "2020-06-30" { description @@ -273,8 +267,8 @@ module openconfig-routing-policy { leaf masklength-range { type string { - pattern '^(([0-9]+\.\.[0-9]+)|exact)$'; - oc-ext:posix-pattern '^(([0-9]+\.\.[0-9]+)|exact)$'; + pattern '^([0-9]+\.\.[0-9]+)|exact$'; + oc-ext:posix-pattern '^([0-9]+\.\.[0-9]+)|exact$'; } description "Defines a range for the masklength, or 'exact' if diff --git a/models/openconfig/public/release/models/probes/.spec.yml b/models/openconfig/public/release/models/probes/.spec.yml deleted file mode 100644 index 6c005aef3c8b25b4ee977d6e9bda734220934a57..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/probes/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-probes - docs: - - yang/probes/openconfig-probes-types.yang - - yang/probes/openconfig-probes.yang - build: - - yang/probes/openconfig-probes.yang - run-ci: true diff --git a/models/openconfig/public/release/models/qos/.spec.yml b/models/openconfig/public/release/models/qos/.spec.yml deleted file mode 100644 index 30ccf9c9acad0a4f7c60d25bcfab439e463ab712..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/qos/.spec.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: openconfig-qos - docs: - - yang/qos/openconfig-qos-types.yang - - yang/qos/openconfig-qos.yang - build: - - yang/qos/openconfig-qos-types.yang - - yang/qos/openconfig-qos.yang - run-ci: true diff --git a/models/openconfig/public/release/models/relay-agent/.spec.yml b/models/openconfig/public/release/models/relay-agent/.spec.yml deleted file mode 100644 index 1420b7b2d18d76264b4ec55ddb2b4157a53cce4f..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/relay-agent/.spec.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: openconfig-relay-agent - docs: - - yang/relay-agent/openconfig-relay-agent.yang - build: - - yang/relay-agent/openconfig-relay-agent.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/rib/.spec.yml b/models/openconfig/public/release/models/rib/.spec.yml deleted file mode 100644 index 5ed411c6ba908c8f96c9fc987755064af1205f48..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/rib/.spec.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: openconfig-bgp-rib - docs: - - yang/rib/openconfig-rib-bgp-types.yang - - yang/rib/openconfig-rib-bgp-ext.yang - - yang/rib/openconfig-rib-bgp.yang - build: - - yang/rib/openconfig-rib-bgp.yang - - yang/rib/openconfig-rib-bgp-ext.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/sampling/.spec.yml b/models/openconfig/public/release/models/sampling/.spec.yml deleted file mode 100644 index c861a3d96bfc366c85f0ac4c95456e81f46d93a5..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/sampling/.spec.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: openconfig-sampling - docs: - - yang/sampling/openconfig-sampling-sflow.yang - build: - - yang/sampling/openconfig-sampling-sflow.yang - run-ci: true diff --git a/models/openconfig/public/release/models/sampling/openconfig-sampling-sflow.yang b/models/openconfig/public/release/models/sampling/openconfig-sampling-sflow.yang deleted file mode 100644 index 761f8b4a41a0060d225f587cd4fbdee35ff06da7..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/sampling/openconfig-sampling-sflow.yang +++ /dev/null @@ -1,312 +0,0 @@ -module openconfig-sampling-sflow { - - yang-version "1"; - - // namespace - namespace "http://openconfig.net/yang/sampling/sflow"; - - prefix "oc-sflow"; - - // import some basic types - import openconfig-extensions { prefix oc-ext; } - import openconfig-inet-types { prefix oc-inet; } - import openconfig-interfaces { prefix oc-if; } - import openconfig-yang-types { prefix oc-yang; } - import openconfig-network-instance { prefix oc-netinst; } - - - // meta - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module defines configuration and operational state data - related to data plane traffic sampling based on sFlow. - - RFC 3176 - InMon Corporation's sFlow: A Method for - Monitoring Traffic in Switched and Routed Networks"; - - oc-ext:openconfig-version "0.1.0"; - - revision "2020-06-26" { - description - "Initial revision"; - reference "0.1.0"; - } - - - grouping sflow-interfaces-config { - description - "Configuration data for sFlow data on interfaces."; - - leaf name { - type oc-if:base-interface-ref; - description - "Reference to the interface for sFlow configuration and - state."; - } - - leaf enabled { - type boolean; - description - "Enables or disables sFlow on the interface. If sFlow is - globally disabled, this leaf is ignored. If sFlow - is globally enabled, this leaf may be used to disable it - for a specific interface."; - } - - leaf sampling-rate { - type uint32; - description - "If sFlow is enabled on the interface, this leaf may be - used to override the global sampling rate for a specific - interface. The sampling rate semantics are the same as the - system-wide leaf."; - } - - } - - grouping sflow-interfaces-state { - description - "Operational state data for sFlow data on interfaces"; - - leaf packets-sampled { - type oc-yang:counter64; - description - "Total number of packets sampled from the interface."; - } - } - - grouping sflow-interfaces-top { - description - "Top-level grouping for sFlow data on an interface."; - - container interfaces { - description - "Enclosing container for list of sFlow interfaces."; - - list interface { - key "name"; - description - "List of interfaces with sFlow data."; - - leaf name { - type leafref { - path "../config/name"; - } - description - "Reference to list key."; - } - - container config { - description - "Configuration data for sFlow data on interfaces."; - - uses sflow-interfaces-config; - } - - container state { - - config false; - - description - "Operational state data for sFlow data on interfaces."; - - uses sflow-interfaces-config; - uses sflow-interfaces-state; - } - } - } - } - - grouping sflow-collectors-config { - description - "Configuration data for sFlow collectors."; - - leaf address { - type oc-inet:ip-address; - description - "IP address of the sFlow collector."; - } - - leaf port { - type oc-inet:port-number; - default 6343; - description - "UDP port number for the sFlow collector."; - } - - leaf network-instance { - type oc-netinst:network-instance-ref; - description - "Reference to the network instance used to reach the - sFlow collector. If uspecified, the collector destination - is reachable in the default network instance."; - } - } - - grouping sflow-collectors-state { - description - "Operational state data for sFlow collectors."; - - leaf packets-sent { - type oc-yang:counter64; - description - "The total number of packets sampled and sent to the - collector."; - } - } - - grouping sflow-collectors-top { - description - "Top-level grouping for data related to sFlow collectors."; - - container collectors { - description - "Enclosing container for list of sFlow collectors."; - - list collector { - key "address port"; - description - "List of sFlow collectors to send sampling data. Packet - samples are sent to all collectors specified."; - - leaf address { - type leafref { - path "../config/address"; - } - description - "Reference to address list key."; - } - - leaf port { - type leafref { - path "../config/port"; - } - description - "Reference to port list key."; - } - - container config { - description - "Configuration data for sFlow collectors."; - - uses sflow-collectors-config; - } - - container state { - - config false; - - description - "Operational state data for sFlow collectors."; - - uses sflow-collectors-config; - uses sflow-collectors-state; - } - } - } - } - - grouping sflow-global-config { - description - "Configuration data for global sflow"; - - leaf enabled { - type boolean; - default false; - description - "Enables or disables sFlow sampling for the device."; - } - - leaf source-address { - type oc-inet:ip-address; - description - "Sets the source IP address for sFlow datagrams sent to - sFlow collectors."; - } - - leaf sampling-rate { - type uint32; - description - "Sets the global packet sampling rate. The rate is - is expressed as an integer N, where the intended sampling - rate is 1/N packets. An implementation may implement the - sampling rate as a statistical average, rather than a strict - periodic sampling. - - The allowable sampling rate range is generally a - property of the system, e.g., determined by the - capability of the hardware."; - } - - leaf sample-size { - type uint16; - units bytes; - default 128; - description - "Sets the maximum number of bytes to be copied from a - sampled packet."; - reference - "RFC 3176 - InMon Corporation's sFlow: A Method for - Monitoring Traffic in Switched and Routed Networks"; - } - } - - grouping sflow-global-state { - description - "Operational state data for global sFlow."; - } - - grouping sflow-global-top { - description - "Top-level grouping for global sFlow"; - - container sflow { - description - "Top-level container for sFlow data."; - - container config { - description - "Configuration data for global sFlow."; - - uses sflow-global-config; - } - - container state { - - config false; - - description - "Operational state data for global sFlow."; - - uses sflow-global-config; - uses sflow-global-state; - } - - uses sflow-collectors-top; - uses sflow-interfaces-top; - } - } - - grouping sampling-top { - description - "Top-level grouping for traffic sampling data."; - - container sampling { - description - "Top-level container for data related to traffic sampling - protocols."; - - uses sflow-global-top; - } - } - - // data definition statements - - uses sampling-top; - -} diff --git a/models/openconfig/public/release/models/segment-routing/.spec.yml b/models/openconfig/public/release/models/segment-routing/.spec.yml deleted file mode 100644 index 5b3b146a652ae248cd5c100d2e22271f60f2d310..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/segment-routing/.spec.yml +++ /dev/null @@ -1,11 +0,0 @@ -- name: openconfig-network-instance-sr - build: - - yang/network-instance/openconfig-network-instance.yang - - yang/segment-routing/openconfig-segment-routing.yang - run-ci: true -- name: openconfig-network-instance-sr-rsvp-coexistence - build: - - yang/network-instance/openconfig-network-instance.yang - - yang/segment-routing/openconfig-segment-routing.yang - - yang/segment-routing/openconfig-rsvp-sr-ext.yang - run-ci: true diff --git a/models/openconfig/public/release/models/segment-routing/openconfig-srte-policy.yang b/models/openconfig/public/release/models/segment-routing/openconfig-srte-policy.yang index 81c8d090f9bdd6b9a4adb8e598bf4d1b2ab8a8f3..8e6e97b5c0ec4d153544dfabadeb738c95bffa15 100644 --- a/models/openconfig/public/release/models/segment-routing/openconfig-srte-policy.yang +++ b/models/openconfig/public/release/models/segment-routing/openconfig-srte-policy.yang @@ -38,14 +38,7 @@ module openconfig-srte-policy { reference "draft-ietf-spring-segment-routing-policy"; - oc-ext:openconfig-version "0.2.2"; - - revision "2020-11-06" { - description - "Update segment-lists nexthop state container to use index leaf - from aft-common-entry-nexthop-state."; - reference "0.2.2"; - } + oc-ext:openconfig-version "0.2.1"; revision "2020-05-01" { description @@ -435,6 +428,13 @@ module openconfig-srte-policy { config false; description "State parameters for the nexthop."; + leaf index { + type uint32; + description + "A unique index identifying the next-hop entry for the + segment-list."; + } + uses oc-aft:aft-common-entry-nexthop-state; container counters { diff --git a/models/openconfig/public/release/models/stp/.spec.yml b/models/openconfig/public/release/models/stp/.spec.yml deleted file mode 100644 index 2fb8ffc32b0fabe18a80e2ad64eedfc4b44f97f0..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/stp/.spec.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: openconfig-stp - docs: - - yang/stp/openconfig-spanning-tree-types.yang - - yang/stp/openconfig-spanning-tree.yang - build: - - yang/stp/openconfig-spanning-tree.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/stp/openconfig-spanning-tree-types.yang b/models/openconfig/public/release/models/stp/openconfig-spanning-tree-types.yang index e608a5d318a0b6c076322f325853bdd3a5c1c4b3..29c92e0e69452ed5028dec2ee85994dcc2cb8bfb 100644 --- a/models/openconfig/public/release/models/stp/openconfig-spanning-tree-types.yang +++ b/models/openconfig/public/release/models/stp/openconfig-spanning-tree-types.yang @@ -22,14 +22,8 @@ module openconfig-spanning-tree-types { "This module defines types related to the spanning-tree protocol model."; - oc-ext:openconfig-version "0.4.0"; + oc-ext:openconfig-version "0.3.1"; - revision "2021-02-19" { - description - "Correct range for bridge priority type."; - reference "0.4.0"; - } - revision "2019-11-28" { description "Correct revision statement date for v0.3.0"; @@ -198,15 +192,11 @@ module openconfig-spanning-tree-types { // typedef statements typedef stp-bridge-priority-type { - type uint16 { - range 0..61440; + type uint32 { + range 1..611440; } - default 32768; description - "The manageable component of the Bridge Identifier. The bridge priority - determines which bridge is selected as the root bridge (lowest priority - value is selected as root). Valid values are in the range 0 through - 61440, in steps of 4096."; + "The manageable component of the Bridge Identifier"; reference "IEEE 802.1D 17.13.7 Bridge Identifier Priority"; } diff --git a/models/openconfig/public/release/models/system/.spec.yml b/models/openconfig/public/release/models/system/.spec.yml deleted file mode 100644 index efd8e0f4eda51b893a7d632f7d602a7c9a64ce55..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/system/.spec.yml +++ /dev/null @@ -1,17 +0,0 @@ -- name: openconfig-system - docs: - - yang/system/openconfig-aaa-types.yang - - yang/system/openconfig-alarm-types.yang - - yang/system/openconfig-system.yang - - yang/system/openconfig-system-terminal.yang - - yang/system/openconfig-system-logging.yang - - yang/system/openconfig-procmon.yang - - yang/system/openconfig-aaa.yang - - yang/system/openconfig-aaa-tacacs.yang - - yang/system/openconfig-aaa-radius.yang - - yang/system/openconfig-alarms.yang - - yang/system/openconfig-messages.yang - - yang/system/openconfig-license.yang - build: - - yang/system/openconfig-system.yang - run-ci: true diff --git a/models/openconfig/public/release/models/system/openconfig-aaa-radius.yang b/models/openconfig/public/release/models/system/openconfig-aaa-radius.yang index 34449292ac8d3bc6decf7bf37146a91dcf91532f..a18b9d68d25825596715468053c71e4e4ef8f1bc 100644 --- a/models/openconfig/public/release/models/system/openconfig-aaa-radius.yang +++ b/models/openconfig/public/release/models/system/openconfig-aaa-radius.yang @@ -26,13 +26,7 @@ submodule openconfig-aaa-radius { related to the RADIUS protocol for authentication, authorization, and accounting."; - oc-ext:openconfig-version "0.5.0"; - - revision "2020-07-30" { - description - "Add secret-key-hashed."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2018-11-21" { description @@ -104,13 +98,6 @@ submodule openconfig-aaa-radius { server and the device."; } - leaf secret-key-hashed { - type oc-aaa-types:crypt-password-type; - description - "The hashed shared key used between the authentication - server and the device."; - } - leaf source-address { type oc-inet:ip-address; description diff --git a/models/openconfig/public/release/models/system/openconfig-aaa-tacacs.yang b/models/openconfig/public/release/models/system/openconfig-aaa-tacacs.yang index 1b8bf88e83774ae1ad975c596a9ec5b67d623a19..1320bd0cf53e6f4b4895f35a98ec31c51bead11a 100644 --- a/models/openconfig/public/release/models/system/openconfig-aaa-tacacs.yang +++ b/models/openconfig/public/release/models/system/openconfig-aaa-tacacs.yang @@ -25,13 +25,7 @@ submodule openconfig-aaa-tacacs { related to the TACACS+ protocol for authentication, authorization, and accounting."; - oc-ext:openconfig-version "0.5.0"; - - revision "2020-07-30" { - description - "Add secret-key-hashed."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.1"; revision "2018-11-21" { description @@ -97,13 +91,6 @@ submodule openconfig-aaa-tacacs { server and the device."; } - leaf secret-key-hashed { - type oc-aaa-types:crypt-password-type; - description - "The hashed shared key used between the authentication - server and the device."; - } - leaf source-address { type oc-inet:ip-address; description diff --git a/models/openconfig/public/release/models/system/openconfig-aaa.yang b/models/openconfig/public/release/models/system/openconfig-aaa.yang index d7c529c092a71e37d72bb59b6cfe4005d71a7e96..d653ab2253571f657105d0eb26fea3bec56e661e 100644 --- a/models/openconfig/public/release/models/system/openconfig-aaa.yang +++ b/models/openconfig/public/release/models/system/openconfig-aaa.yang @@ -32,13 +32,7 @@ module openconfig-aaa { Portions of this model reuse data definitions or structure from RFC 7317 - A YANG Data Model for System Management"; - oc-ext:openconfig-version "0.5.0"; - - revision "2020-07-30" { - description - "Add secret-key-hashed for TACACS and RADIUS."; - reference "0.5.0"; - } + oc-ext:openconfig-version "0.4.3"; revision "2019-10-28" { description diff --git a/models/openconfig/public/release/models/telemetry/.spec.yml b/models/openconfig/public/release/models/telemetry/.spec.yml deleted file mode 100644 index ba4d02b5ca325d34b18cdd99fac123821f78e0aa..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/telemetry/.spec.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: openconfig-telemetry - docs: - - yang/telemetry/openconfig-telemetry.yang - build: - - yang/telemetry/openconfig-telemetry.yang - run-ci: true diff --git a/models/openconfig/public/release/models/types/.spec.yml b/models/openconfig/public/release/models/types/.spec.yml deleted file mode 100644 index 5cfc1936fd0b1fb9c2448ca5486258c54af1b955..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/types/.spec.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: openconfig-types - docs: - - yang/types/openconfig-types.yang - - yang/types/openconfig-yang-types.yang - - yang/types/openconfig-inet-types.yang - build: - - yang/types/openconfig-types.yang - - yang/types/openconfig-yang-types.yang - - yang/types/openconfig-inet-types.yang - run-ci: false \ No newline at end of file diff --git a/models/openconfig/public/release/models/types/openconfig-inet-types.yang b/models/openconfig/public/release/models/types/openconfig-inet-types.yang index cf0005c20edd773612cd6f5a4e8f9d74df7d961b..b0c9311c537eac4ebfa56133c60b03344c9b80ec 100644 --- a/models/openconfig/public/release/models/types/openconfig-inet-types.yang +++ b/models/openconfig/public/release/models/types/openconfig-inet-types.yang @@ -31,26 +31,7 @@ module openconfig-inet-types { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "0.4.0"; - - revision "2021-01-07" { - description - "Remove module extension oc-ext:regexp-posix by making pattern regexes - conform to RFC7950. - - Types impacted: - - ipv4-address - - ipv4-address-zoned - - ipv6-address - - domain-name"; - reference "0.4.0"; - } - - revision "2020-10-12" { - description - "Fix anchors for domain-name pattern."; - reference "0.3.5"; - } + oc-ext:openconfig-version "0.3.4"; revision "2020-06-30" { description @@ -102,6 +83,7 @@ module openconfig-inet-types { } // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -109,9 +91,9 @@ module openconfig-inet-types { typedef ipv4-address { type string { - pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' + - '[0-9]|25[0-5])'; + '[0-9]|25[0-5])$'; oc-ext:posix-pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' + '[0-9]|25[0-5])$'; @@ -123,9 +105,9 @@ module openconfig-inet-types { typedef ipv4-address-zoned { type string { - pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' + - '[0-9]|25[0-5])(%[a-zA-Z0-9_]+)'; + '[0-9]|25[0-5])(%[a-zA-Z0-9_]+)$'; oc-ext:posix-pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' + '[0-9]|25[0-5])(%[a-zA-Z0-9_]+)$'; @@ -142,7 +124,7 @@ module openconfig-inet-types { pattern // Must support compression through different lengths // therefore this regexp is complex. - '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + '([0-9a-fA-F]{1,4}:){1,7}:|' + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + @@ -151,7 +133,7 @@ module openconfig-inet-types { '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + - ')'; + ')$'; oc-ext:posix-pattern // Must support compression through different lengths // therefore this regexp is complex. @@ -210,9 +192,9 @@ module openconfig-inet-types { typedef ipv4-prefix { type string { - pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' + - '[0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))'; + '[0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))$'; oc-ext:posix-pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' + '[0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))$'; @@ -225,7 +207,7 @@ module openconfig-inet-types { typedef ipv6-prefix { type string { pattern - '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + '([0-9a-fA-F]{1,4}:){1,7}:|' + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + @@ -234,7 +216,7 @@ module openconfig-inet-types { '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + - ')/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'; + ')/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])$'; oc-ext:posix-pattern '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + '([0-9a-fA-F]{1,4}:){1,7}:|' + @@ -305,13 +287,13 @@ module openconfig-inet-types { type string { length "1..253"; pattern - '(((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '^((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + - '|\.)'; + '|\.$'; oc-ext:posix-pattern - '^(((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '^((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + - '|\.)$'; + '|\.$'; } description "The domain-name type represents a DNS domain name. diff --git a/models/openconfig/public/release/models/types/openconfig-yang-types.yang b/models/openconfig/public/release/models/types/openconfig-yang-types.yang index 6e12fe84c542ec2349a91503146de457b487d43e..4021d9d5b89454443e55418cfd75da8bee2a1d32 100644 --- a/models/openconfig/public/release/models/types/openconfig-yang-types.yang +++ b/models/openconfig/public/release/models/types/openconfig-yang-types.yang @@ -32,15 +32,7 @@ module openconfig-yang-types { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "0.3.0"; - - revision "2021-03-02" { - description - "Fix date-and-time and date's pattern statement, and remove the - regexp-posix extension, which makes pattern statements conform to the - YANG standard."; - reference "0.3.0"; - } + oc-ext:openconfig-version "0.2.2"; revision "2020-06-30" { description @@ -79,14 +71,15 @@ module openconfig-yang-types { } // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; typedef dotted-quad { type string { - pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' + - '[0-9]|25[0-5])'; + '[0-9]|25[0-5])$'; oc-ext:posix-pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' + '[0-9]|25[0-5])$'; @@ -99,7 +92,7 @@ module openconfig-yang-types { typedef hex-string { type string { - pattern '[0-9a-fA-F]*'; + pattern '^[0-9a-fA-F]*$'; oc-ext:posix-pattern '^[0-9a-fA-F]*$'; } description @@ -134,13 +127,11 @@ module openconfig-yang-types { typedef date-and-time { type string { pattern - '[0-9]{4}\-(0[1-9]|1[0-2])\-(0[1-9]|[1-2][0-9]|3[0-1])T' + - '([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)' + - '(\.[0-9]+)?(Z|([+-]([0-1][0-9]|2[0-3]):[0-5][0-9]))'; + '^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}' + + '(\.[0-9]+)?Z[+-][0-9]{2}:[0-9]{2}$'; oc-ext:posix-pattern - '^[0-9]{4}\-(0[1-9]|1[0-2])\-(0[1-9]|[1-2][0-9]|3[0-1])T' + - '([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)' + - '(\.[0-9]+)?(Z|([+-]([0-1][0-9]|2[0-3]):[0-5][0-9]))$'; + '^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}' + + '(\.[0-9]+)?Z[+-][0-9]{2}:[0-9]{2}$'; } description "A date and time, expressed in the format described in RFC3339. @@ -168,9 +159,8 @@ module openconfig-yang-types { typedef date { type string { - pattern '[0-9]{4}\-(0[1-9]|1[0-2])\-(0[1-9]|[1-2][0-9]|3[0-1])'; - oc-ext:posix-pattern - '^[0-9]{4}\-(0[1-9]|1[0-2])\-(0[1-9]|[1-2][0-9]|3[0-1])$'; + pattern '^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$'; + oc-ext:posix-pattern '^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$'; } description "A full UTC date, expressed in the format described in RFC3339. @@ -197,7 +187,7 @@ module openconfig-yang-types { typedef phys-address { type string { - pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + pattern '^([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?$'; oc-ext:posix-pattern '^([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?$'; } description @@ -207,7 +197,7 @@ module openconfig-yang-types { typedef mac-address { type string { - pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + pattern '^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'; oc-ext:posix-pattern '^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'; } description diff --git a/models/openconfig/public/release/models/vlan/.spec.yml b/models/openconfig/public/release/models/vlan/.spec.yml deleted file mode 100644 index 5f382eabdcdb26b5f5368288910d2ab573b9e03e..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/vlan/.spec.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: openconfig-vlan - docs: - - yang/vlan/openconfig-vlan-types.yang - - yang/vlan/openconfig-vlan.yang - - yang/interfaces/openconfig-interfaces.yang - - yang/interfaces/openconfig-if-aggregate.yang - - yang/interfaces/openconfig-if-ethernet.yang - build: - - yang/vlan/openconfig-vlan.yang - run-ci: true \ No newline at end of file diff --git a/models/openconfig/public/release/models/wifi/.spec.yml b/models/openconfig/public/release/models/wifi/.spec.yml deleted file mode 100644 index 33e44691814e6ad65751bc7fd2b72816ed057d9a..0000000000000000000000000000000000000000 --- a/models/openconfig/public/release/models/wifi/.spec.yml +++ /dev/null @@ -1,24 +0,0 @@ -- name: openconfig-access-points - docs: - - yang/wifi/openconfig-access-points.yang - - yang/wifi/openconfig-ap-interfaces.yang - - yang/wifi/openconfig-ap-manager.yang - - yang/wifi/openconfig-wifi-mac.yang - - yang/wifi/openconfig-wifi-phy.yang - - yang/wifi/openconfig-wifi-types.yang - build: - - yang/wifi/openconfig-access-points.yang - - yang/wifi/openconfig-ap-interfaces.yang - run-ci: true -- name: openconfig-ap-manager - docs: - - yang/wifi/openconfig-ap-manager.yang - build: - - yang/wifi/openconfig-ap-manager.yang - run-ci: true -- name: openconfig-wifi-types - docs: - - yang/wifi/openconfig-wifi-types.yang - build: - - yang/wifi/openconfig-wifi-types.yang - run-ci: true diff --git a/models/release/openconfig/models/bfd/arista-bfd-augments.yang b/models/release/openconfig/models/bfd/arista-bfd-augments.yang index 16c7e59ffaedec2ca82657c4330d4b9db79d01a4..ca495f3e2f2d9e9c55343dc30078358076aa202f 100644 --- a/models/release/openconfig/models/bfd/arista-bfd-augments.yang +++ b/models/release/openconfig/models/bfd/arista-bfd-augments.yang @@ -31,6 +31,14 @@ module arista-bfd-augments { Copyright (c) 2019 Arista Networks, Inc. All rights reserved."; + revision 2020-11-10 { + description + "change member-interface name type to string"; + } + revision 2020-08-11 { + description + "Use config oc-if:type path to be in accessible tree"; + } revision 2020-01-06 { description "Fixed namespaces in XPath expressions and removed unused imports."; @@ -179,7 +187,7 @@ module arista-bfd-augments { leaf per-member-link-mode { when "/oc-if:interfaces/oc-if:interface" + "[oc-if:name=current()/../../oc-bfd:interface-ref/oc-bfd:config/oc-bfd:interface]/" - + "oc-if:state/oc-if:type = 'ianaift:ieee8023adLag'" { + + "oc-if:config/oc-if:type = 'ianaift:ieee8023adLag'" { description "Include per-member link BFD only when the type of interface is a link aggregate."; @@ -192,7 +200,7 @@ module arista-bfd-augments { leaf enable-per-member { when "/oc-if:interfaces/oc-if:interface" + "[oc-if:name=current()/../../oc-bfd:interface-ref/oc-bfd:config/oc-bfd:interface]/" - + "oc-if:state/oc-if:type = 'ianaift:ieee8023adLag'" { + + "oc-if:config/oc-if:type = 'ianaift:ieee8023adLag'" { description "Include per-member link BFD only when the type of interface is a link aggregate."; @@ -205,7 +213,7 @@ module arista-bfd-augments { leaf enable-echo { when "/oc-if:interfaces/oc-if:interface" + "[oc-if:name=current()/../../oc-bfd:interface-ref/oc-bfd:config/oc-bfd:interface]/" - + "oc-if:state/oc-if:type = 'ianaift:ieee8023adLag'" { + + "oc-if:config/oc-if:type = 'ianaift:ieee8023adLag'" { description "Include per-member link BFD only when the type of interface is a link aggregate."; @@ -218,7 +226,7 @@ module arista-bfd-augments { leaf-list remote-address { when "/oc-if:interfaces/oc-if:interface" + "[oc-if:name=current()/../../oc-bfd:interface-ref/oc-bfd:config/oc-bfd:interface]/" - + "oc-if:state/oc-if:type = 'ianaift:ieee8023adLag'" { + + "oc-if:config/oc-if:type = 'ianaift:ieee8023adLag'" { description "Define remote-address only when the type of interface is a link aggregate."; } @@ -274,13 +282,9 @@ module arista-bfd-augments { list micro-bfd-session { key "member-interface"; leaf member-interface { - type leafref { - path "/oc-if:interfaces/" - + "oc-if:interface/oc-if:config/oc-if:name"; - } + type string; description - "A reference to the member interface of the link - aggregate."; + "Member interface of the link aggregate."; } container state { config false; diff --git a/models/release/openconfig/models/interfaces/arista-intf-augments.yang b/models/release/openconfig/models/interfaces/arista-intf-augments.yang index 1bd3ffe02607bf49fcf175017209634fea5e8013..19bb3d92615e15041ba98f0e534daed5857866a7 100644 --- a/models/release/openconfig/models/interfaces/arista-intf-augments.yang +++ b/models/release/openconfig/models/interfaces/arista-intf-augments.yang @@ -40,6 +40,10 @@ module arista-intf-augments { Copyright (c) 2017 Arista Networks, Inc. All rights reserved."; + revision 2020-08-10 { + description + "Use config oc-if:type path to be in accessible tree"; + } revision 2020-05-13 { description "Remove augmentations for 200G and 400G ethernet speeds, as @@ -205,7 +209,7 @@ module arista-intf-augments { } augment "/oc-if:interfaces/oc-if:interface/oc-lag:aggregation/oc-vlan:switched-vlan/oc-vlan:config" { - when "../../../oc-if:state/oc-if:type = 'ift:ieee8023adLag'" { + when "../../../oc-if:config/oc-if:type = 'ift:ieee8023adLag'" { description "Active when the interface is a LAG"; } @@ -215,7 +219,7 @@ module arista-intf-augments { } augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/oc-vlan:switched-vlan/oc-vlan:config" { - when "../../../oc-if:state/oc-if:type = 'ift:ethernetCsmacd'" { + when "../../../oc-if:config/oc-if:type = 'ift:ethernetCsmacd'" { description "Active when the interface is Ethernet"; } diff --git a/models/release/openconfig/models/not-supported/arista-interfaces-notsupported-deviations.yang b/models/release/openconfig/models/not-supported/arista-interfaces-notsupported-deviations.yang index 2593584a52826839fda8010f9a32a0ca5252bc72..62075b60de835ab8b54515d987df37ca6327d970 100644 --- a/models/release/openconfig/models/not-supported/arista-interfaces-notsupported-deviations.yang +++ b/models/release/openconfig/models/not-supported/arista-interfaces-notsupported-deviations.yang @@ -36,6 +36,10 @@ module arista-interfaces-notsupported-deviations { "This module contains OpenConfig interfaces deviations in Arista EOS. Copyright (c) 2020 Arista Networks, Inc. All rights reserved."; + revision 2020-09-08 { + description + "Not-supported deviations file."; + } revision 2020-03-27 { description "Not-supported deviations file."; @@ -97,6 +101,12 @@ module arista-interfaces-notsupported-deviations { deviate not-supported; } + deviation "/oc-if:interfaces/oc-if:interface/oc-if:state/oc-if:loopback-mode" { + description + "Not-supported deviation."; + deviate not-supported; + } + deviation "/oc-if:interfaces/oc-if:interface/oc-if:state/oc-transceiver:physical-channel" { description "Not-supported deviation."; diff --git a/models/release/openconfig/models/not-supported/arista-network-instance-notsupported-deviations.yang b/models/release/openconfig/models/not-supported/arista-network-instance-notsupported-deviations.yang index 5d40f7bab5a2dceb1cc4971a1e80eed2b38afdc0..0923843214a2204aeada8eb64150a6f7270aa6fe 100644 --- a/models/release/openconfig/models/not-supported/arista-network-instance-notsupported-deviations.yang +++ b/models/release/openconfig/models/not-supported/arista-network-instance-notsupported-deviations.yang @@ -21,7 +21,19 @@ module arista-network-instance-notsupported-deviations { "This module contains OpenConfig network-instance deviations in Arista EOS. Copyright (c) 2020 Arista Networks, Inc. All rights reserved."; - revision 2020-07-31 { + revision 2020-09-01 { + description + "Not-supported deviations file."; + } + revision 2020-08-27 { + description + "Not-supported deviations file."; + } + revision 2020-08-11 { + description + "Not-supported deviations file."; + } + revision 2020-08-06 { description "Not-supported deviations file."; } @@ -268,25 +280,19 @@ module arista-network-instance-notsupported-deviations { deviate not-supported; } - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:mpls/oc-netinst:global/oc-netinst:interface-attributes" { - description - "Not-supported deviation."; - deviate not-supported; - } - - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:mpls/oc-netinst:global/oc-netinst:state" { + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:mpls/oc-netinst:global/oc-netinst:config" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:mpls/oc-netinst:global/oc-netinst:config/oc-netinst:pw-encapsulation" { + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:mpls/oc-netinst:global/oc-netinst:interface-attributes" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:mpls/oc-netinst:global/oc-netinst:config/oc-netinst:ttl-propagation" { + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:mpls/oc-netinst:global/oc-netinst:state" { description "Not-supported deviation."; deviate not-supported; @@ -364,43 +370,19 @@ module arista-network-instance-notsupported-deviations { deviate not-supported; } - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:encapsulate-gre" { - description - "Not-supported deviation."; - deviate not-supported; - } - - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:config/oc-netinst:network-instance" { + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:config" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:config/oc-netinst:next-hop" { - description - "Not-supported deviation."; - deviate not-supported; - } - - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:config/oc-netinst:path-selection-group" { - description - "Not-supported deviation."; - deviate not-supported; - } - - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:state/oc-netinst:network-instance" { - description - "Not-supported deviation."; - deviate not-supported; - } - - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:state/oc-netinst:next-hop" { + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:encapsulate-gre" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:state/oc-netinst:path-selection-group" { + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:policy-forwarding/oc-netinst:policies/oc-netinst:policy/oc-netinst:rules/oc-netinst:rule/oc-netinst:action/oc-netinst:state" { description "Not-supported deviation."; deviate not-supported; @@ -754,6 +736,30 @@ module arista-network-instance-notsupported-deviations { deviate not-supported; } + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:neighbors/oc-netinst:neighbor/oc-netinst:apply-policy/oc-netinst:config/oc-netinst:default-export-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:neighbors/oc-netinst:neighbor/oc-netinst:apply-policy/oc-netinst:config/oc-netinst:default-import-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:neighbors/oc-netinst:neighbor/oc-netinst:apply-policy/oc-netinst:state/oc-netinst:default-export-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:neighbors/oc-netinst:neighbor/oc-netinst:apply-policy/oc-netinst:state/oc-netinst:default-import-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:neighbors/oc-netinst:neighbor/oc-netinst:route-reflector/oc-netinst:state/oc-netinst:route-reflector-cluster-id" { description "Not-supported deviation."; @@ -982,6 +988,30 @@ module arista-network-instance-notsupported-deviations { deviate not-supported; } + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:peer-groups/oc-netinst:peer-group/oc-netinst:apply-policy/oc-netinst:config/oc-netinst:default-export-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:peer-groups/oc-netinst:peer-group/oc-netinst:apply-policy/oc-netinst:config/oc-netinst:default-import-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:peer-groups/oc-netinst:peer-group/oc-netinst:apply-policy/oc-netinst:state/oc-netinst:default-export-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:peer-groups/oc-netinst:peer-group/oc-netinst:apply-policy/oc-netinst:state/oc-netinst:default-import-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:peer-groups/oc-netinst:peer-group/oc-netinst:config/oc-netinst:route-flap-damping" { description "Not-supported deviation."; @@ -1330,6 +1360,18 @@ module arista-network-instance-notsupported-deviations { deviate not-supported; } + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:segment-routing/oc-netinst:te-policies/oc-netinst:te-policy/oc-netinst:candidate-paths/oc-netinst:candidate-path/oc-netinst:segment-lists/oc-netinst:segment-list/oc-netinst:sids/oc-netinst:sid/oc-netinst:state/oc-netinst:mpls-tc" { + description + "Not-supported deviation."; + deviate not-supported; + } + + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:segment-routing/oc-netinst:te-policies/oc-netinst:te-policy/oc-netinst:candidate-paths/oc-netinst:candidate-path/oc-netinst:segment-lists/oc-netinst:segment-list/oc-netinst:sids/oc-netinst:sid/oc-netinst:state/oc-netinst:mpls-ttl" { + description + "Not-supported deviation."; + deviate not-supported; + } + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:segment-routing/oc-netinst:te-policies/oc-netinst:te-policy/oc-netinst:candidate-paths/oc-netinst:candidate-path/oc-netinst:segment-lists/oc-netinst:segment-list/oc-netinst:state/oc-netinst:invalid-reason" { description "Not-supported deviation."; @@ -1516,6 +1558,12 @@ module arista-network-instance-notsupported-deviations { deviate not-supported; } + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:table-connections/oc-netinst:table-connection/oc-netinst:state/oc-netinst:default-import-policy" { + description + "Not-supported deviation."; + deviate not-supported; + } + deviation "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:table-connections/oc-netinst:table-connection/oc-netinst:state/oc-netinst:disable-metric-propagation" { description "Not-supported deviation."; diff --git a/models/release/openconfig/models/not-supported/arista-routing-policy-notsupported-deviations.yang b/models/release/openconfig/models/not-supported/arista-routing-policy-notsupported-deviations.yang index d9d4dee69883d5fef5804e736196c9de6936e6b3..aca3e890bd8ef6bc897c3e6ed5f97d4bab86a60f 100644 --- a/models/release/openconfig/models/not-supported/arista-routing-policy-notsupported-deviations.yang +++ b/models/release/openconfig/models/not-supported/arista-routing-policy-notsupported-deviations.yang @@ -21,6 +21,14 @@ module arista-routing-policy-notsupported-deviations { "This module contains OpenConfig routing-policy deviations in Arista EOS. Copyright (c) 2020 Arista Networks, Inc. All rights reserved."; + revision 2020-09-08 { + description + "Not-supported deviations file."; + } + revision 2020-08-11 { + description + "Not-supported deviations file."; + } revision 2020-02-07 { description "Not-supported deviations file."; @@ -78,6 +86,12 @@ module arista-routing-policy-notsupported-deviations { deviate not-supported; } + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:actions/oc-rpol:set-tag" { + description + "Not-supported deviation."; + deviate not-supported; + } + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:actions/oc-bgp-pol:bgp-actions/oc-bgp-pol:config/oc-bgp-pol:set-next-hop" { description "Not-supported deviation."; @@ -120,91 +134,85 @@ module arista-routing-policy-notsupported-deviations { deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:config/oc-bgp-pol:afi-safi-in" { - description - "Not-supported deviation."; - deviate not-supported; - } - - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:config/oc-bgp-pol:med-eq" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:match-neighbor-set" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:config/oc-bgp-pol:next-hop-in" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:match-tag-set" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:config/oc-bgp-pol:origin-eq" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:match-as-path-set" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:match-as-path-set/oc-bgp-pol:config/oc-bgp-pol:as-path-set" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:config/oc-bgp-pol:afi-safi-in" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:match-as-path-set/oc-bgp-pol:state/oc-bgp-pol:as-path-set" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:config/oc-bgp-pol:med-eq" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:state/oc-bgp-pol:afi-safi-in" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:config/oc-bgp-pol:next-hop-in" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:state/oc-bgp-pol:med-eq" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:config/oc-bgp-pol:origin-eq" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:state/oc-bgp-pol:next-hop-in" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:state/oc-bgp-pol:afi-safi-in" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:state/oc-bgp-pol:origin-eq" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:state/oc-bgp-pol:med-eq" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:config/oc-rpol:install-protocol-eq" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:state/oc-bgp-pol:next-hop-in" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:match-neighbor-set/oc-rpol:config/oc-rpol:neighbor-set" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-bgp-pol:bgp-conditions/oc-bgp-pol:state/oc-bgp-pol:origin-eq" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:match-neighbor-set/oc-rpol:state/oc-rpol:neighbor-set" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:config/oc-rpol:install-protocol-eq" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:match-tag-set/oc-rpol:config/oc-rpol:tag-set" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:match-prefix-set/oc-rpol:config/oc-rpol:match-set-options" { description "Not-supported deviation."; deviate not-supported; } - deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:match-tag-set/oc-rpol:state/oc-rpol:tag-set" { + deviation "/oc-rpol:routing-policy/oc-rpol:policy-definitions/oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/oc-rpol:conditions/oc-rpol:match-prefix-set/oc-rpol:state/oc-rpol:match-set-options" { description "Not-supported deviation."; deviate not-supported; diff --git a/models/third_party/README.md b/models/third_party/README.md deleted file mode 100644 index c40433129155f29d31d1888a2dacf08a6598ef01..0000000000000000000000000000000000000000 --- a/models/third_party/README.md +++ /dev/null @@ -1,7 +0,0 @@ -third_party -=========== - -third_party/ contains third-party dependencies from external sources that are required to build -OpenConfig models or documentation. - -Note that license and copyright for these dependencies are as described within each file. \ No newline at end of file diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index cb61f192d8b60c852140d8662331ba4af97ecc19..196e78b9400ce315c6cf8bbf8f4dfb156f8251bf 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -2,17 +2,14 @@ global: scrape_interval: 5s scrape_timeout: 3s -rule_files: - - alert.yml - scrape_configs: - job_name: services metrics_path: /metrics static_configs: - targets: - - 'prometheus:9090' - - 'gosdn:8080' - - 'orchestrator:9338' + - 'clab-thesis-prometheus:9090' + - 'clab-thesis-gosdn:8080' + - 'clab-thesis-orchestrator:9338' diff --git a/repository.go b/repository.go index 188ddd8b4e7598af1e46422cc439a75ccb234a7f..3a96d5c6d3250fa5add9f45a5b8477ef6bbdd1b7 100644 --- a/repository.go +++ b/repository.go @@ -55,13 +55,19 @@ func (r *repo) FindYANGFiles(models []*gpb.ModelData) ([]string, []error) { filePaths := make([]string, 0) errs := make([]error, 0) for _, model := range models { - path, err := searchYANGFile(r.fs, model.Name, model.Organization, model.Version) - if err != nil { - log.Error(err) - errs = append(errs, err) - continue + if !(strings.Contains(model.Name, "augments") || strings.Contains(model.Name, "deviations")) { + path, err := searchYANGFile(r.fs, model.Name, model.Organization, model.Version) + if err != nil { + log.Error(err) + errs = append(errs, err) + continue + } + filePaths = append(filePaths, path) + } else { + log.WithFields(log.Fields{ + "model": model.Name, + }).Info("augments and deviations are ignored") } - filePaths = append(filePaths, path) } return filePaths, errs } diff --git a/resources/csbi.go b/resources/csbi.go index 98f3a059412cda2485164cd810bade4af647d357..cc47f8aaf89accf731273ba65666d5907d0adb85 100644 --- a/resources/csbi.go +++ b/resources/csbi.go @@ -7,6 +7,7 @@ import ( "time" cpb "code.fbi.h-da.de/danet/api/go/gosdn/csbi" + goarista "code.fbi.h-da.de/danet/forks/goarista/gnmi" d "code.fbi.h-da.de/danet/gosdn/interfaces/device" "code.fbi.h-da.de/danet/gosdn/nucleus" "github.com/google/gnxi/gnmi" @@ -22,7 +23,7 @@ var device d.Device var transport *nucleus.Gnmi var controller string var id string -var listenPort = ":6030" +var listenPort = "6030" func init() { log.SetReportCaller(true) @@ -82,11 +83,17 @@ func newServer(model *gnmi.Model, config []byte) (*server, error) { // Get overrides the Get func of gnmi.Target to implement bridge func (s *server) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error) { + ctx = goarista.NewContext(ctx, &goarista.Config{ + Password: "admin", + Username: "admin", + }) resp, err := transport.GetPassthrough(ctx, req) if err != nil { + log.Error(err) return nil, err } if err := device.ProcessResponse(resp); err != nil { + log.Error(err) return nil, err } return resp, nil @@ -94,6 +101,10 @@ func (s *server) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, // Set overrides the Set func of gnmi.Target to implement bridge func (s *server) Set(ctx context.Context, req *pb.SetRequest) (*pb.SetResponse, error) { + ctx = goarista.NewContext(ctx, &goarista.Config{ + Password: "admin", + Username: "admin", + }) return transport.SetPassthrough(ctx, req) } @@ -102,7 +113,7 @@ func (s *server) Subscribe(stream pb.GNMI_SubscribeServer) error { } // Target starts a gNMI target listening on the specified port. -func Target(bindAddr string) error { +func Target(port string) error { model := gnmi.NewModel( ΓModelData, reflect.TypeOf((*Device)(nil)), @@ -119,7 +130,7 @@ func Target(bindAddr string) error { } pb.RegisterGNMIServer(g, s) reflection.Register(g) - + bindAddr := net.JoinHostPort("", port) log.Infof("starting to listen on %s", bindAddr) listen, err := net.Listen("tcp", bindAddr) if err != nil { diff --git a/resources/current.go.sum b/resources/current.go.sum new file mode 100644 index 0000000000000000000000000000000000000000..6b4895d09eb792868685416433477552bd8f2d8a --- /dev/null +++ b/resources/current.go.sum @@ -0,0 +1,164 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +code.fbi.h-da.de/danet/api v0.2.5-0.20210722102157-e7e463162450 h1:gImcnMybH6KceaLQzbD2FDjV0kRL88WobBDQVH92d9o= +code.fbi.h-da.de/danet/api v0.2.5-0.20210722102157-e7e463162450/go.mod h1:kjazkgCFLje+z4BBNBLlyozhQUnkJd0sqlZz1Axe0wM= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= +github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/protobuf v3.11.4+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM= +github.com/google/protobuf v3.14.0+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/openconfig/gnmi v0.0.0-20200414194230-1597cc0f2600/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A= +github.com/openconfig/gnmi v0.0.0-20200508230933-d19cebf5e7be/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A= +github.com/openconfig/gnmi v0.0.0-20210527163611-d3a3e30199da/go.mod h1:H/20NXlnWbCPFC593nxpiKJ+OU//7mW7s7Qk7uVdg3Q= +github.com/openconfig/gnmi v0.0.0-20210707145734-c69a5df04b53 h1:xT/AVinvSf+uP/amEFrU1JJYBZXqikEyNtBPnfyefoE= +github.com/openconfig/gnmi v0.0.0-20210707145734-c69a5df04b53/go.mod h1:h365Ifq35G6kLZDQlRvrccTt2LKK90VpjZLMNGxJRYc= +github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU= +github.com/openconfig/goyang v0.2.2/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= +github.com/openconfig/goyang v0.2.9 h1:Z95LskKYk6nBYOxHtmJCu3YEKlr3pJLWG1tYAaNh3yU= +github.com/openconfig/goyang v0.2.9/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= +github.com/openconfig/gribi v0.1.1-0.20210423184541-ce37eb4ba92f/go.mod h1:OoH46A2kV42cIXGyviYmAlGmn6cHjGduyC2+I9d/iVs= +github.com/openconfig/grpctunnel v0.0.0-20210610163803-fde4a9dc048d/go.mod h1:x9tAZ4EwqCQ0jI8D6S8Yhw9Z0ee7/BxWQX0k0Uib5Q8= +github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs= +github.com/openconfig/ygot v0.10.4/go.mod h1:oCQNdXnv7dWc8scTDgoFkauv1wwplJn5HspHcjlxSAQ= +github.com/openconfig/ygot v0.12.0 h1:7WJ+BR2D8rM3eMbPVKWS/4Amiu+oRb3PC0gT4E23BQA= +github.com/openconfig/ygot v0.12.0/go.mod h1:kJN0yCXIH07dOXvNBEFm3XxXdnDD5NI6K99tnD5x49c= +github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200519141106-08726f379972/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d h1:HV9Z9qMhQEsdlvxNFELgQ11RkMzO3CMkjEySjCtuLes= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/resources/go.mod b/resources/go.mod index a9f75c6645a977d43f32df4c13eb4afd58241a25..c23da24409a0e1a26bc389ad848b935c0ac78843 100644 --- a/resources/go.mod +++ b/resources/go.mod @@ -3,13 +3,14 @@ module code.fbi.h-da.de/danet/csbi-autogen go 1.16 require ( - code.fbi.h-da.de/danet/api v0.2.5-0.20210710121641-95bb981d8c97 - code.fbi.h-da.de/danet/gosdn v0.0.3-0.20210710180612-63c55de5d87e + code.fbi.h-da.de/danet/api v0.2.5-0.20210722102157-e7e463162450 + code.fbi.h-da.de/danet/forks/goarista v0.0.0-20210709163519-47ee8958ef40 + code.fbi.h-da.de/danet/gosdn v0.0.3-0.20210922181718-b090f39fc0c8 github.com/google/gnxi v0.0.0-20210423111716-4b504ef806a7 github.com/google/uuid v1.2.0 github.com/openconfig/gnmi v0.0.0-20210707145734-c69a5df04b53 - github.com/openconfig/goyang v0.2.7 - github.com/openconfig/ygot v0.11.2 + github.com/openconfig/goyang v0.2.9 + github.com/openconfig/ygot v0.12.0 github.com/sirupsen/logrus v1.8.1 github.com/spf13/viper v1.7.1 google.golang.org/grpc v1.39.0 diff --git a/resources/go.sum b/resources/go.sum index 34f25101269978d9ba8b92c949da5c107a0d1f37..ae7a7957d5365137cf52c57262378cd0cee65005 100644 --- a/resources/go.sum +++ b/resources/go.sum @@ -5,48 +5,27 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -code.fbi.h-da.de/danet/api v0.2.5-0.20210710121641-95bb981d8c97 h1:eMztgiw9RhqLKvLOB+NxjEaHCIYTz5u6qzts0YzmbgA= -code.fbi.h-da.de/danet/api v0.2.5-0.20210710121641-95bb981d8c97/go.mod h1:kjazkgCFLje+z4BBNBLlyozhQUnkJd0sqlZz1Axe0wM= +code.fbi.h-da.de/danet/api v0.2.5-0.20210722102157-e7e463162450 h1:gImcnMybH6KceaLQzbD2FDjV0kRL88WobBDQVH92d9o= +code.fbi.h-da.de/danet/api v0.2.5-0.20210722102157-e7e463162450/go.mod h1:kjazkgCFLje+z4BBNBLlyozhQUnkJd0sqlZz1Axe0wM= code.fbi.h-da.de/danet/forks/goarista v0.0.0-20210709163519-47ee8958ef40 h1:x7rVYGqfJSMWuYBp+JE6JVMcFP03Gx0mnR2ftsgqjVI= code.fbi.h-da.de/danet/forks/goarista v0.0.0-20210709163519-47ee8958ef40/go.mod h1:uVe3gCeF2DcIho8K9CIO46uAkHW/lUF+fAaUX1vHrF0= code.fbi.h-da.de/danet/forks/google v0.0.0-20210709163519-47ee8958ef40 h1:B45k5tGEdjjdsKK4f+0dQoyReFmsWdwYEzHofA7DPM8= code.fbi.h-da.de/danet/forks/google v0.0.0-20210709163519-47ee8958ef40/go.mod h1:Uutdj5aA3jpzfNm3C8gt2wctYE6cRrdyZsILUgJ+tMY= -code.fbi.h-da.de/danet/gosdn v0.0.3-0.20210710180612-63c55de5d87e h1:JfmScByR+yFbGo15qo/e11Lfq0FX9Sg4eZWX2h9OJ0g= -code.fbi.h-da.de/danet/gosdn v0.0.3-0.20210710180612-63c55de5d87e/go.mod h1:JMNNRPfWPlMPFqnBrG8eun6CXfj3WOo4DD4srac874A= +code.fbi.h-da.de/danet/gosdn v0.0.3-0.20210922181718-b090f39fc0c8 h1:huxF+w4RWYeiGdvyLCI9zjf4N2DGR3Uvxbb1zeHUiPM= +code.fbi.h-da.de/danet/gosdn v0.0.3-0.20210922181718-b090f39fc0c8/go.mod h1:gLfdeloAHQAG1a2aIbdyLr8BHh9lt8YNrqLcDyfEMl0= code.fbi.h-da.de/danet/yang-models v0.1.0 h1:C658HkGYZSV5Eq5nY2NnC/PQPKp3BaTXwGZICCr0sqk= code.fbi.h-da.de/danet/yang-models v0.1.0/go.mod h1:0TNkzPA1OW9lF9ey18GQWcMd4ORvOfhhFOA/t0SjenM= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.4.15/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.28.0/go.mod h1:j/2xTrU39dlzBmsxF1eQ2/DdWrxyBCl6pzz7a81o/ZY= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -72,12 +51,12 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= @@ -86,11 +65,10 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -122,7 +100,6 @@ github.com/docker/docker v20.10.6+incompatible h1:oXI3Vas8TI8Eu/EjH4srKHJBVqraSz github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -132,8 +109,6 @@ github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -143,9 +118,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= @@ -156,49 +129,31 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20210429001901-424d2337a529 h1:2voWjNECnrZRbfwXxHB1/j8wa6xdKn85B5NzgVL/pTU= github.com/golang/glog v0.0.0-20210429001901-424d2337a529/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -224,31 +179,24 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/protobuf v3.11.4+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM= github.com/google/protobuf v3.14.0+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -260,7 +208,6 @@ github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= @@ -294,9 +241,6 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -314,13 +258,11 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -338,11 +280,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -354,12 +294,11 @@ github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0Q github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mholt/archiver/v3 v3.5.0/go.mod h1:qqTTPUK/HZPFgFQ/TJ3BzvTpF/dPtFVJXdQbCmeMxwc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -374,15 +313,12 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/moby v1.13.1/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= @@ -396,12 +332,9 @@ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtb github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= @@ -416,8 +349,9 @@ github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0 github.com/openconfig/goyang v0.2.2/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= github.com/openconfig/goyang v0.2.3/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= github.com/openconfig/goyang v0.2.5/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= -github.com/openconfig/goyang v0.2.7 h1:bWvqXzNekiyHR2eoNE1DWrS3zSQS3aNKl6V+BLQSRSU= github.com/openconfig/goyang v0.2.7/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= +github.com/openconfig/goyang v0.2.9 h1:Z95LskKYk6nBYOxHtmJCu3YEKlr3pJLWG1tYAaNh3yU= +github.com/openconfig/goyang v0.2.9/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= github.com/openconfig/gribi v0.1.1-0.20210423184541-ce37eb4ba92f/go.mod h1:OoH46A2kV42cIXGyviYmAlGmn6cHjGduyC2+I9d/iVs= github.com/openconfig/grpctunnel v0.0.0-20210610163803-fde4a9dc048d/go.mod h1:x9tAZ4EwqCQ0jI8D6S8Yhw9Z0ee7/BxWQX0k0Uib5Q8= github.com/openconfig/public v0.0.0-20210617063307-ed650bd969af/go.mod h1:yUxbtuG3OQ8eTwMtkvFhpd1eMZUXxLKxBqVth5Qn09U= @@ -425,8 +359,9 @@ github.com/openconfig/reference v0.0.0-20201210185750-72ca4cfd4abd/go.mod h1:ym2 github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs= github.com/openconfig/ygot v0.9.0/go.mod h1:oCQNdXnv7dWc8scTDgoFkauv1wwplJn5HspHcjlxSAQ= github.com/openconfig/ygot v0.10.4/go.mod h1:oCQNdXnv7dWc8scTDgoFkauv1wwplJn5HspHcjlxSAQ= -github.com/openconfig/ygot v0.11.2 h1:J5HTV1BtNZoc8LHDUpgA33rhccEIds81S32G2qgIDJY= github.com/openconfig/ygot v0.11.2/go.mod h1:5q5fz1SDPGUwMyzbm8Ns2Krul+32euNSU89ZmrGrSK8= +github.com/openconfig/ygot v0.12.0 h1:7WJ+BR2D8rM3eMbPVKWS/4Amiu+oRb3PC0gT4E23BQA= +github.com/openconfig/ygot v0.12.0/go.mod h1:kJN0yCXIH07dOXvNBEFm3XxXdnDD5NI6K99tnD5x49c= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -444,7 +379,6 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -464,12 +398,14 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -478,6 +414,7 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.18.0 h1:WCVKW7aL6LEe1uryfI9dnEc2ZqNB1Fn0ok930v0iL1Y= github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -486,6 +423,7 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -514,7 +452,6 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.4.1 h1:asw9sl74539yqavKaglDM5hFpdJVK0Y5Dr/JOgQ89nQ= github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -526,7 +463,6 @@ github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSW github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -566,7 +502,6 @@ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMx github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE= github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -577,7 +512,6 @@ go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -592,13 +526,11 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -608,11 +540,6 @@ golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -622,17 +549,12 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -652,16 +574,9 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -670,7 +585,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= @@ -679,7 +593,6 @@ golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -705,24 +618,14 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -732,7 +635,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -741,8 +643,6 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -769,7 +669,6 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -778,24 +677,9 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -809,17 +693,11 @@ google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -830,15 +708,6 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200519141106-08726f379972/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= @@ -889,7 +758,6 @@ gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPA gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -897,7 +765,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -925,20 +792,6 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= -k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/resources/plugin_deps.json b/resources/plugin_deps.json index 74305645184bc8ca096605b6b8b742c2c750f893..189bd61331fe7e46bd7c3bf708097c5dceed0f17 100644 --- a/resources/plugin_deps.json +++ b/resources/plugin_deps.json @@ -3,77 +3,132 @@ "go_version": "1.16", "dependencies": [ { - "name":"code.fbi.h-da.de/danet/api", - "version":"0.2.5-0.20210722102157-e7e463162450" + "name": "code.fbi.h-da.de/danet/api", + "version": "0.2.5-0.20210722102157-e7e463162450" }, { - "name":"github.com/google/uuid", - "version":"1.2.0" + "name": "github.com/google/uuid", + "version": "1.2.0" }, { - "name":"github.com/openconfig/gnmi", - "version":"0.0.0-20210707145734-c69a5df04b53" + "name": "github.com/openconfig/gnmi", + "version": "0.0.0-20210707145734-c69a5df04b53" }, { - "name":"github.com/openconfig/goyang", - "version":"0.2.7" + "name": "github.com/openconfig/goyang", + "version": "0.2.9" }, { - "name":"github.com/openconfig/ygot", - "version":"0.11.2" + "name": "code.fbi.h-da.de/danet/forks/google", + "version": "0.0.0-20210709163519-47ee8958ef40" + }, + { + "name": "code.fbi.h-da.de/danet/yang-models", + "version": "0.1.0" + }, + { + "name": "github.com/openconfig/ygot", + "version": "0.12.0" }, { "name": "github.com/sirupsen/logrus", - "version":"1.8.1" + "version": "1.8.1" + }, + { + "name": "github.com/stretchr/objx", + "version": "0.2.0" + }, + { + "name": "golang.org/x/exp", + "version": "0.0.0-20191030013958-a1ab85dbe136" + }, + { + "name": "gopkg.in/yaml.v3", + "version": "3.0.0-20210107192922-496545a6307b" + }, + { + "name": "cloud.google.com/go", + "version": "0.46.3" + }, + { + "name": "google.golang.org/appengine", + "version": "1.6.1" }, { - "name":"github.com/stretchr/objx", - "version":"0.2.0" + "name": "github.com/google/go-cmp", + "version": "0.5.6" }, { - "name":"golang.org/x/exp", - "version":"0.0.0-20191030013958-a1ab85dbe136" + "name": "github.com/golang/mock", + "version": "1.3.1" }, { - "name":"gopkg.in/yaml.v3", - "version":"3.0.0-20210107192922-496545a6307b" + "name": "github.com/prometheus/client_model", + "version": "0.2.0" }, { - "name":"cloud.google.com/go", - "version":"0.46.3" + "name": "gopkg.in/yaml.v2", + "version": "2.4.0" }, { - "name":"google.golang.org/appengine", - "version":"1.6.1" + "name": "golang.org/x/crypto", + "version": "0.0.0-20210220033148-5ea612d1eb83" }, { - "name":"github.com/google/go-cmp", - "version":"0.5.6" + "name": "gopkg.in/check.v1", + "version": "1.0.0-20201130134442-10cb98267c6c" }, { - "name":"github.com/golang/mock", - "version":"1.3.1" + "name": "honnef.co/go/tools", + "version": "0.0.1-2019.2.3" }, { - "name":"github.com/prometheus/client_model", - "version":"0.2.0" + "name": "github.com/prometheus/client_model", + "version": "0.2.0" }, { - "name":"gopkg.in/yaml.v2", - "version":"2.4.0" + "name": "golang.org/x/sync", + "version": "0.0.0-20210220032951-036812b2e83c" }, { - "name":"golang.org/x/crypto", - "version":"0.0.0-20210220033148-5ea612d1eb83" + "name": "google.golang.org/protobuf", + "version": "1.27.1" }, { - "name":"gopkg.in/check.v1", - "version":"1.0.0-20201130134442-10cb98267c6c" + "name": "github.com/stretchr/testify", + "version": "1.7.0" }, { - "name":"honnef.co/go/tools", - "version":"0.0.1-2019.2.3" + "name": "github.com/golang/glog", + "version": "0.0.0-20210429001901-424d2337a529" }, - {"name":"golang.org/x/lint","version":"0.0.0-20210508222113-6edffad5e616"},{"name":"golang.org/x/sync","version":"0.0.0-20210220032951-036812b2e83c"},{"name":"golang.org/x/tools","version":"0.1.4"},{"name":"golang.org/x/xerrors","version":"0.0.0-20200804184101-5ec99f83aff1"},{"name":"cloud.google.com/go","version":"0.46.3"},{"name":"github.com/golang/mock","version":"1.3.1"},{"name":"github.com/golang/glog","version":"0.0.0-20210429001901-424d2337a529"},{"name":"github.com/prometheus/client_model","version":"0.2.0"},{"name":"github.com/stretchr/objx","version":"0.2.0"},{"name":"golang.org/x/crypto","version":"0.0.0-20210220033148-5ea612d1eb83"},{"name":"golang.org/x/oauth2","version":"0.0.0-20200107190931-bf48bf16ab8d"},{"name":"google.golang.org/appengine","version":"1.6.1"},{"name":"google.golang.org/protobuf","version":"1.27.1"},{"name":"honnef.co/go/tools","version":"0.0.1-2019.2.3"},{"name":"golang.org/x/sys","version":"0.0.0-20210630005230-0f9fa26af87c"},{"name":"google.golang.org/genproto","version":"0.0.0-20210708141623-e76da96a951f"},{"name":"gopkg.in/check.v1","version":"1.0.0-20201130134442-10cb98267c6c"},{"name":"github.com/stretchr/testify","version":"1.7.0"},{"name":"google.golang.org/grpc","version":"1.39.0"},{"name":"github.com/envoyproxy/go-control-plane","version":"0.9.9-0.20210512163311-63b5d3c536b0"},{"name":"golang.org/x/exp","version":"0.0.0-20191030013958-a1ab85dbe136"} + { + "name": "golang.org/x/tools", + "version": "0.1.4" + }, + { + "name": "google.golang.org/grpc", + "version": "1.39.0" + }, + { + "name": "golang.org/x/lint", + "version": "0.0.0-20210508222113-6edffad5e616" + }, + { + "name": "github.com/envoyproxy/go-control-plane", + "version": "0.9.9-0.20210512163311-63b5d3c536b0" + }, + { + "name": "golang.org/x/oauth2", + "version": "0.0.0-20200107190931-bf48bf16ab8d" + }, + { + "name": "golang.org/x/sys", + "version": "0.0.0-20210630005230-0f9fa26af87c" + }, + { + "name": "google.golang.org/genproto", + "version": "0.0.0-20210708141623-e76da96a951f" + } ] -} +} \ No newline at end of file diff --git a/test.clab.yml b/test.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..60f1dfe4bd2a89a029c505e7c7e69ef10e671baf --- /dev/null +++ b/test.clab.yml @@ -0,0 +1,36 @@ +name: thesis + +mgmt: + network: testbed + ipv4_subnet: 172.100.0.0/16 # ipv4 range + ipv6_subnet: 2001:db8::/64 + +topology: + nodes: + gnmi-target: + kind: linux + image: registry.code.fbi.h-da.de/danet/gnmi-target + orchestrator: + kind: linux + image: registry.code.fbi.h-da.de/danet/csbi + binds: + - /var/run/docker.sock:/var/run/docker.sock + - ./.csbi.yaml:/etc/.csbi.yaml + cmd: --config /etc/.csbi.yaml --log-level debug + executor: + kind: linux + image: registry.code.fbi.h-da.de/danet/csbi/executor + binds: + - ./clab-thesis:/out + gosdn: + kind: linux + image: registry.code.fbi.h-da.de/danet/gosdn:thesis-mk + ports: + - "55055:55055" + - "8080:8080" + env: + GOSDN_LOG: trace + cmd: --csbi-orchestrator clab-thesis-orchestrator:55056 + ceos: + kind: ceos + image: registry.code.fbi.h-da.de/danet/gosdn/ceos \ No newline at end of file diff --git a/validate.sh b/validate.sh new file mode 100755 index 0000000000000000000000000000000000000000..3ce9fe867f637754ed945dcb72f452d41808536e --- /dev/null +++ b/validate.sh @@ -0,0 +1,6 @@ +#!/bin/zsh +rm pyang.log +for line in "${(@f)"$(<./yangpaths.txt)"}" +{ + pyang --plugindir ~/yang/oc-pyang/openconfig_pyang/plugins --oc-only ${line} -p ./models &>> pyang.log +} \ No newline at end of file diff --git a/write.go b/write.go index e418ba873abb787d822cedb070d9b6af3b4fb91a..2b37cfe08e0a85bc0693506180ff9a94c5e0b865 100644 --- a/write.go +++ b/write.go @@ -7,6 +7,7 @@ import ( "fmt" "html/template" "io/fs" + "net" "os" "os/exec" "path/filepath" @@ -41,6 +42,14 @@ func write(ctx context.Context, code *ygen.GeneratedGoCode, path string, sbiType } } +func removePort(ip net.Addr) (string, error) { + addr, ok := ip.(*net.TCPAddr) + if !ok { + return "", fmt.Errorf("invalid type assertion") + } + return addr.IP.String(), nil +} + func writeCsbi(ctx context.Context, code *ygen.GeneratedGoCode, path string) error { p, ok := peer.FromContext(ctx) if !ok || p == nil { @@ -48,12 +57,16 @@ func writeCsbi(ctx context.Context, code *ygen.GeneratedGoCode, path string) err log.Error(e) return status.Errorf(codes.Aborted, "%v", e) } - controller := strings.Split(p.Addr.String(), ":")[0] + controller, err := removePort(p.Addr) + if err != nil { + log.Error(err) + return status.Errorf(codes.Aborted, "%v", err) + } target := ctx.Value("target-address") writerViper := viper.New() writerViper.Set("uuid", path) - writerViper.Set("controller", controller+":55055") + writerViper.Set("controller", net.JoinHostPort(controller, "55055")) writerViper.Set("target", target) if err := writerViper.WriteConfigAs(filepath.Join(path, ".csbi.toml")); err != nil { diff --git a/ygot.sh b/ygot.sh new file mode 100755 index 0000000000000000000000000000000000000000..fb791bc1c5cd1d52c5e7620973f42d6b9bbaec25 --- /dev/null +++ b/ygot.sh @@ -0,0 +1,6 @@ +#!/bin/zsh +rm yangpaths.txt +for line in "${(@f)"$(<./arista.capabilities)"}" +{ + find models/ | grep ${line}.yang >> yangpaths.txt +} \ No newline at end of file