X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Fyang%2Fnts-manager%2Fnetwork-topology-simulator.yang;h=203c9318b65aa166671c4031076be4f590e5b149;hb=048a8673d15e0329cd79594028f19ba315ba7140;hp=32570eb8f3161583762b7185009c4e149a6fc045;hpb=a19f893a70c03dee9312e1208301d079409d84ac;p=sim%2Fo1-interface.git diff --git a/ntsimulator/yang/nts-manager/network-topology-simulator.yang b/ntsimulator/yang/nts-manager/network-topology-simulator.yang index 32570eb..203c931 100644 --- a/ntsimulator/yang/nts-manager/network-topology-simulator.yang +++ b/ntsimulator/yang/nts-manager/network-topology-simulator.yang @@ -16,7 +16,24 @@ module network-topology-simulator { description "This module contains a collection of YANG definitions for managing the Network Topology Simulator."; - +revision 2020-05-14 { + description + "New RPC for generic NETCONF notification generation."; + reference + "O-RAN SC SIM project"; + } + revision 2020-04-22 { + description + "Add configuration for number of SSH and TLS connections exposed by each simulated device."; + reference + "O-RAN SC SIM project"; + } + revision 2020-04-13 { + description + "Change fault-notification-delay-period to leaf-list."; + reference + "O-RAN SC SIM project"; + } revision 2020-04-10 { description "Add notification count in status."; @@ -108,6 +125,11 @@ module network-topology-simulator { description "The Port of the SDN Controller."; } + leaf netconf-call-home-port { + type inet:port-number; + description + "The NETCONF Call Home Port of the SDN Controller."; + } leaf controller-username { type string; description @@ -183,6 +205,7 @@ module network-topology-simulator { } container simulator-config { + presence "Enables NTS configuration."; description "Configuration container of the simulator."; leaf simulated-devices { @@ -193,16 +216,28 @@ module network-topology-simulator { } leaf mounted-devices { type uint32; + must ". <= ../simulated-devices" { + error-message "The number of mounted devices cannot be greater that the number of simulated devices"; + } default "0"; description "The number of devices to be mounted in ODL. The configured number should not exceed the number of mounted devices."; } + leaf netconf-call-home { + type boolean; + default "false"; + description + "Configuration of NETCONF Call Home feature. If set to 'true', the device will use the SDN controller details and try to connect to it via Call Home."; + } container notification-config { - leaf fault-notification-delay-period { + leaf-list fault-notification-delay-period { type uint32; - default "0"; + min-elements 1; + max-elements 99; + ordered-by user; description - "Interval in seconds between two consecutive notifications. If the attribute is set to 0, nofitications are not generated."; + "Defines a pattern of generating notifications, represented by the amount of time between two generated fault notifications. The pattern is circular, it restarts at the beginning after all the leaf-list items are being used. + E.g.: if the leaf-list contains three items: 4, 8 and 10, then a fault-notification will be generated, then after 4 seconds a new notification will be generaed, then after 8 seconds, then after 10 seconds, then again after 4 seconds etc."; } leaf ves-heartbeat-period { type uint32; @@ -292,6 +327,16 @@ module network-topology-simulator { description "The current number of running simulated devices that are mounted in ODL."; } + leaf ssh-connections { + type uint32; + description + "The number of SSH connections that are exposed by each simulated device. This can be set through the ENV variable SshConnections when starting the NTS Manager."; + } + leaf tls-connections { + type uint32; + description + "The number of TLS connections that are exposed by each simulated device. This can be set through the ENV variable TlsConnections when starting the NTS Manager."; + } leaf base-netconf-port { type uint32; default "30000"; @@ -358,6 +403,29 @@ module network-topology-simulator { "State data container of the simulator."; } + grouping notification-job-g { + leaf device-id { + type string; + mandatory true; + description + "Device to invoke the NETCONF notification. If it is not present, all simulated devices would invoke the notification."; + } + leaf yang-module-name { + type string; + mandatory true; + description + "Name of the YANG module containing the notification to be invoked."; + } + leaf notification-object { + type string; + mandatory true; + description + "A JSON string containing the notification object to be sent by the device."; + } + description + "Notification job object class."; + } + rpc restart-simulation { description "Operation to restart all the simulated devices with the new configuration of the simulator."; @@ -367,4 +435,29 @@ module network-topology-simulator { description "Operation to add a key pair signed by the NTS to OpenDaylight, such that it can connect to devices using TLS."; } + + rpc invoke-notification { + description + "Operation to generate a NETCONF notification from a device."; + input { + uses notification-job-g; + } + output { + leaf status { + type enumeration { + enum SUCCESS { + description + "This means that the RPC was successfully invoked."; + } + enum ERROR { + description + "This means that an error was encountered when invoking the notification."; + } + } + mandatory true; + description + "The status of the RPC."; + } + } + } }