module gnmi-yang-storage { yang-version 1; namespace "urn:opendaylight:gnmi:yang:storage"; prefix "gnmi-ys"; description "Model used for storing yang models from which schema contexts of gNMI devices are constructed. Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"; revision "2021-03-31" { description "Initial revision of gNMI yang storage model"; } typedef module-version-type { type string; description "This type defines acceptable formats for the version of a module. The version may be a semantic version, or a YANG revision statement date or a empty string if the module is not versioned. Examples: semver format: .. examples: 0.1.0, 2.1.0 revision format: YYYY-MM-DD example: 2016-11-31"; reference "gNMI Specification Section 2.6.1 The ModelData message"; } grouping yang-model-name-version { leaf name { description "Name of the yang model"; type string; } leaf version { description "Version of the yang model"; type module-version-type; } } grouping yang-model { uses yang-model-name-version; leaf body { description "Body of the yang model"; type string; } } container gnmi-yang-models { list gnmi-yang-model { key "name version"; config false; uses yang-model; } } rpc upload-yang-model { input { uses yang-model; } } }