aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-module-catalog.yang
blob: 673fe950b240ae4fc5011494237fa75e7499b9f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
module openconfig-module-catalog {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/module-catalog";

  prefix "oc-cat";

  // import some basic types
  import openconfig-inet-types { prefix oc-inet; }
  import openconfig-catalog-types { prefix oc-cat-types; }
  import openconfig-extensions { prefix oc-ext; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module provides a schema for cataloging and descrbing
    YANG models published across various organizations.  The catalog
    contains several categories of data:

    * organizations -- entities that publish and/or maintain
      individual YANG modules or groups of modules

    * modules -- information regarding individual YANG modules,
      including their versions, dependencies, submodules, and how
      to access them

    * release bundles -- groups of modules that are compatible and
      consistent with each other (as determined by the publisher of
      of the bundle).  The release bundle does not necessarily
      correspond to a functional area, e.g., it could the entire
      set of modules published by an organization

    * feature bundles -- sets of schema paths across a
      release bundle that provide a specific set of functionality

    * implementations -- information about available module and/or
      bundle implementations and their status";

  oc-ext:openconfig-version "0.2.1";

  revision "2017-05-01" {
    description
      "Fix to module dependency list";
    reference "0.2.1";
  }

  revision "2017-03-08" {
    description
      "OpenConfig public release";
    reference "0.2.0";
  }

  revision "2016-02-15" {
    description
      "Initial OpenConfig public release";
    reference "0.1.0";
  }



  // grouping statements

  grouping catalog-module-common-config {
    description
      "Data definitions common for both bundles and standalone
      modules";

    leaf name {
      type string;
      description
        "The name of the module or bundle.  For modules, this
        should reflect the 'module' or 'submodule'
        statement in the YANG module file.

        For bundles, this is the canonical name for the overall
        bundle of modules which is to be released together.
        This name should be consistent over multiple
        releases";
    }

    leaf version {
      type oc-cat-types:module-version-type;
      description
        "For individual modules, this is the version number, e.g.,
        a semantic version.  The version may be the same as the date
        indicated in the module revision statement.

        For bundles, this is a semantic version number for the
        overall bundle. This version is to be defined as per the
        approach specified in the OpenConfig semantic version
        guidance - and is of the form x.y.z, where x is the major
        version, y is the minor version, and z is the patch level";
      reference
        "Semantic versioning for OpenConfig models";
    }
  }

  grouping feature-bundle-included-reference {
    description
      "References to the included feature bundles";

    leaf name {
      type leafref {
        path "../../../../../../../organizations/" +
          "organization[name=current()/../publisher]/" +
            "feature-bundles/feature-bundle/name";
      }
      description
        "Name of the referenced feature bundle";
    }

    leaf publisher {
      type leafref {
        path "../../../../../../../organizations/organization/" +
          "name";
      }
      description
        "Publisher of the referenced feature bundle";
    }

    leaf version {
      type oc-cat-types:module-version-type;
      description
        "Version of the referenced feature bundle";
    }
  }

  grouping catalog-implementation-bundle-config {
    description
      "References to the feature bundles supported by an
      implementation";

    uses feature-bundle-included-reference;
  }

  grouping catalog-implementation-bundle-top {
    description
      "Top-level grouping for the list of feature bundles
      supported by an implementation";

    container feature-bundles {
      description
        "Enclosing container for the list of feature bundles";

      list feature-bundle {
        key "name version";
        description
          "List of feature bundles supported by the implementation";

        uses catalog-implementation-bundle-config;
      }
    }
  }

  grouping catalog-implementation-config {
    description
      "Data describing any available implementations";

    leaf id {
      type string;
      description
        "An identifier for the implementation, provided by the
        implementor.  This id should uniquely identify a specific
        implementation of the module, e.g., based on the vendor,
        platform, and platform version.";
    }

    leaf description {
      type string;
      description
        "A text summary of important information about the
        implementation";
    }

    leaf reference {
      type union {
        type oc-inet:uri;
        type string;
      }
      description
        "A URI (preferred) or text reference to more detailed
        information about the implementation.";
    }


    leaf platform {
      type string;
      description
        "Name of the platform on which the implementation
        is available -- this could be the model name of a network
        device, a server OS, etc.";
    }

    leaf platform-version {
      type string;
      description
        "Implementor-defined version name or number of the
        module implementation, corresponding to the platform.
        This could be the firmware version of a network device
        such as a router, OS version, or other server platform
        version.";
    }

    leaf status {
      type identityref {
        base oc-cat-types:IMPLEMENTATION_STATUS_TYPE;
      }
      description
        "Indicates the status of the implementation, e.g.,
        complete, partial, in-progress, etc.  Implementors
        may define additional values for the base identity";
    }
  }

  grouping catalog-implementation-top {
    description
      "Top level grouping for information on model implementations";

    container implementations {
      description
        "Container for module implementation information";

      list implementation {
        key "id";
        description
          "List of available implementations, keyed by an identifier
          provided by either the implementor or the module
          maintainer.  Such a key avoids needing a complex composite
          key to uniquely identify an implementation.";

        uses catalog-implementation-config;
        uses catalog-implementation-bundle-top;
      }
    }
  }

  grouping catalog-module-dependency-config {
    description
      "Information about module dependencies";


    leaf-list required-module {
      type string;
      description
        "List of names of modules that are imported by the
        current module.  This list should reflect all of the 'import'
        statements in the module.  Release bundles should be used to
        indicate which versions of the imported module are used
        (or are compatible) with the current module";
    }
  }

  grouping catalog-module-dependency-top {
    description
      "Top-level grouping for module dependency data";

    container dependencies {
      description
        "Data about dependencies of the module";

      uses catalog-module-dependency-config;
    }

  }

  grouping catalog-module-classification-config {
    description
      "Data describing the module's classification(s)";

    leaf category {
      type identityref {
        base oc-cat-types:MODULE_CATEGORY_BASE;
      }
      description
         "Categorization of the module based on identities defined
         or used by the publishing organizations.";
    }

    leaf subcategory {
      type identityref {
        base oc-cat-types:MODULE_SUBCATEGORY_BASE;
      }
      description
         "Sub-categorization of the module based on identities
          defined or used by the publishing organizations.";
    }

    leaf deployment-status {
      type identityref {
        base oc-cat-types:MODULE_STATUS_TYPE;
      }
      description
        "Deployment status of the module -- experimental,
        standards-track, production, etc.";
    }
  }

  grouping catalog-module-classification-top {
    description
      "Data definitions related to module classfications";

    container classification {
      description
        "Container for data describing the module's classification";

      uses catalog-module-classification-config;
    }
  }

  grouping catalog-module-access-config {
    description
      "Data pertaining to retrieval and usage of the module";

    leaf uri {
      type oc-inet:uri;
      description
        "URI where module can be downloaded.  Modules may be
        made available from the catalog maintainer, or directly
        from the publisher";
    }

    leaf md5-hash {
      type string;
      description
        "Optional MD5 hash of the module file.  If specified, the
        hash may be used by users to validate data integrity";
    }
  }

  grouping catalog-module-access-top {
    description
      "Top level groupig for data related to accessing a module
      or submodule";

    container access {
      description
        "Container for data pertaining to retrieval and usage of the
        module";

      uses catalog-module-access-config;
    }
  }

  grouping catalog-module-submodule-config {
    description
      "Data definitions for submodules belonging to a
      module";

    leaf name {
      type string;
      description
        "Name of the submodule as indicated by its top-level
        'submodule' statement";
    }

  }

  grouping catalog-module-submodule-top {
    description
      "Top-level grouping for submodule information";

    container submodules {
      description
        "Data for the submodules belonging to a submodule. If the
        module does not have any submodules, this container
        should be empty.";

      list submodule {
        key "name";
        description
          "List of submodules included by a module.  All submodules
          specified by 'include' statements in the module should be
          included in this list.";

        uses catalog-module-submodule-config;
        uses catalog-module-access-top;
      }
    }
  }

  grouping catalog-module-base-config {
    description
      "Basic information describing the module, e.g., the
      YANG metadata in the module preface.";


    leaf namespace {
      type string;
      description
        "Published namespace of module, i.e., defined by the
        'namespace' ";
    }

    leaf prefix {
      type string;
      description
        "Published prefix of the module";
    }

    leaf revision {
      type string;
      description
        "Date in the revision statement of the module";
    }

    leaf summary {
      type string;
      description
        "Summary description of the module";
    }
  }

  grouping release-bundle-member-config {
    description
      "Data for each member of a bundle";

    leaf id {
      type string;
      description
        "Identifier for the bundle member";
    }

    leaf type {
      type identityref {
        base oc-cat-types:CATALOG_MEMBER_TYPE;
      }
      description
        "The type of member that is to be included within the
        release bundle. Release bundles may include modules and
        other release bundles.  Both member modules and member
        bundles should specify the list of compatible versions.";
    }

    leaf module {
      when "../type = 'oc-cat-types:MODULE'" {
        description
          "The module name is specified for bundle membrs that are
          modules";
      }
      type leafref {
        path "../../../../../../../organizations/" +
          "organization[name=current()/../publisher]/modules/" +
          "module/name";
      }
      description
        "Name of the module set which is included in this bundle -
        for example, 'openconfig-bgp'";
    }

    leaf release-bundle {
      when "../type = 'oc-cat-types:RELEASE_BUNDLE'" {
        description
          "The release bundle is specified for bundle members that
          are release bundles";
      }
      type leafref {
        path "../../../../../../../organizations/" +
          "organization[name=current()/../publisher]/" +
            "release-bundles/release-bundle/name";
      }
      description
        "Name of the module set which is included in this bundle -
        for example, 'openconfig-bgp'";
    }

    leaf publisher {
      type leafref {
        path "../../../../../../../organizations/organization/" +
          "name";
      }
      description
        "Reference to the name of the publishing organization";
    }

    leaf-list compatible-versions {
      type oc-cat-types:module-version-type;
      description
        "A list of semantic version specification of the versions
        of the specified module or release bundle which are
        compatible when building this version of the bundle.

        Version specifications may be added when changes are made
        to a module within a bundle, and this does not affect the
        interaction between it and other modules. It is expected
        that backwards compatible changes to an individual module or
        member bundle do not affect the compatibility of that
        with other members, and hence wildcard matches are allowed
        within this list.";
    }
  }

  grouping release-bundle-member-top {

    description
      "Parameters relating to models within release bundles";

    container members {
      description
        "List of bundle members which make up this release bundle. A
        member is defined as an individual YANG module specified
        in the YANG catalogue, or another release
        bundle which can be used to group multiple YANG
        models together.";

      list member {
        key "id";
        description
          "A set of modules or bundles which are part of the bundle
          of models. For example, if 'ietf-yang-types' were to be
          specified within the bundle, then this would refer to the
          individual entry within the module catalogue. If the type
          of the entry is set to bundle, then for example,
          openconfig-bgp could be referenced - which itself consists
          of separate modules.";

        uses release-bundle-member-config;

      }
    }
  }

  grouping release-bundle-top {
    description
      "Top-level container for a release bundle";

    container release-bundles {
      description
        "List of release bundles";

      list release-bundle {
        key "name version";

        description
          "List of release bundles - sets of modules and/or
          bundles which are interoperable";

        uses catalog-module-common-config;
        uses release-bundle-member-top;
      }
    }
  }

  grouping feature-bundle-release-config {
    description
      "Data definitions to identify the release bundle that the
      feature bundle is based on.";

    leaf name {
      type leafref {
        path "../../../../release-bundles/release-bundle/name";
      }
      description
        "Reference to the name of the release bundle used for the
        feature paths.";
    }

    leaf version {
      type leafref {
        path "../../../../release-bundles/" +
          "release-bundle[name=current()/../name]/version";
      }
      description
        "Reference to the release bundle version used for the
        feature paths";
    }

    leaf publisher {
      type leafref {
        path "../../../../release-bundles/" +
          "release-bundle[name=current()/../name]/publisher";
      }
      description
        "Reference to the publisher of the release bundle used for
        the feature paths";
    }
  }

  grouping feature-bundle-release-top {
    description
      "Top-level grouping for data about the release bundle used
      to specify the feature bundle";

    container release-bundle {
      description
        "Data to identify the release bundle from which the feature
        paths should be specified.  If the feature crosses
        release bundles, a new release bundle should be
        created to support the feature bundle.";

      leaf name {
        type leafref {
          path "../../../../../../organizations/" +
            "organization[name=current()/../publisher]/" +
              "release-bundles/release-bundle/name";
        }
        description
          "Name of the module set which is included in this bundle -
          for example, 'openconfig-bgp'";
      }

      leaf publisher {
        type leafref {
          path "../../../../../../organizations/organization/" +
            "name";
        }
        description
          "Reference to the name of the publishing organization";
      }

      leaf version {
        type oc-cat-types:module-version-type;
        description
          "Version of the referenced release bundle";
      }
    }
  }


  grouping feature-bundle-config {
    description
      "Data definitions for the feature bundle";

    uses catalog-module-common-config;

    leaf-list path {
      type string;
      description
        "The list of schema paths included in the feature.  The
        paths specify subtrees, i.e., all data underneath the
        specified path are included in the feature.";
    }
  }

  grouping feature-bundle-feature-config {
    description
      "Data definitions for included feature bundles";

    uses feature-bundle-included-reference;
  }

  grouping feature-bundle-feature-top {
    description
      "Top level grouping for the list of included feature
      bundles";

    container feature-bundles {
      description
        "Enclosing container for the list of included feature
        bundles.  Feature bundles may be composed from other
        smaller feature units";

      list feature-bundle {
        key "name";
        description
          "The list of feature bundles included in the current
          feature bundle.";

        uses feature-bundle-feature-config;
      }
    }

  }


  grouping feature-bundle-top {
    description
      "Top-level grouping for OpenConfig feature bundles";

    container feature-bundles {
      description
        "Enclosing container for the list of feature bundles";

      list feature-bundle {
        key "name version";
        description
          "List of feature bundles";

        uses feature-bundle-config;
        uses feature-bundle-release-top;
        uses feature-bundle-feature-top;
      }
    }
  }

  grouping catalog-module-top {
    description
      "Top level structure of the module catalog";

    container modules {
      description
        "Modules published by this organization";

      list module {
        key "name version";
        description
          "List of published modules from the organization";

        uses catalog-module-common-config;
        uses catalog-module-base-config;
        uses catalog-module-classification-top;
        uses catalog-module-dependency-top;
        uses catalog-module-access-top;
        uses catalog-module-submodule-top;
      }
    }
  }

  grouping catalog-organization-config {
    description
      "Top level grouping for data related to an organization that
      publishes module, bundles, etc.";

    leaf name {
      type string;
      description
        "Name of the maintaining organization -- the name should be
        supplied in the official format used by the organization.
        Standards Body examples:
          IETF, IEEE, MEF, ONF, etc.
        Commercial entity examples:
          AT&T, Facebook, <Vendor>
        Name of industry forum examples:
          OpenConfig, OpenDaylight, ON.Lab";
    }

    leaf type {
      type identityref {
        base oc-cat-types:ORGANIZATION_TYPE;
      }
      description
        "Type of the publishing organization";
    }

    leaf contact {
      type string;
      description
        "Contact information for the publishing organization (web
        site, email address, etc.)";
    }
  }

  grouping catalog-organization-top {
    description
      "Top level grouping for list of maintaining organizations";

    container organizations {
      description
        "List of organizations owning modules";

      list organization {
        key "name";

        description
          "List of organizations publishing YANG modules or
          module bundles";

        uses catalog-organization-config;
        uses catalog-module-top;
        uses release-bundle-top;
        uses feature-bundle-top;
        uses catalog-implementation-top;
      }
    }
  }


  grouping catalog-top {
    description
      "Top-level grouping for the YANG model catalog";

    uses catalog-organization-top;
  }

  // data definition statements

  uses catalog-top;

}