/* * Copyright (c) 2015 Cisco Systems, Inc. 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 */ module iovisor { yang-version 1; namespace "urn:opendaylight:groupbasedpolicy:iovisor"; prefix "iovisor"; import yang-ext {prefix ext; revision-date "2013-07-09";} import ietf-inet-types { prefix inet; revision-date 2013-07-15; } import endpoint { prefix endpoint; } import gbp-common { prefix gbp-common; } description "This module defines the group-based policy iovisor renderer model."; revision "2015-10-30" { description "Initial revision."; } typedef iovisor-module-id { /* * TODO Either convert this to URI or allow String but expect name:port where name will * resolved into ip:port (see iovisor-module grouping) */ description "Uniquely identifies the IOVisor module"; type string; } grouping iovisor-module { /* * TODO Convert this to leafs of IP(v4|v6) and port - easier to validate * For now assuming format "ip:port" */ leaf uri { type inet:uri; description "IOVisor module uniform resource identifier."; } } container iovisor-module-instances { description "IOVisor module inventory."; leaf base-url { type string; default "/policies"; } list iovisor-module-instance { key "id"; config true; description "This is a list of IOVisor modules."; leaf id { type iovisor-module-id; } uses iovisor-module; } } container iovisor-resolved-endpoints { description "IOvisor validated Endpoints"; config false; list iovisor-resolved-endpoint { key "l3-context ip-address"; uses endpoint:l3-key; } } container iovisor-modules-by-tenant-by-endpointgroup-id { config false; list iovisor-module-by-tenant-by-endpointgroup-id { key "tenant-id endpointgroup-id"; leaf tenant-id { type gbp-common:tenant-id; } leaf endpointgroup-id { type gbp-common:endpoint-group-id; } list iovisor-module-instance-id { key "id"; leaf id { type iovisor-module-id; } } } } container iovisor-resolved-endpoints-by-tenant-by-endpointgroup-id { config false; list iovisor-resolved-endpoint-by-tenant-by-endpointgroup-id { key "tenant-id endpointgroup-id"; leaf tenant-id { type gbp-common:tenant-id; } leaf endpointgroup-id { type gbp-common:endpoint-group-id; } list iovisor-endpoint { key "l3-context ip-address"; uses endpoint:l3-key; } } } augment "/endpoint:endpoints/endpoint:endpoint-l3" { description "Augmentation adding the IOVisor module location"; ext:augment-identifier "iovisor-module-augmentation"; uses iovisor-module; } augment "/endpoint:register-endpoint/endpoint:input" { description "Augmentation adding the IOVisor module location"; ext:augment-identifier "iovisor-module-augmentation-input"; uses iovisor-module; } }