Rework IOVisor model and validate IovisorModuleInstance on Endpoint created events
[groupbasedpolicy.git] / renderers / iovisor / src / main / yang / iovisor.yang
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 module iovisor {
10     yang-version 1;
11
12     namespace "urn:opendaylight:groupbasedpolicy:iovisor";
13     prefix "iovisor";
14
15     import yang-ext {prefix ext; revision-date "2013-07-09";}
16     import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
17     import endpoint { prefix endpoint; }
18
19     description
20         "This module defines the group-based policy iovisor renderer model.";
21
22     revision "2015-10-30" {
23         description
24                 "Initial revision.";
25     }
26
27     typedef iovisor-module-id {
28         description "Uniquely identifies the IOVisor module";
29         type string;
30     }
31
32     grouping iovisor-module {
33         leaf uri {
34             type inet:uri;
35             description "IOVisor module uniform resource identifier.";
36         }
37     }
38
39     container iovisor-module-instances {
40         description "IOVisor module inventory.";
41         list iovisor-module-instance {
42             key "id";
43             config true;
44             description "This is a list of IOVisor modules.";
45
46             leaf id {
47                 type iovisor-module-id;
48             }
49
50             uses iovisor-module;
51         }
52     }
53
54     augment "/endpoint:endpoints/endpoint:endpoint" {
55         description "Augmentation adding the IOVisor module location";
56         ext:augment-identifier "iovisor-module-augmentation";
57         uses iovisor-module;
58     }
59 }