|
| 1 | +module netopeer-notifications { |
| 2 | + namespace "urn:cesnet:netopeer-notifcations"; |
| 3 | + prefix npn; |
| 4 | + |
| 5 | + yang-version 1.1; |
| 6 | + |
| 7 | + import ietf-datastores { |
| 8 | + prefix ds; |
| 9 | + } |
| 10 | + |
| 11 | + import ietf-netconf-notifications { |
| 12 | + prefix ncn; |
| 13 | + } |
| 14 | + |
| 15 | + organization |
| 16 | + "CESNET"; |
| 17 | + |
| 18 | + contact |
| 19 | + "Author: Michal Vasko |
| 20 | + <mvasko@cesnet.cz>"; |
| 21 | + |
| 22 | + description |
| 23 | + "Netopeer2 NETCONF server YANG notifications."; |
| 24 | + |
| 25 | + revision "2025-01-15" { |
| 26 | + description |
| 27 | + "Initial revision."; |
| 28 | + } |
| 29 | + |
| 30 | + grouping session-type-params { |
| 31 | + description |
| 32 | + "Parameters to identify the type of NETCONF session."; |
| 33 | + |
| 34 | + leaf session-type { |
| 35 | + type enumeration { |
| 36 | + enum standard { |
| 37 | + description |
| 38 | + "Standard NETCONF session created by the client connecting to the listening server."; |
| 39 | + } |
| 40 | + enum call-home { |
| 41 | + description |
| 42 | + "Call-Home NETCONF session created by the server connecting to the listening client."; |
| 43 | + } |
| 44 | + } |
| 45 | + mandatory true; |
| 46 | + description |
| 47 | + "Distinguishes the type of session."; |
| 48 | + } |
| 49 | + } |
| 50 | + |
| 51 | + notification netconf-rpc-execution { |
| 52 | + description |
| 53 | + "NETCONF RPC is being executed."; |
| 54 | + |
| 55 | + choice stage-of-execution { |
| 56 | + mandatory true; |
| 57 | + description |
| 58 | + "Distinguishes between pre-execution and post-execution notifications."; |
| 59 | + |
| 60 | + leaf pre-execution { |
| 61 | + type empty; |
| 62 | + description |
| 63 | + "Notification sent before the RPC is executed."; |
| 64 | + } |
| 65 | + leaf post-execution { |
| 66 | + description |
| 67 | + "Notification sent after the RPC is executed."; |
| 68 | + type enumeration { |
| 69 | + enum success { |
| 70 | + description |
| 71 | + "RPC executed successfully."; |
| 72 | + } |
| 73 | + enum fail { |
| 74 | + description |
| 75 | + "RPC execution failed."; |
| 76 | + } |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + leaf name { |
| 82 | + type enumeration { |
| 83 | + enum get-config { |
| 84 | + description |
| 85 | + "ietf-netconf get-config RPC"; |
| 86 | + } |
| 87 | + enum edit-config { |
| 88 | + description |
| 89 | + "ietf-netconf edit-config RPC"; |
| 90 | + } |
| 91 | + enum copy-config { |
| 92 | + description |
| 93 | + "ietf-netconf copy-config RPC"; |
| 94 | + } |
| 95 | + enum delete-config { |
| 96 | + description |
| 97 | + "ietf-netconf delete-config RPC"; |
| 98 | + } |
| 99 | + enum lock { |
| 100 | + description |
| 101 | + "ietf-netconf lock RPC"; |
| 102 | + } |
| 103 | + enum unlock { |
| 104 | + description |
| 105 | + "ietf-netconf unlock RPC"; |
| 106 | + } |
| 107 | + enum get { |
| 108 | + description |
| 109 | + "ietf-netconf get RPC"; |
| 110 | + } |
| 111 | + enum kill-session { |
| 112 | + description |
| 113 | + "ietf-netconf kill-session RPC"; |
| 114 | + } |
| 115 | + enum commit { |
| 116 | + description |
| 117 | + "ietf-netconf commit RPC"; |
| 118 | + } |
| 119 | + enum discard-changes { |
| 120 | + description |
| 121 | + "ietf-netconf discard-changes RPC"; |
| 122 | + } |
| 123 | + enum cancel-commit { |
| 124 | + description |
| 125 | + "ietf-netconf cancel-commit RPC"; |
| 126 | + } |
| 127 | + enum validate { |
| 128 | + description |
| 129 | + "ietf-netconf validate RPC"; |
| 130 | + } |
| 131 | + |
| 132 | + enum get-schema { |
| 133 | + description |
| 134 | + "ietf-netconf-monitoring get-schema RPC"; |
| 135 | + } |
| 136 | + |
| 137 | + enum create-subscription { |
| 138 | + description |
| 139 | + "notifications create-subscription RPC"; |
| 140 | + } |
| 141 | + |
| 142 | + enum get-data { |
| 143 | + description |
| 144 | + "ietf-netconf-nmda get-data RPC"; |
| 145 | + } |
| 146 | + enum edit-data { |
| 147 | + description |
| 148 | + "ietf-netconf-nmda edit-data RPC"; |
| 149 | + } |
| 150 | + |
| 151 | + enum establish-subscription { |
| 152 | + description |
| 153 | + "ietf-subscribed-notifications establish-subscription RPC"; |
| 154 | + } |
| 155 | + enum modify-subscription { |
| 156 | + description |
| 157 | + "ietf-subscribed-notifications modify-subscription RPC"; |
| 158 | + } |
| 159 | + enum delete-subscription { |
| 160 | + description |
| 161 | + "ietf-subscribed-notifications delete-subscription RPC"; |
| 162 | + } |
| 163 | + enum kill-subscription { |
| 164 | + description |
| 165 | + "ietf-subscribed-notifications kill-subscription RPC"; |
| 166 | + } |
| 167 | + |
| 168 | + enum resync-subscription { |
| 169 | + description |
| 170 | + "ietf-yang-push resync-subscription RPC"; |
| 171 | + } |
| 172 | + } |
| 173 | + mandatory true; |
| 174 | + description |
| 175 | + "Name of the executed RPC."; |
| 176 | + } |
| 177 | + |
| 178 | + leaf datastore { |
| 179 | + type ds:datastore-ref; |
| 180 | + description |
| 181 | + "Affected datastore by the RPC, if relevant."; |
| 182 | + } |
| 183 | + } |
| 184 | + |
| 185 | + augment "/ncn:netconf-session-start" { |
| 186 | + uses session-type-params; |
| 187 | + } |
| 188 | + |
| 189 | + augment "/ncn:netconf-session-end" { |
| 190 | + uses session-type-params; |
| 191 | + } |
| 192 | +} |
0 commit comments