From f46c20006c23d119ffc1c83117d203ed649f687c Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Wed, 24 Oct 2018 16:07:36 +0100 Subject: Adding TestVNF netconf server TestVNF netconf server is a partial implementation of a netconfserver for netconf termination. TestVNF is configurable and can be used for testing purposes. Issue-ID: INT-355 Change-Id: I98594d7df57ca14582159bb006d8df51dca74ec7 Signed-off-by: a.sreekumar --- .../netconftemplates/RCAPoCModel@2017-04-27.yang | 69 + .../netconftemplates/RCAPoCModel@2017-04-27.yin | 82 + .../netconftemplates/acme-system@2007-06-09.yang | 53 + .../netconftemplates/acme-system@2007-06-09.yin | 57 + .../netconftemplates/afr-machine@2013-12-27.yang | 267 +++ .../netconftemplates/afr-machine@2013-12-27.yin | 281 +++ .../close-session/NA/response.groovy | 22 + .../netconftemplates/close-session/NA/response.xml | 3 + .../close-session/NA/system/response.xml | 7 + .../close-session/NA/turing-machine/response.xml | 76 + .../netconftemplates/commit/NA/response.groovy | 22 + .../netconftemplates/commit/NA/response.xml | 3 + .../netconftemplates/commit/NA/system/response.xml | 7 + .../commit/NA/turing-machine/response.xml | 76 + .../discard-changes/NA/response.groovy | 22 + .../discard-changes/NA/response.xml | 3 + .../discard-changes/NA/system/response.xml | 7 + .../discard-changes/NA/turing-machine/response.xml | 76 + .../netconftemplates/edit-config-schema.yang | 40 + .../edit-config/candidate/response.groovy | 83 + .../edit-config/candidate/response.xml | 3 + .../edit-config/candidate/system/response.xml | 7 + .../candidate/turing-machine/response.xml | 76 + .../edit-config/running/response.groovy | 84 + .../edit-config/running/response.xml | 3 + .../edit-config/running/system/response.xml | 7 + .../running/turing-machine/response.xml | 76 + .../get-config/running/response-bak.xml | 3 + .../get-config/running/response.groovy | 22 + .../get-config/running/response.xml.bak2 | 76 + .../get-config/running/system/response.xml | 7 + .../get-config/running/turing-machine/response.xml | 76 + .../netconftemplates/netconftemplates/hello.xml | 44 + .../iana-crypt-hash@2014-08-06.yang | 122 ++ .../iana-crypt-hash@2014-08-06.yin | 132 ++ .../netconftemplates/iana-if-type@2014-05-08.yang | 1783 +++++++++++++++++++ .../netconftemplates/iana-if-type@2014-05-08.yin | 1804 ++++++++++++++++++++ .../ietf-datastores@2017-08-17.yang | 111 ++ .../ietf-datastores@2017-08-17.yin | 117 ++ .../ietf-inet-types@2013-07-15.yang | 426 +++++ .../ietf-inet-types@2013-07-15.yin | 449 +++++ .../ietf-interfaces@2014-05-08.yang | 675 ++++++++ .../ietf-interfaces@2014-05-08.yin | 724 ++++++++ .../netconftemplates/ietf-ip@2014-06-16.yang | 718 ++++++++ .../netconftemplates/ietf-ip@2014-06-16.yin | 782 +++++++++ .../netconftemplates/ietf-keystore@2016-10-31.yang | 559 ++++++ .../netconftemplates/ietf-keystore@2016-10-31.yin | 596 +++++++ .../ietf-netconf-acm@2012-02-22.yang | 433 +++++ .../ietf-netconf-acm@2012-02-22.yin | 452 +++++ .../ietf-netconf-monitoring@2010-10-04.yang | 570 +++++++ .../ietf-netconf-monitoring@2010-10-04.yin | 604 +++++++ .../ietf-netconf-notifications@2012-02-06.yang | 323 ++++ .../ietf-netconf-notifications@2012-02-06.yin | 346 ++++ .../ietf-netconf-server@2016-11-02.yang | 501 ++++++ .../ietf-netconf-server@2016-11-02.yin | 538 ++++++ .../ietf-netconf-with-defaults@2011-06-01.yang | 132 ++ .../ietf-netconf-with-defaults@2011-06-01.yin | 152 ++ .../netconftemplates/ietf-netconf@2011-06-01.yang | 938 ++++++++++ .../netconftemplates/ietf-netconf@2011-06-01.yin | 1035 +++++++++++ .../ietf-ssh-server@2016-11-02.yang | 171 ++ .../ietf-ssh-server@2016-11-02.yin | 186 ++ .../netconftemplates/ietf-system@2014-08-06.yang | 779 +++++++++ .../netconftemplates/ietf-system@2014-08-06.yin | 833 +++++++++ .../ietf-tls-server@2016-11-02.yang | 141 ++ .../ietf-tls-server@2016-11-02.yin | 155 ++ .../ietf-x509-cert-to-name@2014-12-10.yang | 293 ++++ .../ietf-x509-cert-to-name@2014-12-10.yin | 314 ++++ .../ietf-yang-library@2017-08-17.yang | 492 ++++++ .../ietf-yang-library@2017-08-17.yin | 514 ++++++ .../ietf-yang-metadata@2016-08-05.yang | 83 + .../ietf-yang-metadata@2016-08-05.yin | 89 + .../ietf-yang-types@2013-07-15.yang | 455 +++++ .../ietf-yang-types@2013-07-15.yin | 479 ++++++ .../netconftemplates/lock/NA/response.groovy | 22 + .../netconftemplates/lock/NA/response.xml | 3 + .../netconftemplates/lock/NA/system/response.xml | 7 + .../lock/NA/turing-machine/response.xml | 76 + .../nc-notifications@2008-07-14.yang | 96 ++ .../nc-notifications@2008-07-14.yin | 105 ++ .../netconftemplates/notifications@2008-07-14.yang | 92 + .../netconftemplates/notifications@2008-07-14.yin | 99 ++ .../netconftemplates/rpc-reply.xml | 76 + .../netconftemplates/run-until/NA/response.groovy | 22 + .../netconftemplates/run-until/NA/response.xml | 3 + .../run-until/NA/system/response.xml | 7 + .../run-until/NA/turing-machine/response.xml | 76 + .../netconftemplates/schema-reply-template.xml | 1 + .../netconftemplates/schema-reply.xml | 270 +++ .../netconftemplates/netconftemplates/schema.xml | 359 ++++ .../netconftemplates/netconftemplates/schema2.xml | 17 + .../netconftemplates/netconftemplates/schema3.xml | 197 +++ .../netconftemplates/send-event-schema.yang | 19 + .../netconftemplates/send-event/NA/response.groovy | 94 + .../netconftemplates/send-models-schema.yang | 19 + .../send-models/NA/response.groovy | 133 ++ .../netconftemplates/server-config.properties | 2 + .../turing-machine@2013-12-27.yang | 267 +++ .../netconftemplates/turing-machine@2013-12-27.yin | 281 +++ .../validate/candidate/response.groovy | 22 + .../validate/running/response.groovy | 22 + .../netconftemplates/yang@2017-02-20.yang | 78 + .../netconftemplates/yang@2017-02-20.yin | 91 + 102 files changed, 24302 insertions(+) create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/RCAPoCModel@2017-04-27.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/RCAPoCModel@2017-04-27.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/acme-system@2007-06-09.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/acme-system@2007-06-09.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/afr-machine@2013-12-27.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/afr-machine@2013-12-27.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/system/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/turing-machine/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/system/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/turing-machine/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/system/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/turing-machine/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config-schema.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/system/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/turing-machine/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/system/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/turing-machine/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response-bak.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response.xml.bak2 create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/system/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/turing-machine/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/hello.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/iana-if-type@2014-05-08.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/iana-if-type@2014-05-08.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-datastores@2017-08-17.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-datastores@2017-08-17.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-inet-types@2013-07-15.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-inet-types@2013-07-15.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-interfaces@2014-05-08.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-interfaces@2014-05-08.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ip@2014-06-16.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ip@2014-06-16.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-keystore@2016-10-31.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-keystore@2016-10-31.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-acm@2012-02-22.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-acm@2012-02-22.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-monitoring@2010-10-04.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-monitoring@2010-10-04.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-notifications@2012-02-06.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-notifications@2012-02-06.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-server@2016-11-02.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-server@2016-11-02.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-with-defaults@2011-06-01.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-with-defaults@2011-06-01.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf@2011-06-01.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf@2011-06-01.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ssh-server@2016-11-02.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ssh-server@2016-11-02.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-system@2014-08-06.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-system@2014-08-06.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-tls-server@2016-11-02.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-tls-server@2016-11-02.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-x509-cert-to-name@2014-12-10.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-x509-cert-to-name@2014-12-10.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-library@2017-08-17.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-library@2017-08-17.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-metadata@2016-08-05.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-metadata@2016-08-05.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-types@2013-07-15.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-types@2013-07-15.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/system/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/turing-machine/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/nc-notifications@2008-07-14.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/nc-notifications@2008-07-14.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/notifications@2008-07-14.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/notifications@2008-07-14.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/rpc-reply.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/system/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/turing-machine/response.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/schema-reply-template.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/schema-reply.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/schema.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/schema2.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/schema3.xml create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/send-event-schema.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/send-event/NA/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/send-models-schema.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/send-models/NA/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/server-config.properties create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/turing-machine@2013-12-27.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/turing-machine@2013-12-27.yin create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/validate/candidate/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/validate/running/response.groovy create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/yang@2017-02-20.yang create mode 100644 vnfs/TestVNF/netconftemplates/netconftemplates/yang@2017-02-20.yin (limited to 'vnfs/TestVNF/netconftemplates') diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/RCAPoCModel@2017-04-27.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/RCAPoCModel@2017-04-27.yang new file mode 100644 index 00000000..380f42de --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/RCAPoCModel@2017-04-27.yang @@ -0,0 +1,69 @@ + + module RCAPoCModel { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:oripWnc"; + prefix "RCAPoCModel"; + + + + description "simulation of cellConfig iFLB PoC and sleeping eNodeB PoC. This + model represents a reduced view of /// EnodeB MOC's needed for + boths sleeping eNodeB PoC and iFLB PoC. Note. This model is not + a direct mapping from /// ECIM for ///-eNodeB. The mapping is + done by the smart adapter (SA)."; + + revision "2017-04-27" { + description "Initial revision of oripWnc model"; + } + + + container MME { + description "MME managed element.."; + leaf managedElementId { + description "The MME Managed Element ID"; + type string; + config true; + } + + list SnmpTargetsV2C { + key "snmpTargetV2CId"; + leaf snmpTargetV2CId { + type string; + } + uses SnmpTargetV2C; + } + + } + + + grouping SnmpTargetV2C { + description "SnmpTargetV2C"; + leaf community { + config true; + description "SNMP community string."; + type string; + } + leaf address { + config true; + description "Host address (or DNS name) for the SNMP Trap target."; + type string; + } + leaf port { + config true; + description "UDP port number for this SNMP trap target."; + type string; + } + leaf operationalState { + config false; + description "The operational status of this SNMP target."; + type string; + } + leaf administrativeState { + config true; + description "Administrative state for the SNMP target. When LOCKED, for this MO instance traps will not be sent and access is not allowed."; + type string; + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/RCAPoCModel@2017-04-27.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/RCAPoCModel@2017-04-27.yin new file mode 100644 index 00000000..853565e9 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/RCAPoCModel@2017-04-27.yin @@ -0,0 +1,82 @@ + + + + + + + + simulation of cellConfig iFLB PoC and sleeping eNodeB PoC. This +model represents a reduced view of /// EnodeB MOC's needed for +boths sleeping eNodeB PoC and iFLB PoC. Note. This model is not +a direct mapping from /// ECIM for ///-eNodeB. The mapping is +done by the smart adapter (SA). + + + + Initial revision of oripWnc model + + + + + MME managed element.. + + + + The MME Managed Element ID + + + + + + + + + + + + + + + SnmpTargetV2C + + + + + SNMP community string. + + + + + + + Host address (or DNS name) for the SNMP Trap target. + + + + + + + UDP port number for this SNMP trap target. + + + + + + + The operational status of this SNMP target. + + + + + + + Administrative state for the SNMP target. When LOCKED, for this MO instance traps will not be sent and access is not allowed. + + + + + + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/acme-system@2007-06-09.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/acme-system@2007-06-09.yang new file mode 100644 index 00000000..fb3f17fa --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/acme-system@2007-06-09.yang @@ -0,0 +1,53 @@ + + +module acme-system { + namespace "http://acme.example.com/system"; + prefix "acme"; + + organization "ACME Inc."; + contact "joe@acme.example.com"; + + description + "The module for entities implementing the ACME system."; + + revision 2007-06-09 { + description "Initial revision."; + } + + container system { + leaf host-name { + type string; + description "Hostname for this system"; + } + + leaf-list domain-search { + type string; + description "List of domain names to search"; + } + + container login { + leaf message { + type string; + description + "Message given at start of login session"; + } + + list user { + key "name"; + leaf name { + type string; + } + + leaf full-name { + type string; + } + + leaf class { + type string; + } + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/acme-system@2007-06-09.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/acme-system@2007-06-09.yin new file mode 100644 index 00000000..a3235b8a --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/acme-system@2007-06-09.yin @@ -0,0 +1,57 @@ + + + + + + ACME Inc. + + + joe@acme.example.com + + + The module for entities implementing the ACME system. + + + + Initial revision. + + + + + + + Hostname for this system + + + + + + List of domain names to search + + + + + + + Message given at start of login session + + + + + + + + + + + + + + + + + + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/afr-machine@2013-12-27.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/afr-machine@2013-12-27.yang new file mode 100644 index 00000000..2a5a94f7 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/afr-machine@2013-12-27.yang @@ -0,0 +1,267 @@ + + module turing-machine { + namespace "http://example.net/turing-machine"; + prefix tm; + + description + "Data model for the Turing Machine."; + + revision 2013-12-27 { + description + "Initial revision."; + } + + typedef tape-symbol { + type string { + length "0..1"; + } + description + "Type of symbols appearing in tape cells. + + A blank is represented as an empty string where necessary."; + } + + typedef cell-index { + type int64; + description + "Type for indexing tape cells."; + } + + typedef state-index { + type uint16; + description + "Type for indexing states of the control unit."; + } + + typedef head-dir { + type enumeration { + enum "left"; + enum "right"; + } + default "right"; + description + "Possible directions for moving the read/write head, one cell + to the left or right (default)."; + } + + grouping tape-cells { + description + "The tape of the Turing Machine is represented as a sparse + array."; + list cell { + key "coord"; + description + "List of non-blank cells."; + leaf coord { + type cell-index; + description + "Coordinate (index) of the tape cell."; + } + + leaf symbol { + type tape-symbol { + length "1"; + } + description + "Symbol appearing in the tape cell. + + Blank (empty string) is not allowed here because the + 'cell' list only contains non-blank cells."; + } + } + } + + container turing-machine { + description + "State data and configuration of a Turing Machine."; + leaf state { + type state-index; + config false; + mandatory true; + description + "Current state of the control unit. + + The initial state is 0."; + } + + leaf head-position { + type cell-index; + config false; + mandatory true; + description + "Position of tape read/write head."; + } + + container tape { + config false; + description + "The contents of the tape."; + uses tape-cells; + } + + container transition-function { + description + "The Turing Machine is configured by specifying the + transition function."; + list delta { + key "label"; + unique "input/state input/symbol"; + description + "The list of transition rules."; + leaf label { + type string; + description + "An arbitrary label of the transition rule."; + } + + container input { + description + "Input parameters (arguments) of the transition rule."; + leaf state { + type state-index; + mandatory true; + description + "Current state of the control unit."; + } + + leaf symbol { + type tape-symbol; + mandatory true; + description + "Symbol read from the tape cell."; + } + } + + container output { + description + "Output values of the transition rule."; + leaf state { + type state-index; + description + "New state of the control unit. If this leaf is not + present, the state doesn't change."; + } + + leaf symbol { + type tape-symbol; + description + "Symbol to be written to the tape cell. If this leaf is + not present, the symbol doesn't change."; + } + + leaf head-move { + type head-dir; + description + "Move the head one cell to the left or right"; + } + } + } + } + } + + rpc initialize { + description + "Initialize the Turing Machine as follows: + + 1. Put the control unit into the initial state (0). + + 2. Move the read/write head to the tape cell with coordinate + zero. + + 3. Write the string from the 'tape-content' input parameter to + the tape, character by character, starting at cell 0. The + tape is othewise empty."; + input { + leaf tape-content { + type string; + default ""; + description + "The string with which the tape shall be initialized. The + leftmost symbol will be at tape coordinate 0."; + } + } + } + + rpc run { + description + "Start the Turing Machine operation."; + } + + rpc run-until { + description + "Start the Turing Machine operation and let it run until it is halted + or ALL the defined breakpoint conditions are satisfied."; + input { + leaf state { + type state-index; + description + "What state the control unit has to be at for the execution to be paused."; + } + + leaf head-position { + type cell-index; + description + "Position of tape read/write head for which the breakpoint applies."; + } + + container tape { + description + "What content the tape has to have for the breakpoint to apply."; + uses tape-cells; + } + } + + output { + leaf step-count { + type uint64; + description + "The number of steps executed since the last 'run-until' call."; + } + + leaf halted { + type boolean; + description + "'True' if the Turing machine is halted, 'false' if it is only paused."; + } + } + } + + notification halted { + description + "The Turing Machine has halted. This means that there is no + transition rule for the current state and tape symbol."; + leaf state { + type state-index; + mandatory true; + description + "The state of the control unit in which the machine has + halted."; + } + } + + notification paused { + description + "The Turing machine has reached a breakpoint and was paused."; + leaf state { + type state-index; + mandatory true; + description + "State of the control unit in which the machine was paused."; + } + + leaf head-position { + type cell-index; + mandatory true; + description + "Position of tape read/write head when the machine was paused."; + } + + container tape { + description + "Content of the tape when the machine was paused."; + uses tape-cells; + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/afr-machine@2013-12-27.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/afr-machine@2013-12-27.yin new file mode 100644 index 00000000..7654999c --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/afr-machine@2013-12-27.yin @@ -0,0 +1,281 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="turing-machine" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:tm="http://example.net/turing-machine"> + <namespace uri="http://example.net/turing-machine"/> + <prefix value="tm"/> + <description> + <text>Data model for the Turing Machine.</text> + </description> + <revision date="2013-12-27"> + <description> + <text>Initial revision.</text> + </description> + </revision> + <typedef name="tape-symbol"> + <type name="string"> + <length value="0..1"/> + </type> + <description> + <text>Type of symbols appearing in tape cells. + +A blank is represented as an empty string where necessary.</text> + </description> + </typedef> + <typedef name="cell-index"> + <type name="int64"/> + <description> + <text>Type for indexing tape cells.</text> + </description> + </typedef> + <typedef name="state-index"> + <type name="uint16"/> + <description> + <text>Type for indexing states of the control unit.</text> + </description> + </typedef> + <typedef name="head-dir"> + <type name="enumeration"> + <enum name="left"/> + <enum name="right"/> + </type> + <default value="right"/> + <description> + <text>Possible directions for moving the read/write head, one cell +to the left or right (default).</text> + </description> + </typedef> + <grouping name="tape-cells"> + <description> + <text>The tape of the Turing Machine is represented as a sparse +array.</text> + </description> + <list name="cell"> + <key value="coord"/> + <description> + <text>List of non-blank cells.</text> + </description> + <leaf name="coord"> + <type name="cell-index"/> + <description> + <text>Coordinate (index) of the tape cell.</text> + </description> + </leaf> + <leaf name="symbol"> + <type name="tape-symbol"> + <length value="1"/> + </type> + <description> + <text>Symbol appearing in the tape cell. + +Blank (empty string) is not allowed here because the +'cell' list only contains non-blank cells.</text> + </description> + </leaf> + </list> + </grouping> + <container name="turing-machine"> + <description> + <text>State data and configuration of a Turing Machine.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>Current state of the control unit. + +The initial state is 0.</text> + </description> + </leaf> + <leaf name="head-position"> + <type name="cell-index"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>Position of tape read/write head.</text> + </description> + </leaf> + <container name="tape"> + <config value="false"/> + <description> + <text>The contents of the tape.</text> + </description> + <uses name="tape-cells"/> + </container> + <container name="transition-function"> + <description> + <text>The Turing Machine is configured by specifying the +transition function.</text> + </description> + <list name="delta"> + <key value="label"/> + <unique tag="input/state input/symbol"/> + <description> + <text>The list of transition rules.</text> + </description> + <leaf name="label"> + <type name="string"/> + <description> + <text>An arbitrary label of the transition rule.</text> + </description> + </leaf> + <container name="input"> + <description> + <text>Input parameters (arguments) of the transition rule.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <mandatory value="true"/> + <description> + <text>Current state of the control unit.</text> + </description> + </leaf> + <leaf name="symbol"> + <type name="tape-symbol"/> + <mandatory value="true"/> + <description> + <text>Symbol read from the tape cell.</text> + </description> + </leaf> + </container> + <container name="output"> + <description> + <text>Output values of the transition rule.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <description> + <text>New state of the control unit. If this leaf is not +present, the state doesn't change.</text> + </description> + </leaf> + <leaf name="symbol"> + <type name="tape-symbol"/> + <description> + <text>Symbol to be written to the tape cell. If this leaf is +not present, the symbol doesn't change.</text> + </description> + </leaf> + <leaf name="head-move"> + <type name="head-dir"/> + <description> + <text>Move the head one cell to the left or right</text> + </description> + </leaf> + </container> + </list> + </container> + </container> + <rpc name="initialize"> + <description> + <text>Initialize the Turing Machine as follows: + +1. Put the control unit into the initial state (0). + +2. Move the read/write head to the tape cell with coordinate + zero. + +3. Write the string from the 'tape-content' input parameter to + the tape, character by character, starting at cell 0. The + tape is othewise empty.</text> + </description> + <input> + <leaf name="tape-content"> + <type name="string"/> + <default value=""/> + <description> + <text>The string with which the tape shall be initialized. The +leftmost symbol will be at tape coordinate 0.</text> + </description> + </leaf> + </input> + </rpc> + <rpc name="run"> + <description> + <text>Start the Turing Machine operation.</text> + </description> + </rpc> + <rpc name="run-until"> + <description> + <text>Start the Turing Machine operation and let it run until it is halted +or ALL the defined breakpoint conditions are satisfied.</text> + </description> + <input> + <leaf name="state"> + <type name="state-index"/> + <description> + <text>What state the control unit has to be at for the execution to be paused.</text> + </description> + </leaf> + <leaf name="head-position"> + <type name="cell-index"/> + <description> + <text>Position of tape read/write head for which the breakpoint applies.</text> + </description> + </leaf> + <container name="tape"> + <description> + <text>What content the tape has to have for the breakpoint to apply.</text> + </description> + <uses name="tape-cells"/> + </container> + </input> + <output> + <leaf name="step-count"> + <type name="uint64"/> + <description> + <text>The number of steps executed since the last 'run-until' call.</text> + </description> + </leaf> + <leaf name="halted"> + <type name="boolean"/> + <description> + <text>'True' if the Turing machine is halted, 'false' if it is only paused.</text> + </description> + </leaf> + </output> + </rpc> + <notification name="halted"> + <description> + <text>The Turing Machine has halted. This means that there is no +transition rule for the current state and tape symbol.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <mandatory value="true"/> + <description> + <text>The state of the control unit in which the machine has +halted.</text> + </description> + </leaf> + </notification> + <notification name="paused"> + <description> + <text>The Turing machine has reached a breakpoint and was paused.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <mandatory value="true"/> + <description> + <text>State of the control unit in which the machine was paused.</text> + </description> + </leaf> + <leaf name="head-position"> + <type name="cell-index"/> + <mandatory value="true"/> + <description> + <text>Position of tape read/write head when the machine was paused.</text> + </description> + </leaf> + <container name="tape"> + <description> + <text>Content of the tape when the machine was paused.</text> + </description> + <uses name="tape-cells"/> + </container> + </notification> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/response.groovy new file mode 100644 index 00000000..5f0348c8 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/response.groovy @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +println "close session!" +return "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> "; diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/response.xml new file mode 100644 index 00000000..a2909ffe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/response.xml @@ -0,0 +1,3 @@ +> + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/system/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/system/response.xml new file mode 100644 index 00000000..46ba494f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/system/response.xml @@ -0,0 +1,7 @@ +> + + + aaaaa + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/turing-machine/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/turing-machine/response.xml new file mode 100644 index 00000000..4a659af3 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/close-session/NA/turing-machine/response.xml @@ -0,0 +1,76 @@ +> + + + + + + + 4 + 1 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/response.groovy new file mode 100644 index 00000000..1dfa9654 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/response.groovy @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +println "commit!" +return "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> "; \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/response.xml new file mode 100644 index 00000000..a2909ffe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/response.xml @@ -0,0 +1,3 @@ +> + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/system/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/system/response.xml new file mode 100644 index 00000000..46ba494f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/system/response.xml @@ -0,0 +1,7 @@ +> + + + aaaaa + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/turing-machine/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/turing-machine/response.xml new file mode 100644 index 00000000..4a659af3 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/commit/NA/turing-machine/response.xml @@ -0,0 +1,76 @@ +> + + + + + + + 4 + 1 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/response.groovy new file mode 100644 index 00000000..58135dd5 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/response.groovy @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +println "discard changes!" +return "ignore"; \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/response.xml new file mode 100644 index 00000000..a2909ffe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/response.xml @@ -0,0 +1,3 @@ +> + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/system/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/system/response.xml new file mode 100644 index 00000000..46ba494f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/system/response.xml @@ -0,0 +1,7 @@ +> + + + aaaaa + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/turing-machine/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/turing-machine/response.xml new file mode 100644 index 00000000..4a659af3 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/discard-changes/NA/turing-machine/response.xml @@ -0,0 +1,76 @@ +> + + + + + + + 4 + 1 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config-schema.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config-schema.yang new file mode 100644 index 00000000..fbcc3732 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config-schema.yang @@ -0,0 +1,40 @@ + + + rpc edit-config { + description + "The <edit-config> operation can be used to update the target name and target address. + container target { + description + "Particular configuration to edit."; + choice config-target { + mandatory true; + description + "The configuration target."; + leaf candidate { + if-feature "candidate"; + type empty; + description + "The candidate configuration is the config target."; + } + + leaf running { + if-feature "writable-running"; + type empty; + description + "The running configuration is the config source."; + } + } + } + container config { + leaf target-name { + type string; + description "name of the target"; + } + leaf target-address { + type string; + description "address of the target"; + } + } + } + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/response.groovy new file mode 100644 index 00000000..74410214 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/response.groovy @@ -0,0 +1,83 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +import com.ericsson.testvnf.server.models.RpcData; +import java.util.concurrent.TimeUnit; +import groovy.sql.Sql +import groovy.util.XmlParser +import java.util.logging.Logger; +Logger logger = Logger.getLogger("") +println "edit config - candidate!" +def RpcData data = binding.getVariable("RpcData") +result = "ignore" +try{ + def operationsData = new XmlParser().parseText(data.getOperationTagContent()) + println "operations data::::" + operationsData + + def targetName + def targetAddress + + if (!operationsData.config.'target-name'.isEmpty()){ + targetName = operationsData.config.'target-name'.text() + println "target-name ::::" + operationsData.config.'target-name'.text() + } else{ + logger.info("targetName not found"); + println("targetName not found") + } + if (!operationsData.config.'target-address'.isEmpty()){ + targetAddress = operationsData.config.'target-address'.text() + println "target-address ::::" + operationsData.config.'target-address'.text() + } else{ + logger.info("targetAddress not found"); + println ("targetAddress not found"); + } + + def db = [url: "jdbc:mariadb://localhost:3306/netconf_db?useSSL=false", + user: "root", password: "root", driver: 'org.mariadb.jdbc.Driver'] +// def db = [url: "jdbc:mariadb://mariadb:3306/netconf_db?useSSL=false", +// user: "root", password: "root", driver: 'org.mariadb.jdbc.Driver'] + def sql = Sql.newInstance(db.url, db.user, db.password, db.driver) + println "DB connection ready" + logger.info("DB connection ready") + if (targetName != null && targetAddress != null){ + def metadata = sql.connection.getMetaData() + def tables = metadata.getTables(null, null, "AddressTable", null) + if (!tables.next()) { + logger.info("table not found"); + println "table not found" + sql.execute("CREATE TABLE AddressTable (Name varchar(255), HTTPAddress varchar(255), PRIMARY KEY (Name))") + } + def query = "INSERT INTO AddressTable (NAME, HTTPAddress) VALUES(\""+targetName+"\",\""+targetAddress+"\") ON DUPLICATE KEY UPDATE Name=\""+targetName+"\", HTTPAddress=\""+targetAddress+"\"" + println "query" + query + logger.info(query) + sql.execute(query) + result = "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> " + }else{ + result = "\\\" xmlns=\\\"urn:ietf:params:xml:ns:netconf:base:1.0\\\"> applicationedit-conf failed. Target name or address not found in request." + } +} +catch (Exception e) +{ + e.printStackTrace(); + result = "\\\" xmlns=\\\"urn:ietf:params:xml:ns:netconf:base:1.0\\\"> applicationedit-conf failed" +} + + +return result; diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/response.xml new file mode 100644 index 00000000..a2909ffe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/response.xml @@ -0,0 +1,3 @@ +> + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/system/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/system/response.xml new file mode 100644 index 00000000..46ba494f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/system/response.xml @@ -0,0 +1,7 @@ +> + + + aaaaa + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/turing-machine/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/turing-machine/response.xml new file mode 100644 index 00000000..4a659af3 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/candidate/turing-machine/response.xml @@ -0,0 +1,76 @@ +> + + + + + + + 4 + 1 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/response.groovy new file mode 100644 index 00000000..ae8d3dbe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/response.groovy @@ -0,0 +1,84 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +import com.ericsson.testvnf.server.models.RpcData; +import java.util.concurrent.TimeUnit; +import groovy.sql.Sql +import groovy.util.XmlParser +import java.util.logging.Logger; +Logger logger = Logger.getLogger("") +println "edit config - running!" +def RpcData data = binding.getVariable("RpcData") +result = "ignore" +try{ + def operationsData = new XmlParser().parseText(data.getOperationTagContent()) + println "operations data::::" + operationsData + + def targetName + def targetAddress + + if (!operationsData.config.'target-name'.isEmpty()){ + targetName = operationsData.config.'target-name'.text() + println "target-name ::::" + operationsData.config.'target-name'.text() + } else{ + logger.info("targetName not found"); + println("targetName not found") + } + if (!operationsData.config.'target-address'.isEmpty()){ + targetAddress = operationsData.config.'target-address'.text() + println "target-address ::::" + operationsData.config.'target-address'.text() + } else{ + logger.info("targetAddress not found"); + println ("targetAddress not found"); + } + + def db = [url: "jdbc:mariadb://localhost:3306/netconf_db?useSSL=false", + user: "root", password: "root", driver: 'org.mariadb.jdbc.Driver'] +// def db = [url: "jdbc:mariadb://mariadb:3306/netconf_db?useSSL=false", +// user: "root", password: "root", driver: 'org.mariadb.jdbc.Driver'] + def sql = Sql.newInstance(db.url, db.user, db.password, db.driver) + println "DB connection ready" + logger.info("DB connection ready") + if (targetName != null && targetAddress != null){ + def metadata = sql.connection.getMetaData() + def tables = metadata.getTables(null, null, "AddressTable", null) + if (!tables.next()) { + logger.info("table not found"); + println "table not found" + sql.execute("CREATE TABLE AddressTable (Name varchar(255), HTTPAddress varchar(255), PRIMARY KEY (Name))") + } + def query = "INSERT INTO AddressTable (NAME, HTTPAddress) VALUES(\""+targetName+"\",\""+targetAddress+"\") ON DUPLICATE KEY UPDATE Name=\""+targetName+"\", HTTPAddress=\""+targetAddress+"\"" + println "query" + query + logger.info(query) + sql.execute(query) + result = "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> " + }else{ + result = "\\\" xmlns=\\\"urn:ietf:params:xml:ns:netconf:base:1.0\\\"> applicationedit-conf failed. Target name or address not found in request." + } + +} +catch (Exception e) +{ + e.printStackTrace(); + result = "\\\" xmlns=\\\"urn:ietf:params:xml:ns:netconf:base:1.0\\\"> applicationedit-conf failed" +} + + +return result; diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/response.xml new file mode 100644 index 00000000..a2909ffe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/response.xml @@ -0,0 +1,3 @@ +> + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/system/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/system/response.xml new file mode 100644 index 00000000..46ba494f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/system/response.xml @@ -0,0 +1,7 @@ +> + + + aaaaa + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/turing-machine/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/turing-machine/response.xml new file mode 100644 index 00000000..4a659af3 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/edit-config/running/turing-machine/response.xml @@ -0,0 +1,76 @@ +> + + + + + + + 4 + 1 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response-bak.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response-bak.xml new file mode 100644 index 00000000..a2909ffe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response-bak.xml @@ -0,0 +1,3 @@ +> + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response.groovy new file mode 100644 index 00000000..cecf177c --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response.groovy @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +println "Get-config!" +return "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> 3000 "; diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response.xml.bak2 b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response.xml.bak2 new file mode 100644 index 00000000..ea0ba28e --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/response.xml.bak2 @@ -0,0 +1,76 @@ +> + + + + + + + 3 + 0 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/system/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/system/response.xml new file mode 100644 index 00000000..46ba494f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/system/response.xml @@ -0,0 +1,7 @@ +> + + + aaaaa + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/turing-machine/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/turing-machine/response.xml new file mode 100644 index 00000000..1c6e4d12 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/get-config/running/turing-machine/response.xml @@ -0,0 +1,76 @@ +> + + + + + + + 4 + 0 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/hello.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/hello.xml new file mode 100644 index 00000000..619bc92e --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/hello.xml @@ -0,0 +1,44 @@ + + + + urn:ietf:params:netconf:base:1.0 + urn:ietf:params:netconf:base:1.1 + urn:ietf:params:netconf:capability:writable-running:1.0 + urn:ietf:params:netconf:capability:candidate:1.0 + urn:ietf:params:netconf:capability:rollback-on-error:1.0 + urn:ietf:params:netconf:capability:validate:1.1 + urn:ietf:params:netconf:capability:startup:1.0 + urn:ietf:params:netconf:capability:xpath:1.0 + urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-tagged,trim,explicit + urn:ietf:params:netconf:capability:notification:1.0 + urn:ietf:params:netconf:capability:interleave:1.0 + urn:ietf:params:xml:ns:yang:ietf-yang-metadata?module=ietf-yang-metadata&revision=2016-08-05 + urn:ietf:params:xml:ns:yang:1?module=yang&revision=2017-02-20 + urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2013-07-15 + urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15 + urn:ietf:params:xml:ns:yang:ietf-datastores?module=ietf-datastores&revision=2017-08-17 + urn:ietf:params:xml:ns:yang:ietf-yang-library?module=ietf-yang-library&revision=2017-08-17&module-set-id=25 + urn:ietf:params:xml:ns:yang:ietf-netconf-acm?module=ietf-netconf-acm&revision=2012-02-22 + urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-netconf&revision=2011-06-01&features=writable-running,candidate,rollback-on-error,validate,startup,xpath + urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?module=ietf-netconf-notifications&revision=2012-02-06 + urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-07-14 + urn:ietf:params:xml:ns:netmod:notification?module=nc-notifications&revision=2008-07-14 + http://example.net/turing-machine?module=turing-machine&revision=2013-12-27 + urn:opendaylight:params:xml:ns:yang:oripWnc?module=RCAPoCModel&revision=2017-04-27 + urn:ietf:params:xml:ns:yang:ietf-interfaces?module=ietf-interfaces&revision=2014-05-08 + urn:ietf:params:xml:ns:yang:iana-if-type?module=iana-if-type&revision=2014-05-08 + urn:ietf:params:xml:ns:yang:ietf-ip?module=ietf-ip&revision=2014-06-16 + urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name?module=ietf-x509-cert-to-name&revision=2014-12-10 + urn:ietf:params:xml:ns:yang:ietf-keystore?module=ietf-keystore&revision=2016-10-31 + urn:ietf:params:xml:ns:yang:ietf-ssh-server?module=ietf-ssh-server&revision=2016-11-02 + urn:ietf:params:xml:ns:yang:ietf-tls-server?module=ietf-tls-server&revision=2016-11-02 + urn:ietf:params:xml:ns:yang:ietf-netconf-server?module=ietf-netconf-server&revision=2016-11-02&features=listen,ssh-listen,tls-listen,call-home,ssh-call-home,tls-call-home + urn:ietf:params:xml:ns:yang:iana-crypt-hash?module=iana-crypt-hash&revision=2014-08-06 + urn:ietf:params:xml:ns:yang:ietf-system?module=ietf-system&revision=2014-08-06&features=authentication,local-users + urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04 + urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2011-06-01 + urn:ietf:params:xml:ns:netconf:capability:send-event:1.0 + urn:ietf:params:xml:ns:netconf:capability:send-models:1.0 + + 1 + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yang new file mode 100644 index 00000000..9974bc50 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yang @@ -0,0 +1,122 @@ + + module iana-crypt-hash { + namespace "urn:ietf:params:xml:ns:yang:iana-crypt-hash"; + prefix ianach; + + organization + "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States + + Tel: +1 310 301 5800 + E-Mail: iana@iana.org>"; + description + "This YANG module defines a type for storing passwords + using a hash function and features to indicate which hash + functions are supported by an implementation. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 7317; + see the RFC itself for full legal notices."; + + revision 2014-08-06 { + description + "Initial revision."; + reference + "RFC 7317: A YANG Data Model for System Management"; + } + + feature crypt-hash-md5 { + description + "Indicates that the device supports the MD5 + hash function in 'crypt-hash' values."; + reference + "RFC 1321: The MD5 Message-Digest Algorithm"; + } + + feature crypt-hash-sha-256 { + description + "Indicates that the device supports the SHA-256 + hash function in 'crypt-hash' values."; + reference + "FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } + + feature crypt-hash-sha-512 { + description + "Indicates that the device supports the SHA-512 + hash function in 'crypt-hash' values."; + reference + "FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } + + typedef crypt-hash { + type string { + pattern "$0$.*|$1$[a-zA-Z0-9./]{1,8}$[a-zA-Z0-9./]{22}|$5$(rounds=\\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}|$6$(rounds=\\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}"; + } + description + "The crypt-hash type is used to store passwords using + a hash function. The algorithms for applying the hash + function and encoding the result are implemented in + various UNIX systems as the function crypt(3). + + A value of this type matches one of the forms: + + $0$<clear text password> + $<id>$<salt>$<password hash> + $<id>$<parameter>$<salt>$<password hash> + + The '$0$' prefix signals that the value is clear text. When + such a value is received by the server, a hash value is + calculated, and the string '$<id>$<salt>$' or + $<id>$<parameter>$<salt>$ is prepended to the result. This + value is stored in the configuration data store. + If a value starting with '$<id>$', where <id> is not '0', is + received, the server knows that the value already represents a + hashed value and stores it 'as is' in the data store. + + When a server needs to verify a password given by a user, it + finds the stored password hash string for that user, extracts + the salt, and calculates the hash with the salt and given + password as input. If the calculated hash value is the same + as the stored value, the password given by the client is + accepted. + + This type defines the following hash functions: + + id | hash function | feature + ---+---------------+------------------- + 1 | MD5 | crypt-hash-md5 + 5 | SHA-256 | crypt-hash-sha-256 + 6 | SHA-512 | crypt-hash-sha-512 + + The server indicates support for the different hash functions + by advertising the corresponding feature."; + reference + "IEEE Std 1003.1-2008 - crypt() function + RFC 1321: The MD5 Message-Digest Algorithm + FIPS.180-4.2012: Secure Hash Standard (SHS)"; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yin new file mode 100644 index 00000000..d37aac18 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yin @@ -0,0 +1,132 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="iana-crypt-hash" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ianach="urn:ietf:params:xml:ns:yang:iana-crypt-hash"> + <namespace uri="urn:ietf:params:xml:ns:yang:iana-crypt-hash"/> + <prefix value="ianach"/> + <organization> + <text>IANA</text> + </organization> + <contact> + <text> Internet Assigned Numbers Authority + +Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States + +Tel: +1 310 301 5800 +E-Mail: iana@iana.org&gt;</text> + </contact> + <description> + <text>This YANG module defines a type for storing passwords +using a hash function and features to indicate which hash +functions are supported by an implementation. + +The latest revision of this YANG module can be obtained from +the IANA web site. + +Requests for new values should be made to IANA via +email (iana@iana.org). + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +The initial version of this YANG module is part of RFC 7317; +see the RFC itself for full legal notices.</text> + </description> + <revision date="2014-08-06"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 7317: A YANG Data Model for System Management</text> + </reference> + </revision> + <feature name="crypt-hash-md5"> + <description> + <text>Indicates that the device supports the MD5 +hash function in 'crypt-hash' values.</text> + </description> + <reference> + <text>RFC 1321: The MD5 Message-Digest Algorithm</text> + </reference> + </feature> + <feature name="crypt-hash-sha-256"> + <description> + <text>Indicates that the device supports the SHA-256 +hash function in 'crypt-hash' values.</text> + </description> + <reference> + <text>FIPS.180-4.2012: Secure Hash Standard (SHS)</text> + </reference> + </feature> + <feature name="crypt-hash-sha-512"> + <description> + <text>Indicates that the device supports the SHA-512 +hash function in 'crypt-hash' values.</text> + </description> + <reference> + <text>FIPS.180-4.2012: Secure Hash Standard (SHS)</text> + </reference> + </feature> + <typedef name="crypt-hash"> + <type name="string"> + <pattern value="$0$.*|$1$[a-zA-Z0-9./]{1,8}$[a-zA-Z0-9./]{22}|$5$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}|$6$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}"/> + </type> + <description> + <text>The crypt-hash type is used to store passwords using +a hash function. The algorithms for applying the hash +function and encoding the result are implemented in +various UNIX systems as the function crypt(3). + +A value of this type matches one of the forms: + + $0$&lt;clear text password&gt; + $&lt;id&gt;$&lt;salt&gt;$&lt;password hash&gt; + $&lt;id&gt;$&lt;parameter&gt;$&lt;salt&gt;$&lt;password hash&gt; + +The '$0$' prefix signals that the value is clear text. When +such a value is received by the server, a hash value is +calculated, and the string '$&lt;id&gt;$&lt;salt&gt;$' or +$&lt;id&gt;$&lt;parameter&gt;$&lt;salt&gt;$ is prepended to the result. This +value is stored in the configuration data store. +If a value starting with '$&lt;id&gt;$', where &lt;id&gt; is not '0', is +received, the server knows that the value already represents a +hashed value and stores it 'as is' in the data store. + +When a server needs to verify a password given by a user, it +finds the stored password hash string for that user, extracts +the salt, and calculates the hash with the salt and given +password as input. If the calculated hash value is the same +as the stored value, the password given by the client is +accepted. + +This type defines the following hash functions: + + id | hash function | feature + ---+---------------+------------------- + 1 | MD5 | crypt-hash-md5 + 5 | SHA-256 | crypt-hash-sha-256 + 6 | SHA-512 | crypt-hash-sha-512 + +The server indicates support for the different hash functions +by advertising the corresponding feature.</text> + </description> + <reference> + <text>IEEE Std 1003.1-2008 - crypt() function +RFC 1321: The MD5 Message-Digest Algorithm +FIPS.180-4.2012: Secure Hash Standard (SHS)</text> + </reference> + </typedef> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/iana-if-type@2014-05-08.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/iana-if-type@2014-05-08.yang new file mode 100644 index 00000000..9165ae9a --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/iana-if-type@2014-05-08.yang @@ -0,0 +1,1783 @@ + + module iana-if-type { + yang-version 1; + namespace "urn:ietf:params:xml:ns:yang:iana-if-type"; + prefix ianaift; + + import ietf-interfaces { + prefix if; + } + + organization + "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 4676 Admiralty Way, Suite 330 + Marina del Rey, CA 90292 + + Tel: +1 310 823 9358 + <mailto:iana@iana.org>"; + description + "This YANG module defines YANG identities for IANA-registered + interface types. + + This YANG module is maintained by IANA and reflects the + 'ifType definitions' registry. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 7224; + see the RFC itself for full legal notices."; + reference + "IANA 'ifType definitions' registry. + <http://www.iana.org/assignments/smi-numbers>"; + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + identity iana-interface-type { + base if:interface-type; + description + "This identity is used as a base for all interface types + defined in the 'ifType definitions' registry."; + } + + identity other { + base iana-interface-type; + } + + identity regular1822 { + base iana-interface-type; + } + + identity hdh1822 { + base iana-interface-type; + } + + identity ddnX25 { + base iana-interface-type; + } + + identity rfc877x25 { + base iana-interface-type; + reference + "RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer"; + } + + identity ethernetCsmacd { + base iana-interface-type; + description + "For all Ethernet-like interfaces, regardless of speed, + as per RFC 3635."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + + identity iso88023Csmacd { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + + identity iso88024TokenBus { + base iana-interface-type; + } + + identity iso88025TokenRing { + base iana-interface-type; + } + + identity iso88026Man { + base iana-interface-type; + } + + identity starLan { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + + identity proteon10Mbit { + base iana-interface-type; + } + + identity proteon80Mbit { + base iana-interface-type; + } + + identity hyperchannel { + base iana-interface-type; + } + + identity fddi { + base iana-interface-type; + reference + "RFC 1512 - FDDI Management Information Base"; + } + + identity lapb { + base iana-interface-type; + reference + "RFC 1381 - SNMP MIB Extension for X.25 LAPB"; + } + + identity sdlc { + base iana-interface-type; + } + + identity ds1 { + base iana-interface-type; + description + "DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + + identity e1 { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + + identity basicISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + + identity primaryISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + + identity propPointToPointSerial { + base iana-interface-type; + description + "Proprietary serial."; + } + + identity ppp { + base iana-interface-type; + } + + identity softwareLoopback { + base iana-interface-type; + } + + identity eon { + base iana-interface-type; + description + "CLNP over IP."; + } + + identity ethernet3Mbit { + base iana-interface-type; + } + + identity nsip { + base iana-interface-type; + description + "XNS over IP."; + } + + identity slip { + base iana-interface-type; + description + "Generic SLIP."; + } + + identity ultra { + base iana-interface-type; + description + "Ultra Technologies."; + } + + identity ds3 { + base iana-interface-type; + description + "DS3-MIB."; + reference + "RFC 3896 - Definitions of Managed Objects for the + DS3/E3 Interface Type"; + } + + identity sip { + base iana-interface-type; + description + "SMDS, coffee."; + reference + "RFC 1694 - Definitions of Managed Objects for SMDS + Interfaces using SMIv2"; + } + + identity frameRelay { + base iana-interface-type; + description + "DTE only."; + reference + "RFC 2115 - Management Information Base for Frame Relay + DTEs Using SMIv2"; + } + + identity rs232 { + base iana-interface-type; + reference + "RFC 1659 - Definitions of Managed Objects for RS-232-like + Hardware Devices using SMIv2"; + } + + identity para { + base iana-interface-type; + description + "Parallel-port."; + reference + "RFC 1660 - Definitions of Managed Objects for + Parallel-printer-like Hardware Devices using + SMIv2"; + } + + identity arcnet { + base iana-interface-type; + description + "ARCnet."; + } + + identity arcnetPlus { + base iana-interface-type; + description + "ARCnet Plus."; + } + + identity atm { + base iana-interface-type; + description + "ATM cells."; + } + + identity miox25 { + base iana-interface-type; + reference + "RFC 1461 - SNMP MIB extension for Multiprotocol + Interconnect over X.25"; + } + + identity sonet { + base iana-interface-type; + description + "SONET or SDH."; + } + + identity x25ple { + base iana-interface-type; + reference + "RFC 2127 - ISDN Management Information Base using SMIv2"; + } + + identity iso88022llc { + base iana-interface-type; + } + + identity localTalk { + base iana-interface-type; + } + + identity smdsDxi { + base iana-interface-type; + } + + identity frameRelayService { + base iana-interface-type; + description + "FRNETSERV-MIB."; + reference + "RFC 2954 - Definitions of Managed Objects for Frame + Relay Service"; + } + + identity v35 { + base iana-interface-type; + } + + identity hssi { + base iana-interface-type; + } + + identity hippi { + base iana-interface-type; + } + + identity modem { + base iana-interface-type; + description + "Generic modem."; + } + + identity aal5 { + base iana-interface-type; + description + "AAL5 over ATM."; + } + + identity sonetPath { + base iana-interface-type; + } + + identity sonetVT { + base iana-interface-type; + } + + identity smdsIcip { + base iana-interface-type; + description + "SMDS InterCarrier Interface."; + } + + identity propVirtual { + base iana-interface-type; + description + "Proprietary virtual/internal."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + + identity propMultiplexor { + base iana-interface-type; + description + "Proprietary multiplexing."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + + identity ieee80212 { + base iana-interface-type; + description + "100BaseVG."; + } + + identity fibreChannel { + base iana-interface-type; + description + "Fibre Channel."; + } + + identity hippiInterface { + base iana-interface-type; + description + "HIPPI interfaces."; + } + + identity frameRelayInterconnect { + base iana-interface-type; + status obsolete; + description + "Obsolete; use either + frameRelay(32) or frameRelayService(44)."; + } + + identity aflane8023 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.3."; + } + + identity aflane8025 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.5."; + } + + identity cctEmul { + base iana-interface-type; + description + "ATM Emulated circuit."; + } + + identity fastEther { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + + identity isdn { + base iana-interface-type; + description + "ISDN and X.25."; + reference + "RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN + in the Packet Mode"; + } + + identity v11 { + base iana-interface-type; + description + "CCITT V.11/X.21."; + } + + identity v36 { + base iana-interface-type; + description + "CCITT V.36."; + } + + identity g703at64k { + base iana-interface-type; + description + "CCITT G703 at 64Kbps."; + } + + identity g703at2mb { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + } + + identity qllc { + base iana-interface-type; + description + "SNA QLLC."; + } + + identity fastEtherFX { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + + identity channel { + base iana-interface-type; + description + "Channel."; + } + + identity ieee80211 { + base iana-interface-type; + description + "Radio spread spectrum."; + } + + identity ibm370parChan { + base iana-interface-type; + description + "IBM System 360/370 OEMI Channel."; + } + + identity escon { + base iana-interface-type; + description + "IBM Enterprise Systems Connection."; + } + + identity dlsw { + base iana-interface-type; + description + "Data Link Switching."; + } + + identity isdns { + base iana-interface-type; + description + "ISDN S/T interface."; + } + + identity isdnu { + base iana-interface-type; + description + "ISDN U interface."; + } + + identity lapd { + base iana-interface-type; + description + "Link Access Protocol D."; + } + + identity ipSwitch { + base iana-interface-type; + description + "IP Switching Objects."; + } + + identity rsrb { + base iana-interface-type; + description + "Remote Source Route Bridging."; + } + + identity atmLogical { + base iana-interface-type; + description + "ATM Logical Port."; + reference + "RFC 3606 - Definitions of Supplemental Managed Objects + for ATM Interface"; + } + + identity ds0 { + base iana-interface-type; + description + "Digital Signal Level 0."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + + identity ds0Bundle { + base iana-interface-type; + description + "Group of ds0s on the same ds1."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + + identity bsc { + base iana-interface-type; + description + "Bisynchronous Protocol."; + } + + identity async { + base iana-interface-type; + description + "Asynchronous Protocol."; + } + + identity cnr { + base iana-interface-type; + description + "Combat Net Radio."; + } + + identity iso88025Dtr { + base iana-interface-type; + description + "ISO 802.5r DTR."; + } + + identity eplrs { + base iana-interface-type; + description + "Ext Pos Loc Report Sys."; + } + + identity arap { + base iana-interface-type; + description + "Appletalk Remote Access Protocol."; + } + + identity propCnls { + base iana-interface-type; + description + "Proprietary Connectionless Protocol."; + } + + identity hostPad { + base iana-interface-type; + description + "CCITT-ITU X.29 PAD Protocol."; + } + + identity termPad { + base iana-interface-type; + description + "CCITT-ITU X.3 PAD Facility."; + } + + identity frameRelayMPI { + base iana-interface-type; + description + "Multiproto Interconnect over FR."; + } + + identity x213 { + base iana-interface-type; + description + "CCITT-ITU X213."; + } + + identity adsl { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop."; + } + + identity radsl { + base iana-interface-type; + description + "Rate-Adapt. Digital Subscriber Loop."; + } + + identity sdsl { + base iana-interface-type; + description + "Symmetric Digital Subscriber Loop."; + } + + identity vdsl { + base iana-interface-type; + description + "Very H-Speed Digital Subscrib. Loop."; + } + + identity iso88025CRFPInt { + base iana-interface-type; + description + "ISO 802.5 CRFP."; + } + + identity myrinet { + base iana-interface-type; + description + "Myricom Myrinet."; + } + + identity voiceEM { + base iana-interface-type; + description + "Voice recEive and transMit."; + } + + identity voiceFXO { + base iana-interface-type; + description + "Voice Foreign Exchange Office."; + } + + identity voiceFXS { + base iana-interface-type; + description + "Voice Foreign Exchange Station."; + } + + identity voiceEncap { + base iana-interface-type; + description + "Voice encapsulation."; + } + + identity voiceOverIp { + base iana-interface-type; + description + "Voice over IP encapsulation."; + } + + identity atmDxi { + base iana-interface-type; + description + "ATM DXI."; + } + + identity atmFuni { + base iana-interface-type; + description + "ATM FUNI."; + } + + identity atmIma { + base iana-interface-type; + description + "ATM IMA."; + } + + identity pppMultilinkBundle { + base iana-interface-type; + description + "PPP Multilink Bundle."; + } + + identity ipOverCdlc { + base iana-interface-type; + description + "IBM ipOverCdlc."; + } + + identity ipOverClaw { + base iana-interface-type; + description + "IBM Common Link Access to Workstn."; + } + + identity stackToStack { + base iana-interface-type; + description + "IBM stackToStack."; + } + + identity virtualIpAddress { + base iana-interface-type; + description + "IBM VIPA."; + } + + identity mpc { + base iana-interface-type; + description + "IBM multi-protocol channel support."; + } + + identity ipOverAtm { + base iana-interface-type; + description + "IBM ipOverAtm."; + reference + "RFC 2320 - Definitions of Managed Objects for Classical IP + and ARP Over ATM Using SMIv2 (IPOA-MIB)"; + } + + identity iso88025Fiber { + base iana-interface-type; + description + "ISO 802.5j Fiber Token Ring."; + } + + identity tdlc { + base iana-interface-type; + description + "IBM twinaxial data link control."; + } + + identity gigabitEthernet { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + + identity hdlc { + base iana-interface-type; + description + "HDLC."; + } + + identity lapf { + base iana-interface-type; + description + "LAP F."; + } + + identity v37 { + base iana-interface-type; + description + "V.37."; + } + + identity x25mlp { + base iana-interface-type; + description + "Multi-Link Protocol."; + } + + identity x25huntGroup { + base iana-interface-type; + description + "X25 Hunt Group."; + } + + identity transpHdlc { + base iana-interface-type; + description + "Transp HDLC."; + } + + identity interleave { + base iana-interface-type; + description + "Interleave channel."; + } + + identity fast { + base iana-interface-type; + description + "Fast channel."; + } + + identity ip { + base iana-interface-type; + description + "IP (for APPN HPR in IP networks)."; + } + + identity docsCableMaclayer { + base iana-interface-type; + description + "CATV Mac Layer."; + } + + identity docsCableDownstream { + base iana-interface-type; + description + "CATV Downstream interface."; + } + + identity docsCableUpstream { + base iana-interface-type; + description + "CATV Upstream interface."; + } + + identity a12MppSwitch { + base iana-interface-type; + description + "Avalon Parallel Processor."; + } + + identity tunnel { + base iana-interface-type; + description + "Encapsulation interface."; + } + + identity coffee { + base iana-interface-type; + description + "Coffee pot."; + reference + "RFC 2325 - Coffee MIB"; + } + + identity ces { + base iana-interface-type; + description + "Circuit Emulation Service."; + } + + identity atmSubInterface { + base iana-interface-type; + description + "ATM Sub Interface."; + } + + identity l2vlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using 802.1Q."; + } + + identity l3ipvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IP."; + } + + identity l3ipxvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IPX."; + } + + identity digitalPowerline { + base iana-interface-type; + description + "IP over Power Lines."; + } + + identity mediaMailOverIp { + base iana-interface-type; + description + "Multimedia Mail over IP."; + } + + identity dtm { + base iana-interface-type; + description + "Dynamic synchronous Transfer Mode."; + } + + identity dcn { + base iana-interface-type; + description + "Data Communications Network."; + } + + identity ipForward { + base iana-interface-type; + description + "IP Forwarding Interface."; + } + + identity msdsl { + base iana-interface-type; + description + "Multi-rate Symmetric DSL."; + } + + identity ieee1394 { + base iana-interface-type; + description + "IEEE1394 High Performance Serial Bus."; + } + + identity if-gsn { + base iana-interface-type; + description + "HIPPI-6400."; + } + + identity dvbRccMacLayer { + base iana-interface-type; + description + "DVB-RCC MAC Layer."; + } + + identity dvbRccDownstream { + base iana-interface-type; + description + "DVB-RCC Downstream Channel."; + } + + identity dvbRccUpstream { + base iana-interface-type; + description + "DVB-RCC Upstream Channel."; + } + + identity atmVirtual { + base iana-interface-type; + description + "ATM Virtual Interface."; + } + + identity mplsTunnel { + base iana-interface-type; + description + "MPLS Tunnel Virtual Interface."; + } + + identity srp { + base iana-interface-type; + description + "Spatial Reuse Protocol."; + } + + identity voiceOverAtm { + base iana-interface-type; + description + "Voice over ATM."; + } + + identity voiceOverFrameRelay { + base iana-interface-type; + description + "Voice Over Frame Relay."; + } + + identity idsl { + base iana-interface-type; + description + "Digital Subscriber Loop over ISDN."; + } + + identity compositeLink { + base iana-interface-type; + description + "Avici Composite Link Interface."; + } + + identity ss7SigLink { + base iana-interface-type; + description + "SS7 Signaling Link."; + } + + identity propWirelessP2P { + base iana-interface-type; + description + "Prop. P2P wireless interface."; + } + + identity frForward { + base iana-interface-type; + description + "Frame Forward Interface."; + } + + identity rfc1483 { + base iana-interface-type; + description + "Multiprotocol over ATM AAL5."; + reference + "RFC 1483 - Multiprotocol Encapsulation over ATM + Adaptation Layer 5"; + } + + identity usb { + base iana-interface-type; + description + "USB Interface."; + } + + identity ieee8023adLag { + base iana-interface-type; + description + "IEEE 802.3ad Link Aggregate."; + } + + identity bgppolicyaccounting { + base iana-interface-type; + description + "BGP Policy Accounting."; + } + + identity frf16MfrBundle { + base iana-interface-type; + description + "FRF.16 Multilink Frame Relay."; + } + + identity h323Gatekeeper { + base iana-interface-type; + description + "H323 Gatekeeper."; + } + + identity h323Proxy { + base iana-interface-type; + description + "H323 Voice and Video Proxy."; + } + + identity mpls { + base iana-interface-type; + description + "MPLS."; + } + + identity mfSigLink { + base iana-interface-type; + description + "Multi-frequency signaling link."; + } + + identity hdsl2 { + base iana-interface-type; + description + "High Bit-Rate DSL - 2nd generation."; + } + + identity shdsl { + base iana-interface-type; + description + "Multirate HDSL2."; + } + + identity ds1FDL { + base iana-interface-type; + description + "Facility Data Link (4Kbps) on a DS1."; + } + + identity pos { + base iana-interface-type; + description + "Packet over SONET/SDH Interface."; + } + + identity dvbAsiIn { + base iana-interface-type; + description + "DVB-ASI Input."; + } + + identity dvbAsiOut { + base iana-interface-type; + description + "DVB-ASI Output."; + } + + identity plc { + base iana-interface-type; + description + "Power Line Communications."; + } + + identity nfas { + base iana-interface-type; + description + "Non-Facility Associated Signaling."; + } + + identity tr008 { + base iana-interface-type; + description + "TR008."; + } + + identity gr303RDT { + base iana-interface-type; + description + "Remote Digital Terminal."; + } + + identity gr303IDT { + base iana-interface-type; + description + "Integrated Digital Terminal."; + } + + identity isup { + base iana-interface-type; + description + "ISUP."; + } + + identity propDocsWirelessMaclayer { + base iana-interface-type; + description + "Cisco proprietary Maclayer."; + } + + identity propDocsWirelessDownstream { + base iana-interface-type; + description + "Cisco proprietary Downstream."; + } + + identity propDocsWirelessUpstream { + base iana-interface-type; + description + "Cisco proprietary Upstream."; + } + + identity hiperlan2 { + base iana-interface-type; + description + "HIPERLAN Type 2 Radio Interface."; + } + + identity propBWAp2Mp { + base iana-interface-type; + description + "PropBroadbandWirelessAccesspt2Multipt (use of this value + for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f + is deprecated, and ieee80216WMAN(237) should be used + instead)."; + } + + identity sonetOverheadChannel { + base iana-interface-type; + description + "SONET Overhead Channel."; + } + + identity digitalWrapperOverheadChannel { + base iana-interface-type; + description + "Digital Wrapper."; + } + + identity aal2 { + base iana-interface-type; + description + "ATM adaptation layer 2."; + } + + identity radioMAC { + base iana-interface-type; + description + "MAC layer over radio links."; + } + + identity atmRadio { + base iana-interface-type; + description + "ATM over radio links."; + } + + identity imt { + base iana-interface-type; + description + "Inter-Machine Trunks."; + } + + identity mvl { + base iana-interface-type; + description + "Multiple Virtual Lines DSL."; + } + + identity reachDSL { + base iana-interface-type; + description + "Long Reach DSL."; + } + + identity frDlciEndPt { + base iana-interface-type; + description + "Frame Relay DLCI End Point."; + } + + identity atmVciEndPt { + base iana-interface-type; + description + "ATM VCI End Point."; + } + + identity opticalChannel { + base iana-interface-type; + description + "Optical Channel."; + } + + identity opticalTransport { + base iana-interface-type; + description + "Optical Transport."; + } + + identity propAtm { + base iana-interface-type; + description + "Proprietary ATM."; + } + + identity voiceOverCable { + base iana-interface-type; + description + "Voice Over Cable Interface."; + } + + identity infiniband { + base iana-interface-type; + description + "Infiniband."; + } + + identity teLink { + base iana-interface-type; + description + "TE Link."; + } + + identity q2931 { + base iana-interface-type; + description + "Q.2931."; + } + + identity virtualTg { + base iana-interface-type; + description + "Virtual Trunk Group."; + } + + identity sipTg { + base iana-interface-type; + description + "SIP Trunk Group."; + } + + identity sipSig { + base iana-interface-type; + description + "SIP Signaling."; + } + + identity docsCableUpstreamChannel { + base iana-interface-type; + description + "CATV Upstream Channel."; + } + + identity econet { + base iana-interface-type; + description + "Acorn Econet."; + } + + identity pon155 { + base iana-interface-type; + description + "FSAN 155Mb Symetrical PON interface."; + } + + identity pon622 { + base iana-interface-type; + description + "FSAN 622Mb Symetrical PON interface."; + } + + identity bridge { + base iana-interface-type; + description + "Transparent bridge interface."; + } + + identity linegroup { + base iana-interface-type; + description + "Interface common to multiple lines."; + } + + identity voiceEMFGD { + base iana-interface-type; + description + "Voice E&M Feature Group D."; + } + + identity voiceFGDEANA { + base iana-interface-type; + description + "Voice FGD Exchange Access North American."; + } + + identity voiceDID { + base iana-interface-type; + description + "Voice Direct Inward Dialing."; + } + + identity mpegTransport { + base iana-interface-type; + description + "MPEG transport interface."; + } + + identity sixToFour { + base iana-interface-type; + status deprecated; + description + "6to4 interface (DEPRECATED)."; + reference + "RFC 4087 - IP Tunnel MIB"; + } + + identity gtp { + base iana-interface-type; + description + "GTP (GPRS Tunneling Protocol)."; + } + + identity pdnEtherLoop1 { + base iana-interface-type; + description + "Paradyne EtherLoop 1."; + } + + identity pdnEtherLoop2 { + base iana-interface-type; + description + "Paradyne EtherLoop 2."; + } + + identity opticalChannelGroup { + base iana-interface-type; + description + "Optical Channel Group."; + } + + identity homepna { + base iana-interface-type; + description + "HomePNA ITU-T G.989."; + } + + identity gfp { + base iana-interface-type; + description + "Generic Framing Procedure (GFP)."; + } + + identity ciscoISLvlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using Cisco ISL."; + } + + identity actelisMetaLOOP { + base iana-interface-type; + description + "Acteleis proprietary MetaLOOP High Speed Link."; + } + + identity fcipLink { + base iana-interface-type; + description + "FCIP Link."; + } + + identity rpr { + base iana-interface-type; + description + "Resilient Packet Ring Interface Type."; + } + + identity qam { + base iana-interface-type; + description + "RF Qam Interface."; + } + + identity lmp { + base iana-interface-type; + description + "Link Management Protocol."; + reference + "RFC 4327 - Link Management Protocol (LMP) Management + Information Base (MIB)"; + } + + identity cblVectaStar { + base iana-interface-type; + description + "Cambridge Broadband Networks Limited VectaStar."; + } + + identity docsCableMCmtsDownstream { + base iana-interface-type; + description + "CATV Modular CMTS Downstream Interface."; + } + + identity adsl2 { + base iana-interface-type; + status deprecated; + description + "Asymmetric Digital Subscriber Loop Version 2 + (DEPRECATED/OBSOLETED - please use adsl2plus(238) + instead)."; + reference + "RFC 4706 - Definitions of Managed Objects for Asymmetric + Digital Subscriber Line 2 (ADSL2)"; + } + + identity macSecControlledIF { + base iana-interface-type; + description + "MACSecControlled."; + } + + identity macSecUncontrolledIF { + base iana-interface-type; + description + "MACSecUncontrolled."; + } + + identity aviciOpticalEther { + base iana-interface-type; + description + "Avici Optical Ethernet Aggregate."; + } + + identity atmbond { + base iana-interface-type; + description + "atmbond."; + } + + identity voiceFGDOS { + base iana-interface-type; + description + "Voice FGD Operator Services."; + } + + identity mocaVersion1 { + base iana-interface-type; + description + "MultiMedia over Coax Alliance (MoCA) Interface + as documented in information provided privately to IANA."; + } + + identity ieee80216WMAN { + base iana-interface-type; + description + "IEEE 802.16 WMAN interface."; + } + + identity adsl2plus { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop Version 2 - + Version 2 Plus and all variants."; + } + + identity dvbRcsMacLayer { + base iana-interface-type; + description + "DVB-RCS MAC Layer."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + + identity dvbTdm { + base iana-interface-type; + description + "DVB Satellite TDM."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + + identity dvbRcsTdma { + base iana-interface-type; + description + "DVB-RCS TDMA."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + + identity x86Laps { + base iana-interface-type; + description + "LAPS based on ITU-T X.86/Y.1323."; + } + + identity wwanPP { + base iana-interface-type; + description + "3GPP WWAN."; + } + + identity wwanPP2 { + base iana-interface-type; + description + "3GPP2 WWAN."; + } + + identity voiceEBS { + base iana-interface-type; + description + "Voice P-phone EBS physical interface."; + } + + identity ifPwType { + base iana-interface-type; + description + "Pseudowire interface type."; + reference + "RFC 5601 - Pseudowire (PW) Management Information Base (MIB)"; + } + + identity ilan { + base iana-interface-type; + description + "Internal LAN on a bridge per IEEE 802.1ap."; + } + + identity pip { + base iana-interface-type; + description + "Provider Instance Port on a bridge per IEEE 802.1ah PBB."; + } + + identity aluELP { + base iana-interface-type; + description + "Alcatel-Lucent Ethernet Link Protection."; + } + + identity gpon { + base iana-interface-type; + description + "Gigabit-capable passive optical networks (G-PON) as per + ITU-T G.948."; + } + + identity vdsl2 { + base iana-interface-type; + description + "Very high speed digital subscriber line Version 2 + (as per ITU-T Recommendation G.993.2)."; + reference + "RFC 5650 - Definitions of Managed Objects for Very High + Speed Digital Subscriber Line 2 (VDSL2)"; + } + + identity capwapDot11Profile { + base iana-interface-type; + description + "WLAN Profile Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + + identity capwapDot11Bss { + base iana-interface-type; + description + "WLAN BSS Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + + identity capwapWtpVirtualRadio { + base iana-interface-type; + description + "WTP Virtual Radio Interface."; + reference + "RFC 5833 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Base MIB"; + } + + identity bits { + base iana-interface-type; + description + "bitsport."; + } + + identity docsCableUpstreamRfPort { + base iana-interface-type; + description + "DOCSIS CATV Upstream RF Port."; + } + + identity cableDownstreamRfPort { + base iana-interface-type; + description + "CATV downstream RF Port."; + } + + identity vmwareVirtualNic { + base iana-interface-type; + description + "VMware Virtual Network Interface."; + } + + identity ieee802154 { + base iana-interface-type; + description + "IEEE 802.15.4 WPAN interface."; + reference + "IEEE 802.15.4-2006"; + } + + identity otnOdu { + base iana-interface-type; + description + "OTN Optical Data Unit."; + } + + identity otnOtu { + base iana-interface-type; + description + "OTN Optical channel Transport Unit."; + } + + identity ifVfiType { + base iana-interface-type; + description + "VPLS Forwarding Instance Interface Type."; + } + + identity g9981 { + base iana-interface-type; + description + "G.998.1 bonded interface."; + } + + identity g9982 { + base iana-interface-type; + description + "G.998.2 bonded interface."; + } + + identity g9983 { + base iana-interface-type; + description + "G.998.3 bonded interface."; + } + + identity aluEpon { + base iana-interface-type; + description + "Ethernet Passive Optical Networks (E-PON)."; + } + + identity aluEponOnu { + base iana-interface-type; + description + "EPON Optical Network Unit."; + } + + identity aluEponPhysicalUni { + base iana-interface-type; + description + "EPON physical User to Network interface."; + } + + identity aluEponLogicalLink { + base iana-interface-type; + description + "The emulation of a point-to-point link over the EPON + layer."; + } + + identity aluGponOnu { + base iana-interface-type; + description + "GPON Optical Network Unit."; + reference + "ITU-T G.984.2"; + } + + identity aluGponPhysicalUni { + base iana-interface-type; + description + "GPON physical User to Network interface."; + reference + "ITU-T G.984.2"; + } + + identity vmwareNicTeam { + base iana-interface-type; + description + "VMware NIC Team."; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/iana-if-type@2014-05-08.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/iana-if-type@2014-05-08.yin new file mode 100644 index 00000000..34f7e537 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/iana-if-type@2014-05-08.yin @@ -0,0 +1,1804 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="iana-if-type" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type" + xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> + <yang-version value="1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:iana-if-type"/> + <prefix value="ianaift"/> + <import module="ietf-interfaces"> + <prefix value="if"/> + </import> + <organization> + <text>IANA</text> + </organization> + <contact> + <text> Internet Assigned Numbers Authority + +Postal: ICANN + 4676 Admiralty Way, Suite 330 + Marina del Rey, CA 90292 + +Tel: +1 310 823 9358 +&lt;mailto:iana@iana.org&gt;</text> + </contact> + <description> + <text>This YANG module defines YANG identities for IANA-registered +interface types. + +This YANG module is maintained by IANA and reflects the +'ifType definitions' registry. + +The latest revision of this YANG module can be obtained from +the IANA web site. + +Requests for new values should be made to IANA via +email (iana@iana.org). + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +The initial version of this YANG module is part of RFC 7224; +see the RFC itself for full legal notices.</text> + </description> + <reference> + <text>IANA 'ifType definitions' registry. +&lt;http://www.iana.org/assignments/smi-numbers&gt;</text> + </reference> + <revision date="2014-05-08"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 7224: IANA Interface Type YANG Module</text> + </reference> + </revision> + <identity name="iana-interface-type"> + <base name="if:interface-type"/> + <description> + <text>This identity is used as a base for all interface types +defined in the 'ifType definitions' registry.</text> + </description> + </identity> + <identity name="other"> + <base name="iana-interface-type"/> + </identity> + <identity name="regular1822"> + <base name="iana-interface-type"/> + </identity> + <identity name="hdh1822"> + <base name="iana-interface-type"/> + </identity> + <identity name="ddnX25"> + <base name="iana-interface-type"/> + </identity> + <identity name="rfc877x25"> + <base name="iana-interface-type"/> + <reference> + <text>RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer</text> + </reference> + </identity> + <identity name="ethernetCsmacd"> + <base name="iana-interface-type"/> + <description> + <text>For all Ethernet-like interfaces, regardless of speed, +as per RFC 3635.</text> + </description> + <reference> + <text>RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types</text> + </reference> + </identity> + <identity name="iso88023Csmacd"> + <base name="iana-interface-type"/> + <status value="deprecated"/> + <description> + <text>Deprecated via RFC 3635. +Use ethernetCsmacd(6) instead.</text> + </description> + <reference> + <text>RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types</text> + </reference> + </identity> + <identity name="iso88024TokenBus"> + <base name="iana-interface-type"/> + </identity> + <identity name="iso88025TokenRing"> + <base name="iana-interface-type"/> + </identity> + <identity name="iso88026Man"> + <base name="iana-interface-type"/> + </identity> + <identity name="starLan"> + <base name="iana-interface-type"/> + <status value="deprecated"/> + <description> + <text>Deprecated via RFC 3635. +Use ethernetCsmacd(6) instead.</text> + </description> + <reference> + <text>RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types</text> + </reference> + </identity> + <identity name="proteon10Mbit"> + <base name="iana-interface-type"/> + </identity> + <identity name="proteon80Mbit"> + <base name="iana-interface-type"/> + </identity> + <identity name="hyperchannel"> + <base name="iana-interface-type"/> + </identity> + <identity name="fddi"> + <base name="iana-interface-type"/> + <reference> + <text>RFC 1512 - FDDI Management Information Base</text> + </reference> + </identity> + <identity name="lapb"> + <base name="iana-interface-type"/> + <reference> + <text>RFC 1381 - SNMP MIB Extension for X.25 LAPB</text> + </reference> + </identity> + <identity name="sdlc"> + <base name="iana-interface-type"/> + </identity> + <identity name="ds1"> + <base name="iana-interface-type"/> + <description> + <text>DS1-MIB.</text> + </description> + <reference> + <text>RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types</text> + </reference> + </identity> + <identity name="e1"> + <base name="iana-interface-type"/> + <status value="obsolete"/> + <description> + <text>Obsolete; see DS1-MIB.</text> + </description> + <reference> + <text>RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types</text> + </reference> + </identity> + <identity name="basicISDN"> + <base name="iana-interface-type"/> + <description> + <text>No longer used. See also RFC 2127.</text> + </description> + </identity> + <identity name="primaryISDN"> + <base name="iana-interface-type"/> + <description> + <text>No longer used. See also RFC 2127.</text> + </description> + </identity> + <identity name="propPointToPointSerial"> + <base name="iana-interface-type"/> + <description> + <text>Proprietary serial.</text> + </description> + </identity> + <identity name="ppp"> + <base name="iana-interface-type"/> + </identity> + <identity name="softwareLoopback"> + <base name="iana-interface-type"/> + </identity> + <identity name="eon"> + <base name="iana-interface-type"/> + <description> + <text>CLNP over IP.</text> + </description> + </identity> + <identity name="ethernet3Mbit"> + <base name="iana-interface-type"/> + </identity> + <identity name="nsip"> + <base name="iana-interface-type"/> + <description> + <text>XNS over IP.</text> + </description> + </identity> + <identity name="slip"> + <base name="iana-interface-type"/> + <description> + <text>Generic SLIP.</text> + </description> + </identity> + <identity name="ultra"> + <base name="iana-interface-type"/> + <description> + <text>Ultra Technologies.</text> + </description> + </identity> + <identity name="ds3"> + <base name="iana-interface-type"/> + <description> + <text>DS3-MIB.</text> + </description> + <reference> + <text>RFC 3896 - Definitions of Managed Objects for the + DS3/E3 Interface Type</text> + </reference> + </identity> + <identity name="sip"> + <base name="iana-interface-type"/> + <description> + <text>SMDS, coffee.</text> + </description> + <reference> + <text>RFC 1694 - Definitions of Managed Objects for SMDS + Interfaces using SMIv2</text> + </reference> + </identity> + <identity name="frameRelay"> + <base name="iana-interface-type"/> + <description> + <text>DTE only.</text> + </description> + <reference> + <text>RFC 2115 - Management Information Base for Frame Relay + DTEs Using SMIv2</text> + </reference> + </identity> + <identity name="rs232"> + <base name="iana-interface-type"/> + <reference> + <text>RFC 1659 - Definitions of Managed Objects for RS-232-like + Hardware Devices using SMIv2</text> + </reference> + </identity> + <identity name="para"> + <base name="iana-interface-type"/> + <description> + <text>Parallel-port.</text> + </description> + <reference> + <text>RFC 1660 - Definitions of Managed Objects for + Parallel-printer-like Hardware Devices using + SMIv2</text> + </reference> + </identity> + <identity name="arcnet"> + <base name="iana-interface-type"/> + <description> + <text>ARCnet.</text> + </description> + </identity> + <identity name="arcnetPlus"> + <base name="iana-interface-type"/> + <description> + <text>ARCnet Plus.</text> + </description> + </identity> + <identity name="atm"> + <base name="iana-interface-type"/> + <description> + <text>ATM cells.</text> + </description> + </identity> + <identity name="miox25"> + <base name="iana-interface-type"/> + <reference> + <text>RFC 1461 - SNMP MIB extension for Multiprotocol + Interconnect over X.25</text> + </reference> + </identity> + <identity name="sonet"> + <base name="iana-interface-type"/> + <description> + <text>SONET or SDH.</text> + </description> + </identity> + <identity name="x25ple"> + <base name="iana-interface-type"/> + <reference> + <text>RFC 2127 - ISDN Management Information Base using SMIv2</text> + </reference> + </identity> + <identity name="iso88022llc"> + <base name="iana-interface-type"/> + </identity> + <identity name="localTalk"> + <base name="iana-interface-type"/> + </identity> + <identity name="smdsDxi"> + <base name="iana-interface-type"/> + </identity> + <identity name="frameRelayService"> + <base name="iana-interface-type"/> + <description> + <text>FRNETSERV-MIB.</text> + </description> + <reference> + <text>RFC 2954 - Definitions of Managed Objects for Frame + Relay Service</text> + </reference> + </identity> + <identity name="v35"> + <base name="iana-interface-type"/> + </identity> + <identity name="hssi"> + <base name="iana-interface-type"/> + </identity> + <identity name="hippi"> + <base name="iana-interface-type"/> + </identity> + <identity name="modem"> + <base name="iana-interface-type"/> + <description> + <text>Generic modem.</text> + </description> + </identity> + <identity name="aal5"> + <base name="iana-interface-type"/> + <description> + <text>AAL5 over ATM.</text> + </description> + </identity> + <identity name="sonetPath"> + <base name="iana-interface-type"/> + </identity> + <identity name="sonetVT"> + <base name="iana-interface-type"/> + </identity> + <identity name="smdsIcip"> + <base name="iana-interface-type"/> + <description> + <text>SMDS InterCarrier Interface.</text> + </description> + </identity> + <identity name="propVirtual"> + <base name="iana-interface-type"/> + <description> + <text>Proprietary virtual/internal.</text> + </description> + <reference> + <text>RFC 2863 - The Interfaces Group MIB</text> + </reference> + </identity> + <identity name="propMultiplexor"> + <base name="iana-interface-type"/> + <description> + <text>Proprietary multiplexing.</text> + </description> + <reference> + <text>RFC 2863 - The Interfaces Group MIB</text> + </reference> + </identity> + <identity name="ieee80212"> + <base name="iana-interface-type"/> + <description> + <text>100BaseVG.</text> + </description> + </identity> + <identity name="fibreChannel"> + <base name="iana-interface-type"/> + <description> + <text>Fibre Channel.</text> + </description> + </identity> + <identity name="hippiInterface"> + <base name="iana-interface-type"/> + <description> + <text>HIPPI interfaces.</text> + </description> + </identity> + <identity name="frameRelayInterconnect"> + <base name="iana-interface-type"/> + <status value="obsolete"/> + <description> + <text>Obsolete; use either +frameRelay(32) or frameRelayService(44).</text> + </description> + </identity> + <identity name="aflane8023"> + <base name="iana-interface-type"/> + <description> + <text>ATM Emulated LAN for 802.3.</text> + </description> + </identity> + <identity name="aflane8025"> + <base name="iana-interface-type"/> + <description> + <text>ATM Emulated LAN for 802.5.</text> + </description> + </identity> + <identity name="cctEmul"> + <base name="iana-interface-type"/> + <description> + <text>ATM Emulated circuit.</text> + </description> + </identity> + <identity name="fastEther"> + <base name="iana-interface-type"/> + <status value="deprecated"/> + <description> + <text>Obsoleted via RFC 3635. +ethernetCsmacd(6) should be used instead.</text> + </description> + <reference> + <text>RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types</text> + </reference> + </identity> + <identity name="isdn"> + <base name="iana-interface-type"/> + <description> + <text>ISDN and X.25.</text> + </description> + <reference> + <text>RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN + in the Packet Mode</text> + </reference> + </identity> + <identity name="v11"> + <base name="iana-interface-type"/> + <description> + <text>CCITT V.11/X.21.</text> + </description> + </identity> + <identity name="v36"> + <base name="iana-interface-type"/> + <description> + <text>CCITT V.36.</text> + </description> + </identity> + <identity name="g703at64k"> + <base name="iana-interface-type"/> + <description> + <text>CCITT G703 at 64Kbps.</text> + </description> + </identity> + <identity name="g703at2mb"> + <base name="iana-interface-type"/> + <status value="obsolete"/> + <description> + <text>Obsolete; see DS1-MIB.</text> + </description> + </identity> + <identity name="qllc"> + <base name="iana-interface-type"/> + <description> + <text>SNA QLLC.</text> + </description> + </identity> + <identity name="fastEtherFX"> + <base name="iana-interface-type"/> + <status value="deprecated"/> + <description> + <text>Obsoleted via RFC 3635. +ethernetCsmacd(6) should be used instead.</text> + </description> + <reference> + <text>RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types</text> + </reference> + </identity> + <identity name="channel"> + <base name="iana-interface-type"/> + <description> + <text>Channel.</text> + </description> + </identity> + <identity name="ieee80211"> + <base name="iana-interface-type"/> + <description> + <text>Radio spread spectrum.</text> + </description> + </identity> + <identity name="ibm370parChan"> + <base name="iana-interface-type"/> + <description> + <text>IBM System 360/370 OEMI Channel.</text> + </description> + </identity> + <identity name="escon"> + <base name="iana-interface-type"/> + <description> + <text>IBM Enterprise Systems Connection.</text> + </description> + </identity> + <identity name="dlsw"> + <base name="iana-interface-type"/> + <description> + <text>Data Link Switching.</text> + </description> + </identity> + <identity name="isdns"> + <base name="iana-interface-type"/> + <description> + <text>ISDN S/T interface.</text> + </description> + </identity> + <identity name="isdnu"> + <base name="iana-interface-type"/> + <description> + <text>ISDN U interface.</text> + </description> + </identity> + <identity name="lapd"> + <base name="iana-interface-type"/> + <description> + <text>Link Access Protocol D.</text> + </description> + </identity> + <identity name="ipSwitch"> + <base name="iana-interface-type"/> + <description> + <text>IP Switching Objects.</text> + </description> + </identity> + <identity name="rsrb"> + <base name="iana-interface-type"/> + <description> + <text>Remote Source Route Bridging.</text> + </description> + </identity> + <identity name="atmLogical"> + <base name="iana-interface-type"/> + <description> + <text>ATM Logical Port.</text> + </description> + <reference> + <text>RFC 3606 - Definitions of Supplemental Managed Objects + for ATM Interface</text> + </reference> + </identity> + <identity name="ds0"> + <base name="iana-interface-type"/> + <description> + <text>Digital Signal Level 0.</text> + </description> + <reference> + <text>RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type</text> + </reference> + </identity> + <identity name="ds0Bundle"> + <base name="iana-interface-type"/> + <description> + <text>Group of ds0s on the same ds1.</text> + </description> + <reference> + <text>RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type</text> + </reference> + </identity> + <identity name="bsc"> + <base name="iana-interface-type"/> + <description> + <text>Bisynchronous Protocol.</text> + </description> + </identity> + <identity name="async"> + <base name="iana-interface-type"/> + <description> + <text>Asynchronous Protocol.</text> + </description> + </identity> + <identity name="cnr"> + <base name="iana-interface-type"/> + <description> + <text>Combat Net Radio.</text> + </description> + </identity> + <identity name="iso88025Dtr"> + <base name="iana-interface-type"/> + <description> + <text>ISO 802.5r DTR.</text> + </description> + </identity> + <identity name="eplrs"> + <base name="iana-interface-type"/> + <description> + <text>Ext Pos Loc Report Sys.</text> + </description> + </identity> + <identity name="arap"> + <base name="iana-interface-type"/> + <description> + <text>Appletalk Remote Access Protocol.</text> + </description> + </identity> + <identity name="propCnls"> + <base name="iana-interface-type"/> + <description> + <text>Proprietary Connectionless Protocol.</text> + </description> + </identity> + <identity name="hostPad"> + <base name="iana-interface-type"/> + <description> + <text>CCITT-ITU X.29 PAD Protocol.</text> + </description> + </identity> + <identity name="termPad"> + <base name="iana-interface-type"/> + <description> + <text>CCITT-ITU X.3 PAD Facility.</text> + </description> + </identity> + <identity name="frameRelayMPI"> + <base name="iana-interface-type"/> + <description> + <text>Multiproto Interconnect over FR.</text> + </description> + </identity> + <identity name="x213"> + <base name="iana-interface-type"/> + <description> + <text>CCITT-ITU X213.</text> + </description> + </identity> + <identity name="adsl"> + <base name="iana-interface-type"/> + <description> + <text>Asymmetric Digital Subscriber Loop.</text> + </description> + </identity> + <identity name="radsl"> + <base name="iana-interface-type"/> + <description> + <text>Rate-Adapt. Digital Subscriber Loop.</text> + </description> + </identity> + <identity name="sdsl"> + <base name="iana-interface-type"/> + <description> + <text>Symmetric Digital Subscriber Loop.</text> + </description> + </identity> + <identity name="vdsl"> + <base name="iana-interface-type"/> + <description> + <text>Very H-Speed Digital Subscrib. Loop.</text> + </description> + </identity> + <identity name="iso88025CRFPInt"> + <base name="iana-interface-type"/> + <description> + <text>ISO 802.5 CRFP.</text> + </description> + </identity> + <identity name="myrinet"> + <base name="iana-interface-type"/> + <description> + <text>Myricom Myrinet.</text> + </description> + </identity> + <identity name="voiceEM"> + <base name="iana-interface-type"/> + <description> + <text>Voice recEive and transMit.</text> + </description> + </identity> + <identity name="voiceFXO"> + <base name="iana-interface-type"/> + <description> + <text>Voice Foreign Exchange Office.</text> + </description> + </identity> + <identity name="voiceFXS"> + <base name="iana-interface-type"/> + <description> + <text>Voice Foreign Exchange Station.</text> + </description> + </identity> + <identity name="voiceEncap"> + <base name="iana-interface-type"/> + <description> + <text>Voice encapsulation.</text> + </description> + </identity> + <identity name="voiceOverIp"> + <base name="iana-interface-type"/> + <description> + <text>Voice over IP encapsulation.</text> + </description> + </identity> + <identity name="atmDxi"> + <base name="iana-interface-type"/> + <description> + <text>ATM DXI.</text> + </description> + </identity> + <identity name="atmFuni"> + <base name="iana-interface-type"/> + <description> + <text>ATM FUNI.</text> + </description> + </identity> + <identity name="atmIma"> + <base name="iana-interface-type"/> + <description> + <text>ATM IMA.</text> + </description> + </identity> + <identity name="pppMultilinkBundle"> + <base name="iana-interface-type"/> + <description> + <text>PPP Multilink Bundle.</text> + </description> + </identity> + <identity name="ipOverCdlc"> + <base name="iana-interface-type"/> + <description> + <text>IBM ipOverCdlc.</text> + </description> + </identity> + <identity name="ipOverClaw"> + <base name="iana-interface-type"/> + <description> + <text>IBM Common Link Access to Workstn.</text> + </description> + </identity> + <identity name="stackToStack"> + <base name="iana-interface-type"/> + <description> + <text>IBM stackToStack.</text> + </description> + </identity> + <identity name="virtualIpAddress"> + <base name="iana-interface-type"/> + <description> + <text>IBM VIPA.</text> + </description> + </identity> + <identity name="mpc"> + <base name="iana-interface-type"/> + <description> + <text>IBM multi-protocol channel support.</text> + </description> + </identity> + <identity name="ipOverAtm"> + <base name="iana-interface-type"/> + <description> + <text>IBM ipOverAtm.</text> + </description> + <reference> + <text>RFC 2320 - Definitions of Managed Objects for Classical IP + and ARP Over ATM Using SMIv2 (IPOA-MIB)</text> + </reference> + </identity> + <identity name="iso88025Fiber"> + <base name="iana-interface-type"/> + <description> + <text>ISO 802.5j Fiber Token Ring.</text> + </description> + </identity> + <identity name="tdlc"> + <base name="iana-interface-type"/> + <description> + <text>IBM twinaxial data link control.</text> + </description> + </identity> + <identity name="gigabitEthernet"> + <base name="iana-interface-type"/> + <status value="deprecated"/> + <description> + <text>Obsoleted via RFC 3635. +ethernetCsmacd(6) should be used instead.</text> + </description> + <reference> + <text>RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types</text> + </reference> + </identity> + <identity name="hdlc"> + <base name="iana-interface-type"/> + <description> + <text>HDLC.</text> + </description> + </identity> + <identity name="lapf"> + <base name="iana-interface-type"/> + <description> + <text>LAP F.</text> + </description> + </identity> + <identity name="v37"> + <base name="iana-interface-type"/> + <description> + <text>V.37.</text> + </description> + </identity> + <identity name="x25mlp"> + <base name="iana-interface-type"/> + <description> + <text>Multi-Link Protocol.</text> + </description> + </identity> + <identity name="x25huntGroup"> + <base name="iana-interface-type"/> + <description> + <text>X25 Hunt Group.</text> + </description> + </identity> + <identity name="transpHdlc"> + <base name="iana-interface-type"/> + <description> + <text>Transp HDLC.</text> + </description> + </identity> + <identity name="interleave"> + <base name="iana-interface-type"/> + <description> + <text>Interleave channel.</text> + </description> + </identity> + <identity name="fast"> + <base name="iana-interface-type"/> + <description> + <text>Fast channel.</text> + </description> + </identity> + <identity name="ip"> + <base name="iana-interface-type"/> + <description> + <text>IP (for APPN HPR in IP networks).</text> + </description> + </identity> + <identity name="docsCableMaclayer"> + <base name="iana-interface-type"/> + <description> + <text>CATV Mac Layer.</text> + </description> + </identity> + <identity name="docsCableDownstream"> + <base name="iana-interface-type"/> + <description> + <text>CATV Downstream interface.</text> + </description> + </identity> + <identity name="docsCableUpstream"> + <base name="iana-interface-type"/> + <description> + <text>CATV Upstream interface.</text> + </description> + </identity> + <identity name="a12MppSwitch"> + <base name="iana-interface-type"/> + <description> + <text>Avalon Parallel Processor.</text> + </description> + </identity> + <identity name="tunnel"> + <base name="iana-interface-type"/> + <description> + <text>Encapsulation interface.</text> + </description> + </identity> + <identity name="coffee"> + <base name="iana-interface-type"/> + <description> + <text>Coffee pot.</text> + </description> + <reference> + <text>RFC 2325 - Coffee MIB</text> + </reference> + </identity> + <identity name="ces"> + <base name="iana-interface-type"/> + <description> + <text>Circuit Emulation Service.</text> + </description> + </identity> + <identity name="atmSubInterface"> + <base name="iana-interface-type"/> + <description> + <text>ATM Sub Interface.</text> + </description> + </identity> + <identity name="l2vlan"> + <base name="iana-interface-type"/> + <description> + <text>Layer 2 Virtual LAN using 802.1Q.</text> + </description> + </identity> + <identity name="l3ipvlan"> + <base name="iana-interface-type"/> + <description> + <text>Layer 3 Virtual LAN using IP.</text> + </description> + </identity> + <identity name="l3ipxvlan"> + <base name="iana-interface-type"/> + <description> + <text>Layer 3 Virtual LAN using IPX.</text> + </description> + </identity> + <identity name="digitalPowerline"> + <base name="iana-interface-type"/> + <description> + <text>IP over Power Lines.</text> + </description> + </identity> + <identity name="mediaMailOverIp"> + <base name="iana-interface-type"/> + <description> + <text>Multimedia Mail over IP.</text> + </description> + </identity> + <identity name="dtm"> + <base name="iana-interface-type"/> + <description> + <text>Dynamic synchronous Transfer Mode.</text> + </description> + </identity> + <identity name="dcn"> + <base name="iana-interface-type"/> + <description> + <text>Data Communications Network.</text> + </description> + </identity> + <identity name="ipForward"> + <base name="iana-interface-type"/> + <description> + <text>IP Forwarding Interface.</text> + </description> + </identity> + <identity name="msdsl"> + <base name="iana-interface-type"/> + <description> + <text>Multi-rate Symmetric DSL.</text> + </description> + </identity> + <identity name="ieee1394"> + <base name="iana-interface-type"/> + <description> + <text>IEEE1394 High Performance Serial Bus.</text> + </description> + </identity> + <identity name="if-gsn"> + <base name="iana-interface-type"/> + <description> + <text>HIPPI-6400.</text> + </description> + </identity> + <identity name="dvbRccMacLayer"> + <base name="iana-interface-type"/> + <description> + <text>DVB-RCC MAC Layer.</text> + </description> + </identity> + <identity name="dvbRccDownstream"> + <base name="iana-interface-type"/> + <description> + <text>DVB-RCC Downstream Channel.</text> + </description> + </identity> + <identity name="dvbRccUpstream"> + <base name="iana-interface-type"/> + <description> + <text>DVB-RCC Upstream Channel.</text> + </description> + </identity> + <identity name="atmVirtual"> + <base name="iana-interface-type"/> + <description> + <text>ATM Virtual Interface.</text> + </description> + </identity> + <identity name="mplsTunnel"> + <base name="iana-interface-type"/> + <description> + <text>MPLS Tunnel Virtual Interface.</text> + </description> + </identity> + <identity name="srp"> + <base name="iana-interface-type"/> + <description> + <text>Spatial Reuse Protocol.</text> + </description> + </identity> + <identity name="voiceOverAtm"> + <base name="iana-interface-type"/> + <description> + <text>Voice over ATM.</text> + </description> + </identity> + <identity name="voiceOverFrameRelay"> + <base name="iana-interface-type"/> + <description> + <text>Voice Over Frame Relay.</text> + </description> + </identity> + <identity name="idsl"> + <base name="iana-interface-type"/> + <description> + <text>Digital Subscriber Loop over ISDN.</text> + </description> + </identity> + <identity name="compositeLink"> + <base name="iana-interface-type"/> + <description> + <text>Avici Composite Link Interface.</text> + </description> + </identity> + <identity name="ss7SigLink"> + <base name="iana-interface-type"/> + <description> + <text>SS7 Signaling Link.</text> + </description> + </identity> + <identity name="propWirelessP2P"> + <base name="iana-interface-type"/> + <description> + <text>Prop. P2P wireless interface.</text> + </description> + </identity> + <identity name="frForward"> + <base name="iana-interface-type"/> + <description> + <text>Frame Forward Interface.</text> + </description> + </identity> + <identity name="rfc1483"> + <base name="iana-interface-type"/> + <description> + <text>Multiprotocol over ATM AAL5.</text> + </description> + <reference> + <text>RFC 1483 - Multiprotocol Encapsulation over ATM + Adaptation Layer 5</text> + </reference> + </identity> + <identity name="usb"> + <base name="iana-interface-type"/> + <description> + <text>USB Interface.</text> + </description> + </identity> + <identity name="ieee8023adLag"> + <base name="iana-interface-type"/> + <description> + <text>IEEE 802.3ad Link Aggregate.</text> + </description> + </identity> + <identity name="bgppolicyaccounting"> + <base name="iana-interface-type"/> + <description> + <text>BGP Policy Accounting.</text> + </description> + </identity> + <identity name="frf16MfrBundle"> + <base name="iana-interface-type"/> + <description> + <text>FRF.16 Multilink Frame Relay.</text> + </description> + </identity> + <identity name="h323Gatekeeper"> + <base name="iana-interface-type"/> + <description> + <text>H323 Gatekeeper.</text> + </description> + </identity> + <identity name="h323Proxy"> + <base name="iana-interface-type"/> + <description> + <text>H323 Voice and Video Proxy.</text> + </description> + </identity> + <identity name="mpls"> + <base name="iana-interface-type"/> + <description> + <text>MPLS.</text> + </description> + </identity> + <identity name="mfSigLink"> + <base name="iana-interface-type"/> + <description> + <text>Multi-frequency signaling link.</text> + </description> + </identity> + <identity name="hdsl2"> + <base name="iana-interface-type"/> + <description> + <text>High Bit-Rate DSL - 2nd generation.</text> + </description> + </identity> + <identity name="shdsl"> + <base name="iana-interface-type"/> + <description> + <text>Multirate HDSL2.</text> + </description> + </identity> + <identity name="ds1FDL"> + <base name="iana-interface-type"/> + <description> + <text>Facility Data Link (4Kbps) on a DS1.</text> + </description> + </identity> + <identity name="pos"> + <base name="iana-interface-type"/> + <description> + <text>Packet over SONET/SDH Interface.</text> + </description> + </identity> + <identity name="dvbAsiIn"> + <base name="iana-interface-type"/> + <description> + <text>DVB-ASI Input.</text> + </description> + </identity> + <identity name="dvbAsiOut"> + <base name="iana-interface-type"/> + <description> + <text>DVB-ASI Output.</text> + </description> + </identity> + <identity name="plc"> + <base name="iana-interface-type"/> + <description> + <text>Power Line Communications.</text> + </description> + </identity> + <identity name="nfas"> + <base name="iana-interface-type"/> + <description> + <text>Non-Facility Associated Signaling.</text> + </description> + </identity> + <identity name="tr008"> + <base name="iana-interface-type"/> + <description> + <text>TR008.</text> + </description> + </identity> + <identity name="gr303RDT"> + <base name="iana-interface-type"/> + <description> + <text>Remote Digital Terminal.</text> + </description> + </identity> + <identity name="gr303IDT"> + <base name="iana-interface-type"/> + <description> + <text>Integrated Digital Terminal.</text> + </description> + </identity> + <identity name="isup"> + <base name="iana-interface-type"/> + <description> + <text>ISUP.</text> + </description> + </identity> + <identity name="propDocsWirelessMaclayer"> + <base name="iana-interface-type"/> + <description> + <text>Cisco proprietary Maclayer.</text> + </description> + </identity> + <identity name="propDocsWirelessDownstream"> + <base name="iana-interface-type"/> + <description> + <text>Cisco proprietary Downstream.</text> + </description> + </identity> + <identity name="propDocsWirelessUpstream"> + <base name="iana-interface-type"/> + <description> + <text>Cisco proprietary Upstream.</text> + </description> + </identity> + <identity name="hiperlan2"> + <base name="iana-interface-type"/> + <description> + <text>HIPERLAN Type 2 Radio Interface.</text> + </description> + </identity> + <identity name="propBWAp2Mp"> + <base name="iana-interface-type"/> + <description> + <text>PropBroadbandWirelessAccesspt2Multipt (use of this value +for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f +is deprecated, and ieee80216WMAN(237) should be used +instead).</text> + </description> + </identity> + <identity name="sonetOverheadChannel"> + <base name="iana-interface-type"/> + <description> + <text>SONET Overhead Channel.</text> + </description> + </identity> + <identity name="digitalWrapperOverheadChannel"> + <base name="iana-interface-type"/> + <description> + <text>Digital Wrapper.</text> + </description> + </identity> + <identity name="aal2"> + <base name="iana-interface-type"/> + <description> + <text>ATM adaptation layer 2.</text> + </description> + </identity> + <identity name="radioMAC"> + <base name="iana-interface-type"/> + <description> + <text>MAC layer over radio links.</text> + </description> + </identity> + <identity name="atmRadio"> + <base name="iana-interface-type"/> + <description> + <text>ATM over radio links.</text> + </description> + </identity> + <identity name="imt"> + <base name="iana-interface-type"/> + <description> + <text>Inter-Machine Trunks.</text> + </description> + </identity> + <identity name="mvl"> + <base name="iana-interface-type"/> + <description> + <text>Multiple Virtual Lines DSL.</text> + </description> + </identity> + <identity name="reachDSL"> + <base name="iana-interface-type"/> + <description> + <text>Long Reach DSL.</text> + </description> + </identity> + <identity name="frDlciEndPt"> + <base name="iana-interface-type"/> + <description> + <text>Frame Relay DLCI End Point.</text> + </description> + </identity> + <identity name="atmVciEndPt"> + <base name="iana-interface-type"/> + <description> + <text>ATM VCI End Point.</text> + </description> + </identity> + <identity name="opticalChannel"> + <base name="iana-interface-type"/> + <description> + <text>Optical Channel.</text> + </description> + </identity> + <identity name="opticalTransport"> + <base name="iana-interface-type"/> + <description> + <text>Optical Transport.</text> + </description> + </identity> + <identity name="propAtm"> + <base name="iana-interface-type"/> + <description> + <text>Proprietary ATM.</text> + </description> + </identity> + <identity name="voiceOverCable"> + <base name="iana-interface-type"/> + <description> + <text>Voice Over Cable Interface.</text> + </description> + </identity> + <identity name="infiniband"> + <base name="iana-interface-type"/> + <description> + <text>Infiniband.</text> + </description> + </identity> + <identity name="teLink"> + <base name="iana-interface-type"/> + <description> + <text>TE Link.</text> + </description> + </identity> + <identity name="q2931"> + <base name="iana-interface-type"/> + <description> + <text>Q.2931.</text> + </description> + </identity> + <identity name="virtualTg"> + <base name="iana-interface-type"/> + <description> + <text>Virtual Trunk Group.</text> + </description> + </identity> + <identity name="sipTg"> + <base name="iana-interface-type"/> + <description> + <text>SIP Trunk Group.</text> + </description> + </identity> + <identity name="sipSig"> + <base name="iana-interface-type"/> + <description> + <text>SIP Signaling.</text> + </description> + </identity> + <identity name="docsCableUpstreamChannel"> + <base name="iana-interface-type"/> + <description> + <text>CATV Upstream Channel.</text> + </description> + </identity> + <identity name="econet"> + <base name="iana-interface-type"/> + <description> + <text>Acorn Econet.</text> + </description> + </identity> + <identity name="pon155"> + <base name="iana-interface-type"/> + <description> + <text>FSAN 155Mb Symetrical PON interface.</text> + </description> + </identity> + <identity name="pon622"> + <base name="iana-interface-type"/> + <description> + <text>FSAN 622Mb Symetrical PON interface.</text> + </description> + </identity> + <identity name="bridge"> + <base name="iana-interface-type"/> + <description> + <text>Transparent bridge interface.</text> + </description> + </identity> + <identity name="linegroup"> + <base name="iana-interface-type"/> + <description> + <text>Interface common to multiple lines.</text> + </description> + </identity> + <identity name="voiceEMFGD"> + <base name="iana-interface-type"/> + <description> + <text>Voice E&amp;M Feature Group D.</text> + </description> + </identity> + <identity name="voiceFGDEANA"> + <base name="iana-interface-type"/> + <description> + <text>Voice FGD Exchange Access North American.</text> + </description> + </identity> + <identity name="voiceDID"> + <base name="iana-interface-type"/> + <description> + <text>Voice Direct Inward Dialing.</text> + </description> + </identity> + <identity name="mpegTransport"> + <base name="iana-interface-type"/> + <description> + <text>MPEG transport interface.</text> + </description> + </identity> + <identity name="sixToFour"> + <base name="iana-interface-type"/> + <status value="deprecated"/> + <description> + <text>6to4 interface (DEPRECATED).</text> + </description> + <reference> + <text>RFC 4087 - IP Tunnel MIB</text> + </reference> + </identity> + <identity name="gtp"> + <base name="iana-interface-type"/> + <description> + <text>GTP (GPRS Tunneling Protocol).</text> + </description> + </identity> + <identity name="pdnEtherLoop1"> + <base name="iana-interface-type"/> + <description> + <text>Paradyne EtherLoop 1.</text> + </description> + </identity> + <identity name="pdnEtherLoop2"> + <base name="iana-interface-type"/> + <description> + <text>Paradyne EtherLoop 2.</text> + </description> + </identity> + <identity name="opticalChannelGroup"> + <base name="iana-interface-type"/> + <description> + <text>Optical Channel Group.</text> + </description> + </identity> + <identity name="homepna"> + <base name="iana-interface-type"/> + <description> + <text>HomePNA ITU-T G.989.</text> + </description> + </identity> + <identity name="gfp"> + <base name="iana-interface-type"/> + <description> + <text>Generic Framing Procedure (GFP).</text> + </description> + </identity> + <identity name="ciscoISLvlan"> + <base name="iana-interface-type"/> + <description> + <text>Layer 2 Virtual LAN using Cisco ISL.</text> + </description> + </identity> + <identity name="actelisMetaLOOP"> + <base name="iana-interface-type"/> + <description> + <text>Acteleis proprietary MetaLOOP High Speed Link.</text> + </description> + </identity> + <identity name="fcipLink"> + <base name="iana-interface-type"/> + <description> + <text>FCIP Link.</text> + </description> + </identity> + <identity name="rpr"> + <base name="iana-interface-type"/> + <description> + <text>Resilient Packet Ring Interface Type.</text> + </description> + </identity> + <identity name="qam"> + <base name="iana-interface-type"/> + <description> + <text>RF Qam Interface.</text> + </description> + </identity> + <identity name="lmp"> + <base name="iana-interface-type"/> + <description> + <text>Link Management Protocol.</text> + </description> + <reference> + <text>RFC 4327 - Link Management Protocol (LMP) Management + Information Base (MIB)</text> + </reference> + </identity> + <identity name="cblVectaStar"> + <base name="iana-interface-type"/> + <description> + <text>Cambridge Broadband Networks Limited VectaStar.</text> + </description> + </identity> + <identity name="docsCableMCmtsDownstream"> + <base name="iana-interface-type"/> + <description> + <text>CATV Modular CMTS Downstream Interface.</text> + </description> + </identity> + <identity name="adsl2"> + <base name="iana-interface-type"/> + <status value="deprecated"/> + <description> + <text>Asymmetric Digital Subscriber Loop Version 2 +(DEPRECATED/OBSOLETED - please use adsl2plus(238) +instead).</text> + </description> + <reference> + <text>RFC 4706 - Definitions of Managed Objects for Asymmetric + Digital Subscriber Line 2 (ADSL2)</text> + </reference> + </identity> + <identity name="macSecControlledIF"> + <base name="iana-interface-type"/> + <description> + <text>MACSecControlled.</text> + </description> + </identity> + <identity name="macSecUncontrolledIF"> + <base name="iana-interface-type"/> + <description> + <text>MACSecUncontrolled.</text> + </description> + </identity> + <identity name="aviciOpticalEther"> + <base name="iana-interface-type"/> + <description> + <text>Avici Optical Ethernet Aggregate.</text> + </description> + </identity> + <identity name="atmbond"> + <base name="iana-interface-type"/> + <description> + <text>atmbond.</text> + </description> + </identity> + <identity name="voiceFGDOS"> + <base name="iana-interface-type"/> + <description> + <text>Voice FGD Operator Services.</text> + </description> + </identity> + <identity name="mocaVersion1"> + <base name="iana-interface-type"/> + <description> + <text>MultiMedia over Coax Alliance (MoCA) Interface +as documented in information provided privately to IANA.</text> + </description> + </identity> + <identity name="ieee80216WMAN"> + <base name="iana-interface-type"/> + <description> + <text>IEEE 802.16 WMAN interface.</text> + </description> + </identity> + <identity name="adsl2plus"> + <base name="iana-interface-type"/> + <description> + <text>Asymmetric Digital Subscriber Loop Version 2 - +Version 2 Plus and all variants.</text> + </description> + </identity> + <identity name="dvbRcsMacLayer"> + <base name="iana-interface-type"/> + <description> + <text>DVB-RCS MAC Layer.</text> + </description> + <reference> + <text>RFC 5728 - The SatLabs Group DVB-RCS MIB</text> + </reference> + </identity> + <identity name="dvbTdm"> + <base name="iana-interface-type"/> + <description> + <text>DVB Satellite TDM.</text> + </description> + <reference> + <text>RFC 5728 - The SatLabs Group DVB-RCS MIB</text> + </reference> + </identity> + <identity name="dvbRcsTdma"> + <base name="iana-interface-type"/> + <description> + <text>DVB-RCS TDMA.</text> + </description> + <reference> + <text>RFC 5728 - The SatLabs Group DVB-RCS MIB</text> + </reference> + </identity> + <identity name="x86Laps"> + <base name="iana-interface-type"/> + <description> + <text>LAPS based on ITU-T X.86/Y.1323.</text> + </description> + </identity> + <identity name="wwanPP"> + <base name="iana-interface-type"/> + <description> + <text>3GPP WWAN.</text> + </description> + </identity> + <identity name="wwanPP2"> + <base name="iana-interface-type"/> + <description> + <text>3GPP2 WWAN.</text> + </description> + </identity> + <identity name="voiceEBS"> + <base name="iana-interface-type"/> + <description> + <text>Voice P-phone EBS physical interface.</text> + </description> + </identity> + <identity name="ifPwType"> + <base name="iana-interface-type"/> + <description> + <text>Pseudowire interface type.</text> + </description> + <reference> + <text>RFC 5601 - Pseudowire (PW) Management Information Base (MIB)</text> + </reference> + </identity> + <identity name="ilan"> + <base name="iana-interface-type"/> + <description> + <text>Internal LAN on a bridge per IEEE 802.1ap.</text> + </description> + </identity> + <identity name="pip"> + <base name="iana-interface-type"/> + <description> + <text>Provider Instance Port on a bridge per IEEE 802.1ah PBB.</text> + </description> + </identity> + <identity name="aluELP"> + <base name="iana-interface-type"/> + <description> + <text>Alcatel-Lucent Ethernet Link Protection.</text> + </description> + </identity> + <identity name="gpon"> + <base name="iana-interface-type"/> + <description> + <text>Gigabit-capable passive optical networks (G-PON) as per +ITU-T G.948.</text> + </description> + </identity> + <identity name="vdsl2"> + <base name="iana-interface-type"/> + <description> + <text>Very high speed digital subscriber line Version 2 +(as per ITU-T Recommendation G.993.2).</text> + </description> + <reference> + <text>RFC 5650 - Definitions of Managed Objects for Very High + Speed Digital Subscriber Line 2 (VDSL2)</text> + </reference> + </identity> + <identity name="capwapDot11Profile"> + <base name="iana-interface-type"/> + <description> + <text>WLAN Profile Interface.</text> + </description> + <reference> + <text>RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11</text> + </reference> + </identity> + <identity name="capwapDot11Bss"> + <base name="iana-interface-type"/> + <description> + <text>WLAN BSS Interface.</text> + </description> + <reference> + <text>RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11</text> + </reference> + </identity> + <identity name="capwapWtpVirtualRadio"> + <base name="iana-interface-type"/> + <description> + <text>WTP Virtual Radio Interface.</text> + </description> + <reference> + <text>RFC 5833 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Base MIB</text> + </reference> + </identity> + <identity name="bits"> + <base name="iana-interface-type"/> + <description> + <text>bitsport.</text> + </description> + </identity> + <identity name="docsCableUpstreamRfPort"> + <base name="iana-interface-type"/> + <description> + <text>DOCSIS CATV Upstream RF Port.</text> + </description> + </identity> + <identity name="cableDownstreamRfPort"> + <base name="iana-interface-type"/> + <description> + <text>CATV downstream RF Port.</text> + </description> + </identity> + <identity name="vmwareVirtualNic"> + <base name="iana-interface-type"/> + <description> + <text>VMware Virtual Network Interface.</text> + </description> + </identity> + <identity name="ieee802154"> + <base name="iana-interface-type"/> + <description> + <text>IEEE 802.15.4 WPAN interface.</text> + </description> + <reference> + <text>IEEE 802.15.4-2006</text> + </reference> + </identity> + <identity name="otnOdu"> + <base name="iana-interface-type"/> + <description> + <text>OTN Optical Data Unit.</text> + </description> + </identity> + <identity name="otnOtu"> + <base name="iana-interface-type"/> + <description> + <text>OTN Optical channel Transport Unit.</text> + </description> + </identity> + <identity name="ifVfiType"> + <base name="iana-interface-type"/> + <description> + <text>VPLS Forwarding Instance Interface Type.</text> + </description> + </identity> + <identity name="g9981"> + <base name="iana-interface-type"/> + <description> + <text>G.998.1 bonded interface.</text> + </description> + </identity> + <identity name="g9982"> + <base name="iana-interface-type"/> + <description> + <text>G.998.2 bonded interface.</text> + </description> + </identity> + <identity name="g9983"> + <base name="iana-interface-type"/> + <description> + <text>G.998.3 bonded interface.</text> + </description> + </identity> + <identity name="aluEpon"> + <base name="iana-interface-type"/> + <description> + <text>Ethernet Passive Optical Networks (E-PON).</text> + </description> + </identity> + <identity name="aluEponOnu"> + <base name="iana-interface-type"/> + <description> + <text>EPON Optical Network Unit.</text> + </description> + </identity> + <identity name="aluEponPhysicalUni"> + <base name="iana-interface-type"/> + <description> + <text>EPON physical User to Network interface.</text> + </description> + </identity> + <identity name="aluEponLogicalLink"> + <base name="iana-interface-type"/> + <description> + <text>The emulation of a point-to-point link over the EPON +layer.</text> + </description> + </identity> + <identity name="aluGponOnu"> + <base name="iana-interface-type"/> + <description> + <text>GPON Optical Network Unit.</text> + </description> + <reference> + <text>ITU-T G.984.2</text> + </reference> + </identity> + <identity name="aluGponPhysicalUni"> + <base name="iana-interface-type"/> + <description> + <text>GPON physical User to Network interface.</text> + </description> + <reference> + <text>ITU-T G.984.2</text> + </reference> + </identity> + <identity name="vmwareNicTeam"> + <base name="iana-interface-type"/> + <description> + <text>VMware NIC Team.</text> + </description> + </identity> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-datastores@2017-08-17.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-datastores@2017-08-17.yang new file mode 100644 index 00000000..a40d04e5 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-datastores@2017-08-17.yang @@ -0,0 +1,111 @@ + + module ietf-datastores { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-datastores"; + prefix ds; + + organization + "IETF Network Modeling (NETMOD) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + + WG List: <mailto:netmod@ietf.org> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Author: Phil Shafer + <mailto:phil@juniper.net> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net> + + Author: Rob Wilton + <rwilton@cisco.com>"; + description + "This YANG module defines two sets of identities for datastores. + The first identifies the datastores themselves, the second + identifies datastore properties. + + Copyright (c) 2017 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX + (http://www.rfc-editor.org/info/rfcxxxx); see the RFC itself + for full legal notices."; + + revision 2017-08-17 { + description + "Initial revision."; + reference + "RFC XXXX: Network Management Datastore Architecture"; + } + + identity datastore { + description + "Abstract base identity for datastore identities."; + } + + identity conventional { + base datastore; + description + "Abstract base identity for conventional configuration + datastores."; + } + + identity running { + base conventional; + description + "The running configuration datastore."; + } + + identity candidate { + base conventional; + description + "The candidate configuration datastore."; + } + + identity startup { + base conventional; + description + "The startup configuration datastore."; + } + + identity intended { + base conventional; + description + "The intended configuration datastore."; + } + + identity dynamic { + base datastore; + description + "Abstract base identity for dynamic configuration datastores."; + } + + identity operational { + base datastore; + description + "The operational state datastore."; + } + + typedef datastore-ref { + type identityref { + base datastore; + } + description + "A datastore identity reference."; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-datastores@2017-08-17.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-datastores@2017-08-17.yin new file mode 100644 index 00000000..13f93b4f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-datastores@2017-08-17.yin @@ -0,0 +1,117 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-datastores" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> + <yang-version value="1.1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-datastores"/> + <prefix value="ds"/> + <organization> + <text>IETF Network Modeling (NETMOD) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;https://datatracker.ietf.org/wg/netmod/&gt; + +WG List: &lt;mailto:netmod@ietf.org&gt; + +Author: Martin Bjorklund + &lt;mailto:mbj@tail-f.com&gt; + +Author: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt; + +Author: Phil Shafer + &lt;mailto:phil@juniper.net&gt; + +Author: Kent Watsen + &lt;mailto:kwatsen@juniper.net&gt; + +Author: Rob Wilton + &lt;rwilton@cisco.com&gt;</text> + </contact> + <description> + <text>This YANG module defines two sets of identities for datastores. +The first identifies the datastores themselves, the second +identifies datastore properties. + +Copyright (c) 2017 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject to +the license terms contained in, the Simplified BSD License set +forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC XXXX +(http://www.rfc-editor.org/info/rfcxxxx); see the RFC itself +for full legal notices.</text> + </description> + <revision date="2017-08-17"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC XXXX: Network Management Datastore Architecture</text> + </reference> + </revision> + <identity name="datastore"> + <description> + <text>Abstract base identity for datastore identities.</text> + </description> + </identity> + <identity name="conventional"> + <base name="datastore"/> + <description> + <text>Abstract base identity for conventional configuration +datastores.</text> + </description> + </identity> + <identity name="running"> + <base name="conventional"/> + <description> + <text>The running configuration datastore.</text> + </description> + </identity> + <identity name="candidate"> + <base name="conventional"/> + <description> + <text>The candidate configuration datastore.</text> + </description> + </identity> + <identity name="startup"> + <base name="conventional"/> + <description> + <text>The startup configuration datastore.</text> + </description> + </identity> + <identity name="intended"> + <base name="conventional"/> + <description> + <text>The intended configuration datastore.</text> + </description> + </identity> + <identity name="dynamic"> + <base name="datastore"/> + <description> + <text>Abstract base identity for dynamic configuration datastores.</text> + </description> + </identity> + <identity name="operational"> + <base name="datastore"/> + <description> + <text>The operational state datastore.</text> + </description> + </identity> + <typedef name="datastore-ref"> + <type name="identityref"> + <base name="datastore"/> + </type> + <description> + <text>A datastore identity reference.</text> + </description> + </typedef> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-inet-types@2013-07-15.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-inet-types@2013-07-15.yang new file mode 100644 index 00000000..981cd5be --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-inet-types@2013-07-15.yang @@ -0,0 +1,426 @@ + + module ietf-inet-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix inet; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + typedef ip-version { + type enumeration { + enum "unknown" { + value 0; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum "ipv4" { + value 1; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum "ipv6" { + value 2; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or Flow + Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from <http://www.iana.org/>. + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"; + pattern "(([^:]+:){6}(([^:]+:[^:]+)|(.*\\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(%.+)?"; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern "[0-9\\.]*"; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern "[0-9a-fA-F:\\.]*"; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))"; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))"; + pattern "(([^:]+:){6}(([^:]+:[^:]+)|(.*\\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(/.+)"; + } + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef domain-name { + type string { + length "1..253"; + pattern "((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\."; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-inet-types@2013-07-15.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-inet-types@2013-07-15.yin new file mode 100644 index 00000000..b4dfee6c --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-inet-types@2013-07-15.yin @@ -0,0 +1,449 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-inet-types" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-inet-types"/> + <prefix value="inet"/> + <organization> + <text>IETF NETMOD (NETCONF Data Modeling Language) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netmod/&gt; +WG List: &lt;mailto:netmod@ietf.org&gt; + +WG Chair: David Kessens + &lt;mailto:david.kessens@nsn.com&gt; + +WG Chair: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt; + +Editor: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt;</text> + </contact> + <description> + <text>This module contains a collection of generally useful derived +YANG data types for Internet addresses and related things. + +Copyright (c) 2013 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 6991; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2013-07-15"> + <description> + <text>This revision adds the following new data types: +- ip-address-no-zone +- ipv4-address-no-zone +- ipv6-address-no-zone</text> + </description> + <reference> + <text>RFC 6991: Common YANG Data Types</text> + </reference> + </revision> + <revision date="2010-09-24"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 6021: Common YANG Data Types</text> + </reference> + </revision> + <typedef name="ip-version"> + <type name="enumeration"> + <enum name="unknown"> + <value value="0"/> + <description> + <text>An unknown or unspecified version of the Internet +protocol.</text> + </description> + </enum> + <enum name="ipv4"> + <value value="1"/> + <description> + <text>The IPv4 protocol as defined in RFC 791.</text> + </description> + </enum> + <enum name="ipv6"> + <value value="2"/> + <description> + <text>The IPv6 protocol as defined in RFC 2460.</text> + </description> + </enum> + </type> + <description> + <text>This value represents the version of the IP protocol. + +In the value set and its semantics, this type is equivalent +to the InetVersion textual convention of the SMIv2.</text> + </description> + <reference> + <text>RFC 791: Internet Protocol +RFC 2460: Internet Protocol, Version 6 (IPv6) Specification +RFC 4001: Textual Conventions for Internet Network Addresses</text> + </reference> + </typedef> + <typedef name="dscp"> + <type name="uint8"> + <range value="0..63"/> + </type> + <description> + <text>The dscp type represents a Differentiated Services Code Point +that may be used for marking packets in a traffic stream. +In the value set and its semantics, this type is equivalent +to the Dscp textual convention of the SMIv2.</text> + </description> + <reference> + <text>RFC 3289: Management Information Base for the Differentiated + Services Architecture +RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers +RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers</text> + </reference> + </typedef> + <typedef name="ipv6-flow-label"> + <type name="uint32"> + <range value="0..1048575"/> + </type> + <description> + <text>The ipv6-flow-label type represents the flow identifier or Flow +Label in an IPv6 packet header that may be used to +discriminate traffic flows. + +In the value set and its semantics, this type is equivalent +to the IPv6FlowLabel textual convention of the SMIv2.</text> + </description> + <reference> + <text>RFC 3595: Textual Conventions for IPv6 Flow Label +RFC 2460: Internet Protocol, Version 6 (IPv6) Specification</text> + </reference> + </typedef> + <typedef name="port-number"> + <type name="uint16"> + <range value="0..65535"/> + </type> + <description> + <text>The port-number type represents a 16-bit port number of an +Internet transport-layer protocol such as UDP, TCP, DCCP, or +SCTP. Port numbers are assigned by IANA. A current list of +all assignments is available from &lt;http://www.iana.org/&gt;. + +Note that the port number value zero is reserved by IANA. In +situations where the value zero does not make sense, it can +be excluded by subtyping the port-number type. +In the value set and its semantics, this type is equivalent +to the InetPortNumber textual convention of the SMIv2.</text> + </description> + <reference> + <text>RFC 768: User Datagram Protocol +RFC 793: Transmission Control Protocol +RFC 4960: Stream Control Transmission Protocol +RFC 4340: Datagram Congestion Control Protocol (DCCP) +RFC 4001: Textual Conventions for Internet Network Addresses</text> + </reference> + </typedef> + <typedef name="as-number"> + <type name="uint32"/> + <description> + <text>The as-number type represents autonomous system numbers +which identify an Autonomous System (AS). An AS is a set +of routers under a single technical administration, using +an interior gateway protocol and common metrics to route +packets within the AS, and using an exterior gateway +protocol to route packets to other ASes. IANA maintains +the AS number space and has delegated large parts to the +regional registries. + +Autonomous system numbers were originally limited to 16 +bits. BGP extensions have enlarged the autonomous system +number space to 32 bits. This type therefore uses an uint32 +base type without a range restriction in order to support +a larger autonomous system number space. + +In the value set and its semantics, this type is equivalent +to the InetAutonomousSystemNumber textual convention of +the SMIv2.</text> + </description> + <reference> + <text>RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) +RFC 4271: A Border Gateway Protocol 4 (BGP-4) +RFC 4001: Textual Conventions for Internet Network Addresses +RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space</text> + </reference> + </typedef> + <typedef name="ip-address"> + <type name="union"> + <type name="inet:ipv4-address"/> + <type name="inet:ipv6-address"/> + </type> + <description> + <text>The ip-address type represents an IP address and is IP +version neutral. The format of the textual representation +implies the IP version. This type supports scoped addresses +by allowing zone identifiers in the address format.</text> + </description> + <reference> + <text>RFC 4007: IPv6 Scoped Address Architecture</text> + </reference> + </typedef> + <typedef name="ipv4-address"> + <type name="string"> + <pattern value="(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?"/> + </type> + <description> + <text>The ipv4-address type represents an IPv4 address in +dotted-quad notation. The IPv4 address may include a zone +index, separated by a % sign. + +The zone index is used to disambiguate identical address +values. For link-local addresses, the zone index will +typically be the interface index number or the name of an +interface. If the zone index is not present, the default +zone of the device will be used. + +The canonical format for the zone index is the numerical +format</text> + </description> + </typedef> + <typedef name="ipv6-address"> + <type name="string"> + <pattern value="((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\p{N}\p{L}]+)?"/> + <pattern value="(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(%.+)?"/> + </type> + <description> + <text>The ipv6-address type represents an IPv6 address in full, +mixed, shortened, and shortened-mixed notation. The IPv6 +address may include a zone index, separated by a % sign. + +The zone index is used to disambiguate identical address +values. For link-local addresses, the zone index will +typically be the interface index number or the name of an +interface. If the zone index is not present, the default +zone of the device will be used. + +The canonical format of IPv6 addresses uses the textual +representation defined in Section 4 of RFC 5952. The +canonical format for the zone index is the numerical +format as described in Section 11.2 of RFC 4007.</text> + </description> + <reference> + <text>RFC 4291: IP Version 6 Addressing Architecture +RFC 4007: IPv6 Scoped Address Architecture +RFC 5952: A Recommendation for IPv6 Address Text + Representation</text> + </reference> + </typedef> + <typedef name="ip-address-no-zone"> + <type name="union"> + <type name="inet:ipv4-address-no-zone"/> + <type name="inet:ipv6-address-no-zone"/> + </type> + <description> + <text>The ip-address-no-zone type represents an IP address and is +IP version neutral. The format of the textual representation +implies the IP version. This type does not support scoped +addresses since it does not allow zone identifiers in the +address format.</text> + </description> + <reference> + <text>RFC 4007: IPv6 Scoped Address Architecture</text> + </reference> + </typedef> + <typedef name="ipv4-address-no-zone"> + <type name="inet:ipv4-address"> + <pattern value="[0-9\.]*"/> + </type> + <description> + <text>An IPv4 address without a zone index. This type, derived from +ipv4-address, may be used in situations where the zone is +known from the context and hence no zone index is needed.</text> + </description> + </typedef> + <typedef name="ipv6-address-no-zone"> + <type name="inet:ipv6-address"> + <pattern value="[0-9a-fA-F:\.]*"/> + </type> + <description> + <text>An IPv6 address without a zone index. This type, derived from +ipv6-address, may be used in situations where the zone is +known from the context and hence no zone index is needed.</text> + </description> + <reference> + <text>RFC 4291: IP Version 6 Addressing Architecture +RFC 4007: IPv6 Scoped Address Architecture +RFC 5952: A Recommendation for IPv6 Address Text + Representation</text> + </reference> + </typedef> + <typedef name="ip-prefix"> + <type name="union"> + <type name="inet:ipv4-prefix"/> + <type name="inet:ipv6-prefix"/> + </type> + <description> + <text>The ip-prefix type represents an IP prefix and is IP +version neutral. The format of the textual representations +implies the IP version.</text> + </description> + </typedef> + <typedef name="ipv4-prefix"> + <type name="string"> + <pattern value="(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))"/> + </type> + <description> + <text>The ipv4-prefix type represents an IPv4 address prefix. +The prefix length is given by the number following the +slash character and must be less than or equal to 32. + +A prefix length value of n corresponds to an IP address +mask that has n contiguous 1-bits from the most +significant bit (MSB) and all other bits set to 0. + +The canonical format of an IPv4 prefix has all bits of +the IPv4 address set to zero that are not part of the +IPv4 prefix.</text> + </description> + </typedef> + <typedef name="ipv6-prefix"> + <type name="string"> + <pattern value="((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))"/> + <pattern value="(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(/.+)"/> + </type> + <description> + <text>The ipv6-prefix type represents an IPv6 address prefix. +The prefix length is given by the number following the +slash character and must be less than or equal to 128. + +A prefix length value of n corresponds to an IP address +mask that has n contiguous 1-bits from the most +significant bit (MSB) and all other bits set to 0. + +The IPv6 address should have all bits that do not belong +to the prefix set to zero. + +The canonical format of an IPv6 prefix has all bits of +the IPv6 address set to zero that are not part of the +IPv6 prefix. Furthermore, the IPv6 address is represented +as defined in Section 4 of RFC 5952.</text> + </description> + <reference> + <text>RFC 5952: A Recommendation for IPv6 Address Text + Representation</text> + </reference> + </typedef> + <typedef name="domain-name"> + <type name="string"> + <length value="1..253"/> + <pattern value="((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)|\."/> + </type> + <description> + <text>The domain-name type represents a DNS domain name. The +name SHOULD be fully qualified whenever possible. + +Internet domain names are only loosely specified. Section +3.5 of RFC 1034 recommends a syntax (modified in Section +2.1 of RFC 1123). The pattern above is intended to allow +for current practice in domain name use, and some possible +future expansion. It is designed to hold various types of +domain names, including names used for A or AAAA records +(host names) and other records, such as SRV records. Note +that Internet host names have a stricter syntax (described +in RFC 952) than the DNS recommendations in RFCs 1034 and +1123, and that systems that want to store host names in +schema nodes using the domain-name type are recommended to +adhere to this stricter standard to ensure interoperability. + +The encoding of DNS names in the DNS protocol is limited +to 255 characters. Since the encoding consists of labels +prefixed by a length bytes and there is a trailing NULL +byte, only 253 characters can appear in the textual dotted +notation. + +The description clause of schema nodes using the domain-name +type MUST describe when and how these names are resolved to +IP addresses. Note that the resolution of a domain-name value +may require to query multiple DNS records (e.g., A for IPv4 +and AAAA for IPv6). The order of the resolution process and +which DNS record takes precedence can either be defined +explicitly or may depend on the configuration of the +resolver. + +Domain-name values use the US-ASCII encoding. Their canonical +format uses lowercase US-ASCII characters. Internationalized +domain names MUST be A-labels as per RFC 5890.</text> + </description> + <reference> + <text>RFC 952: DoD Internet Host Table Specification +RFC 1034: Domain Names - Concepts and Facilities +RFC 1123: Requirements for Internet Hosts -- Application + and Support +RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) +RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework</text> + </reference> + </typedef> + <typedef name="host"> + <type name="union"> + <type name="inet:ip-address"/> + <type name="inet:domain-name"/> + </type> + <description> + <text>The host type represents either an IP address or a DNS +domain name.</text> + </description> + </typedef> + <typedef name="uri"> + <type name="string"/> + <description> + <text>The uri type represents a Uniform Resource Identifier +(URI) as defined by STD 66. + +Objects using the uri type MUST be in US-ASCII encoding, +and MUST be normalized as described by RFC 3986 Sections +6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary +percent-encoding is removed, and all case-insensitive +characters are set to lowercase except for hexadecimal +digits, which are normalized to uppercase as described in +Section 6.2.2.1. + +The purpose of this normalization is to help provide +unique URIs. Note that this normalization is not +sufficient to provide uniqueness. Two URIs that are +textually distinct after this normalization may still be +equivalent. + +Objects using the uri type may restrict the schemes that +they permit. For example, 'data:' and 'urn:' schemes +might not be appropriate. + +A zero-length URI is not a valid URI. This can be used to +express 'URI absent' where required. + +In the value set and its semantics, this type is equivalent +to the Uri SMIv2 textual convention defined in RFC 5017.</text> + </description> + <reference> + <text>RFC 3986: Uniform Resource Identifier (URI): Generic Syntax +RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations +RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)</text> + </reference> + </typedef> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-interfaces@2014-05-08.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-interfaces@2014-05-08.yang new file mode 100644 index 00000000..3ea17f92 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-interfaces@2014-05-08.yang @@ -0,0 +1,675 @@ + + module ietf-interfaces { + yang-version 1; + namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; + prefix if; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module contains a collection of YANG definitions for + managing network interfaces. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7223; see + the RFC itself for full legal notices."; + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + feature arbitrary-names { + description + "This feature indicates that the device allows user-controlled + interfaces to be named arbitrarily."; + } + + feature pre-provisioning { + description + "This feature indicates that the device supports + pre-provisioning of interface configuration, i.e., it is + possible to configure an interface whose physical interface + hardware is not present on the device."; + } + + feature if-mib { + description + "This feature indicates that the device implements + the IF-MIB."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + + identity interface-type { + description + "Base identity from which specific interface types are + derived."; + } + + typedef interface-ref { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + configured interfaces."; + } + + typedef interface-state-ref { + type leafref { + path "/if:interfaces-state/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + the operationally present interfaces."; + } + + container interfaces { + description + "Interface configuration parameters."; + list interface { + key "name"; + description + "The list of configured interfaces on the device. + + The operational state of an interface is available in the + /interfaces-state/interface list. If the configuration of a + system-controlled interface cannot be used by the system + (e.g., the interface hardware present does not match the + interface type), then the configuration is not applied to + the system-controlled interface shown in the + /interfaces-state/interface list. If the configuration + of a user-controlled interface cannot be used by the system, + the configured interface is not instantiated in the + /interfaces-state/interface list."; + leaf name { + type string; + description + "The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. The 'config false' + list /interfaces-state/interface contains the currently + existing interfaces on the device. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + /interfaces-state/interface list, the server MAY reject + the request if the implementation does not support + pre-provisioning of interfaces or if the name refers to + an interface that can never exist in the system. A + NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case. + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + /interface-state/interface list."; + } + + leaf description { + type string; + description + "A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + datastore. + + Specifically, if the device supports ':startup', when + ifAlias is read the device MUST return the value of + 'description' in the 'startup' datastore, and when it is + written, it MUST be written to the 'running' and 'startup' + datastores. Note that it is up to the implementation to + + decide whether to modify this single leaf in 'startup' or + perform an implicit copy-config from 'running' to + 'startup'. + + If the device does not support ':startup', ifAlias MUST + be mapped to the 'description' leaf in the 'running' + datastore."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf enabled { + type boolean; + default "true"; + description + "This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the 'running' datastore to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + + + Changes in this leaf in the 'running' datastore are + reflected in ifAdminStatus, but if ifAdminStatus is + changed over SNMP, this leaf is not affected."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf link-up-down-trap-enable { + if-feature "if-mib"; + type enumeration { + enum "enabled" { + value 1; + } + enum "disabled" { + value 2; + } + } + description + "Controls whether linkUp/linkDown SNMP notifications + should be generated for this interface. + + If this node is not configured, the value 'enabled' is + operationally used by the server for interfaces that do + not operate on top of any other interface (i.e., there are + no 'lower-layer-if' entries), and 'disabled' otherwise."; + reference + "RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable"; + } + } + } + + container interfaces-state { + config false; + description + "Data nodes for the operational state of interfaces."; + list interface { + key "name"; + description + "The list of interfaces on the device. + + System-controlled interfaces created by the system are + always present in this list, whether they are configured or + not."; + leaf name { + type string; + description + "The name of the interface. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf admin-status { + if-feature "if-mib"; + type enumeration { + enum "up" { + value 1; + description + "Ready to pass packets."; + } + enum "down" { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum "testing" { + value 3; + description + "In some test mode."; + } + } + mandatory true; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum "up" { + value 1; + description + "Ready to pass packets."; + } + enum "down" { + value 2; + description + "The interface does not pass any packets."; + } + enum "testing" { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum "unknown" { + value 4; + description + "Status cannot be determined for some reason."; + } + enum "dormant" { + value 5; + description + "Waiting for some external event."; + } + enum "not-present" { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum "lower-layer-down" { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + mandatory true; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature "if-mib"; + type int32 { + range "1..2147483647"; + } + mandatory true; + description + "The ifIndex value for the ifEntry represented by this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + + + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-state-ref; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-state-ref; + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + description + "A collection of interface-related statistics objects."; + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + + + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-interfaces@2014-05-08.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-interfaces@2014-05-08.yin new file mode 100644 index 00000000..20cc15cb --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-interfaces@2014-05-08.yin @@ -0,0 +1,724 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-interfaces" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"> + <yang-version value="1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-interfaces"/> + <prefix value="if"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + </import> + <organization> + <text>IETF NETMOD (NETCONF Data Modeling Language) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netmod/&gt; +WG List: &lt;mailto:netmod@ietf.org&gt; + +WG Chair: Thomas Nadeau + &lt;mailto:tnadeau@lucidvision.com&gt; + +WG Chair: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt; + +Editor: Martin Bjorklund + &lt;mailto:mbj@tail-f.com&gt;</text> + </contact> + <description> + <text>This module contains a collection of YANG definitions for +managing network interfaces. + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 7223; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2014-05-08"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 7223: A YANG Data Model for Interface Management</text> + </reference> + </revision> + <feature name="arbitrary-names"> + <description> + <text>This feature indicates that the device allows user-controlled +interfaces to be named arbitrarily.</text> + </description> + </feature> + <feature name="pre-provisioning"> + <description> + <text>This feature indicates that the device supports +pre-provisioning of interface configuration, i.e., it is +possible to configure an interface whose physical interface +hardware is not present on the device.</text> + </description> + </feature> + <feature name="if-mib"> + <description> + <text>This feature indicates that the device implements +the IF-MIB.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB</text> + </reference> + </feature> + <identity name="interface-type"> + <description> + <text>Base identity from which specific interface types are +derived.</text> + </description> + </identity> + <typedef name="interface-ref"> + <type name="leafref"> + <path value="/if:interfaces/if:interface/if:name"/> + </type> + <description> + <text>This type is used by data models that need to reference +configured interfaces.</text> + </description> + </typedef> + <typedef name="interface-state-ref"> + <type name="leafref"> + <path value="/if:interfaces-state/if:interface/if:name"/> + </type> + <description> + <text>This type is used by data models that need to reference +the operationally present interfaces.</text> + </description> + </typedef> + <container name="interfaces"> + <description> + <text>Interface configuration parameters.</text> + </description> + <list name="interface"> + <key value="name"/> + <description> + <text>The list of configured interfaces on the device. + +The operational state of an interface is available in the +/interfaces-state/interface list. If the configuration of a +system-controlled interface cannot be used by the system +(e.g., the interface hardware present does not match the +interface type), then the configuration is not applied to +the system-controlled interface shown in the +/interfaces-state/interface list. If the configuration +of a user-controlled interface cannot be used by the system, +the configured interface is not instantiated in the +/interfaces-state/interface list.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>The name of the interface. + +A device MAY restrict the allowed values for this leaf, +possibly depending on the type of the interface. +For system-controlled interfaces, this leaf is the +device-specific name of the interface. The 'config false' +list /interfaces-state/interface contains the currently +existing interfaces on the device. + +If a client tries to create configuration for a +system-controlled interface that is not present in the +/interfaces-state/interface list, the server MAY reject +the request if the implementation does not support +pre-provisioning of interfaces or if the name refers to +an interface that can never exist in the system. A +NETCONF server MUST reply with an rpc-error with the +error-tag 'invalid-value' in this case. + +If the device supports pre-provisioning of interface +configuration, the 'pre-provisioning' feature is +advertised. + +If the device allows arbitrarily named user-controlled +interfaces, the 'arbitrary-names' feature is advertised. + +When a configured user-controlled interface is created by +the system, it is instantiated with the same name in the +/interface-state/interface list.</text> + </description> + </leaf> + <leaf name="description"> + <type name="string"/> + <description> + <text>A textual description of the interface. + +A server implementation MAY map this leaf to the ifAlias +MIB object. Such an implementation needs to use some +mechanism to handle the differences in size and characters +allowed between this leaf and ifAlias. The definition of +such a mechanism is outside the scope of this document. + +Since ifAlias is defined to be stored in non-volatile +storage, the MIB implementation MUST map ifAlias to the +value of 'description' in the persistently stored +datastore. + +Specifically, if the device supports ':startup', when +ifAlias is read the device MUST return the value of +'description' in the 'startup' datastore, and when it is +written, it MUST be written to the 'running' and 'startup' +datastores. Note that it is up to the implementation to + +decide whether to modify this single leaf in 'startup' or +perform an implicit copy-config from 'running' to +'startup'. + +If the device does not support ':startup', ifAlias MUST +be mapped to the 'description' leaf in the 'running' +datastore.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifAlias</text> + </reference> + </leaf> + <leaf name="type"> + <type name="identityref"> + <base name="interface-type"/> + </type> + <mandatory value="true"/> + <description> + <text>The type of the interface. + +When an interface entry is created, a server MAY +initialize the type leaf with a valid value, e.g., if it +is possible to derive the type from the name of the +interface. + +If a client tries to set the type of an interface to a +value that can never be used by the system, e.g., if the +type is not supported or if the type does not match the +name of the interface, the server MUST reject the request. +A NETCONF server MUST reply with an rpc-error with the +error-tag 'invalid-value' in this case.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifType</text> + </reference> + </leaf> + <leaf name="enabled"> + <type name="boolean"/> + <default value="true"/> + <description> + <text>This leaf contains the configured, desired state of the +interface. + +Systems that implement the IF-MIB use the value of this +leaf in the 'running' datastore to set +IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry +has been initialized, as described in RFC 2863. + + + +Changes in this leaf in the 'running' datastore are +reflected in ifAdminStatus, but if ifAdminStatus is +changed over SNMP, this leaf is not affected.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifAdminStatus</text> + </reference> + </leaf> + <leaf name="link-up-down-trap-enable"> + <if-feature name="if-mib"/> + <type name="enumeration"> + <enum name="enabled"> + <value value="1"/> + </enum> + <enum name="disabled"> + <value value="2"/> + </enum> + </type> + <description> + <text>Controls whether linkUp/linkDown SNMP notifications +should be generated for this interface. + +If this node is not configured, the value 'enabled' is +operationally used by the server for interfaces that do +not operate on top of any other interface (i.e., there are +no 'lower-layer-if' entries), and 'disabled' otherwise.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable</text> + </reference> + </leaf> + </list> + </container> + <container name="interfaces-state"> + <config value="false"/> + <description> + <text>Data nodes for the operational state of interfaces.</text> + </description> + <list name="interface"> + <key value="name"/> + <description> + <text>The list of interfaces on the device. + +System-controlled interfaces created by the system are +always present in this list, whether they are configured or +not.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>The name of the interface. + +A server implementation MAY map this leaf to the ifName +MIB object. Such an implementation needs to use some +mechanism to handle the differences in size and characters +allowed between this leaf and ifName. The definition of +such a mechanism is outside the scope of this document.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifName</text> + </reference> + </leaf> + <leaf name="type"> + <type name="identityref"> + <base name="interface-type"/> + </type> + <mandatory value="true"/> + <description> + <text>The type of the interface.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifType</text> + </reference> + </leaf> + <leaf name="admin-status"> + <if-feature name="if-mib"/> + <type name="enumeration"> + <enum name="up"> + <value value="1"/> + <description> + <text>Ready to pass packets.</text> + </description> + </enum> + <enum name="down"> + <value value="2"/> + <description> + <text>Not ready to pass packets and not in some test mode.</text> + </description> + </enum> + <enum name="testing"> + <value value="3"/> + <description> + <text>In some test mode.</text> + </description> + </enum> + </type> + <mandatory value="true"/> + <description> + <text>The desired state of the interface. + +This leaf has the same read semantics as ifAdminStatus.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifAdminStatus</text> + </reference> + </leaf> + <leaf name="oper-status"> + <type name="enumeration"> + <enum name="up"> + <value value="1"/> + <description> + <text>Ready to pass packets.</text> + </description> + </enum> + <enum name="down"> + <value value="2"/> + <description> + <text>The interface does not pass any packets.</text> + </description> + </enum> + <enum name="testing"> + <value value="3"/> + <description> + <text>In some test mode. No operational packets can +be passed.</text> + </description> + </enum> + <enum name="unknown"> + <value value="4"/> + <description> + <text>Status cannot be determined for some reason.</text> + </description> + </enum> + <enum name="dormant"> + <value value="5"/> + <description> + <text>Waiting for some external event.</text> + </description> + </enum> + <enum name="not-present"> + <value value="6"/> + <description> + <text>Some component (typically hardware) is missing.</text> + </description> + </enum> + <enum name="lower-layer-down"> + <value value="7"/> + <description> + <text>Down due to state of lower-layer interface(s).</text> + </description> + </enum> + </type> + <mandatory value="true"/> + <description> + <text>The current operational state of the interface. + +This leaf has the same semantics as ifOperStatus.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifOperStatus</text> + </reference> + </leaf> + <leaf name="last-change"> + <type name="yang:date-and-time"/> + <description> + <text>The time the interface entered its current operational +state. If the current state was entered prior to the +last re-initialization of the local network management +subsystem, then this node is not present.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifLastChange</text> + </reference> + </leaf> + <leaf name="if-index"> + <if-feature name="if-mib"/> + <type name="int32"> + <range value="1..2147483647"/> + </type> + <mandatory value="true"/> + <description> + <text>The ifIndex value for the ifEntry represented by this +interface.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifIndex</text> + </reference> + </leaf> + <leaf name="phys-address"> + <type name="yang:phys-address"/> + <description> + <text>The interface's address at its protocol sub-layer. For +example, for an 802.x interface, this object normally +contains a Media Access Control (MAC) address. The +interface's media-specific modules must define the bit + + +and byte ordering and the format of the value of this +object. For interfaces that do not have such an address +(e.g., a serial line), this node is not present.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifPhysAddress</text> + </reference> + </leaf> + <leaf-list name="higher-layer-if"> + <type name="interface-state-ref"/> + <description> + <text>A list of references to interfaces layered on top of this +interface.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifStackTable</text> + </reference> + </leaf-list> + <leaf-list name="lower-layer-if"> + <type name="interface-state-ref"/> + <description> + <text>A list of references to interfaces layered underneath this +interface.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifStackTable</text> + </reference> + </leaf-list> + <leaf name="speed"> + <type name="yang:gauge64"/> + <units name="bits/second"/> + <description> + <text>An estimate of the interface's current bandwidth in bits +per second. For interfaces that do not vary in +bandwidth or for those where no accurate estimation can +be made, this node should contain the nominal bandwidth. +For interfaces that have no concept of bandwidth, this +node is not present.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed</text> + </reference> + </leaf> + <container name="statistics"> + <description> + <text>A collection of interface-related statistics objects.</text> + </description> + <leaf name="discontinuity-time"> + <type name="yang:date-and-time"/> + <mandatory value="true"/> + <description> + <text>The time on the most recent occasion at which any one or +more of this interface's counters suffered a +discontinuity. If no such discontinuities have occurred +since the last re-initialization of the local management +subsystem, then this node contains the time the local +management subsystem re-initialized itself.</text> + </description> + </leaf> + <leaf name="in-octets"> + <type name="yang:counter64"/> + <description> + <text>The total number of octets received on the interface, +including framing characters. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifHCInOctets</text> + </reference> + </leaf> + <leaf name="in-unicast-pkts"> + <type name="yang:counter64"/> + <description> + <text>The number of packets, delivered by this sub-layer to a +higher (sub-)layer, that were not addressed to a +multicast or broadcast address at this sub-layer. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts</text> + </reference> + </leaf> + <leaf name="in-broadcast-pkts"> + <type name="yang:counter64"/> + <description> + <text>The number of packets, delivered by this sub-layer to a +higher (sub-)layer, that were addressed to a broadcast +address at this sub-layer. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts</text> + </reference> + </leaf> + <leaf name="in-multicast-pkts"> + <type name="yang:counter64"/> + <description> + <text>The number of packets, delivered by this sub-layer to a +higher (sub-)layer, that were addressed to a multicast +address at this sub-layer. For a MAC-layer protocol, +this includes both Group and Functional addresses. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts</text> + </reference> + </leaf> + <leaf name="in-discards"> + <type name="yang:counter32"/> + <description> + <text>The number of inbound packets that were chosen to be +discarded even though no errors had been detected to +prevent their being deliverable to a higher-layer +protocol. One possible reason for discarding such a +packet could be to free up buffer space. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifInDiscards</text> + </reference> + </leaf> + <leaf name="in-errors"> + <type name="yang:counter32"/> + <description> + <text>For packet-oriented interfaces, the number of inbound +packets that contained errors preventing them from being +deliverable to a higher-layer protocol. For character- +oriented or fixed-length interfaces, the number of +inbound transmission units that contained errors +preventing them from being deliverable to a higher-layer +protocol. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifInErrors</text> + </reference> + </leaf> + <leaf name="in-unknown-protos"> + <type name="yang:counter32"/> + <description> + <text>For packet-oriented interfaces, the number of packets +received via the interface that were discarded because +of an unknown or unsupported protocol. For +character-oriented or fixed-length interfaces that +support protocol multiplexing, the number of +transmission units received via the interface that were +discarded because of an unknown or unsupported protocol. +For any interface that does not support protocol +multiplexing, this counter is not present. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifInUnknownProtos</text> + </reference> + </leaf> + <leaf name="out-octets"> + <type name="yang:counter64"/> + <description> + <text>The total number of octets transmitted out of the +interface, including framing characters. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifHCOutOctets</text> + </reference> + </leaf> + <leaf name="out-unicast-pkts"> + <type name="yang:counter64"/> + <description> + <text>The total number of packets that higher-level protocols +requested be transmitted, and that were not addressed +to a multicast or broadcast address at this sub-layer, +including those that were discarded or not sent. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts</text> + </reference> + </leaf> + <leaf name="out-broadcast-pkts"> + <type name="yang:counter64"/> + <description> + <text>The total number of packets that higher-level protocols +requested be transmitted, and that were addressed to a +broadcast address at this sub-layer, including those +that were discarded or not sent. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts</text> + </reference> + </leaf> + <leaf name="out-multicast-pkts"> + <type name="yang:counter64"/> + <description> + <text>The total number of packets that higher-level protocols +requested be transmitted, and that were addressed to a +multicast address at this sub-layer, including those +that were discarded or not sent. For a MAC-layer +protocol, this includes both Group and Functional +addresses. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts</text> + </reference> + </leaf> + <leaf name="out-discards"> + <type name="yang:counter32"/> + <description> + <text>The number of outbound packets that were chosen to be +discarded even though no errors had been detected to +prevent their being transmitted. One possible reason +for discarding such a packet could be to free up buffer +space. + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifOutDiscards</text> + </reference> + </leaf> + <leaf name="out-errors"> + <type name="yang:counter32"/> + <description> + <text>For packet-oriented interfaces, the number of outbound +packets that could not be transmitted because of errors. +For character-oriented or fixed-length interfaces, the +number of outbound transmission units that could not be +transmitted because of errors. + + + + +Discontinuities in the value of this counter can occur +at re-initialization of the management system, and at +other times as indicated by the value of +'discontinuity-time'.</text> + </description> + <reference> + <text>RFC 2863: The Interfaces Group MIB - ifOutErrors</text> + </reference> + </leaf> + </container> + </list> + </container> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ip@2014-06-16.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ip@2014-06-16.yang new file mode 100644 index 00000000..5573f1ea --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ip@2014-06-16.yang @@ -0,0 +1,718 @@ + + module ietf-ip { + yang-version 1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; + prefix ip; + + import ietf-interfaces { + prefix if; + } + + import ietf-inet-types { + prefix inet; + } + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module contains a collection of YANG definitions for + configuring IP implementations. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7277; see + the RFC itself for full legal notices."; + + revision 2014-06-16 { + description + "Initial revision."; + reference + "RFC 7277: A YANG Data Model for IP Management"; + } + + feature ipv4-non-contiguous-netmasks { + description + "Indicates support for configuring non-contiguous + subnet masks."; + } + + feature ipv6-privacy-autoconf { + description + "Indicates support for Privacy Extensions for Stateless Address + Autoconfiguration in IPv6."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + typedef ip-address-origin { + type enumeration { + enum "other" { + value 0; + description + "None of the following."; + } + enum "static" { + value 1; + description + "Indicates that the address has been statically + configured - for example, using NETCONF or a Command Line + Interface."; + } + enum "dhcp" { + value 2; + description + "Indicates an address that has been assigned to this + system by a DHCP server."; + } + enum "link-layer" { + value 3; + description + "Indicates an address created by IPv6 stateless + autoconfiguration that embeds a link-layer address in its + interface identifier."; + } + enum "random" { + value 4; + description + "Indicates an address chosen by the system at + + random, e.g., an IPv4 address within 169.254/16, an + RFC 4941 temporary address, or an RFC 7217 semantically + opaque address."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + RFC 7217: A Method for Generating Semantically Opaque + Interface Identifiers with IPv6 Stateless + Address Autoconfiguration (SLAAC)"; + } + } + description + "The origin of an address."; + } + + typedef neighbor-origin { + type enumeration { + enum "other" { + value 0; + description + "None of the following."; + } + enum "static" { + value 1; + description + "Indicates that the mapping has been statically + configured - for example, using NETCONF or a Command Line + Interface."; + } + enum "dynamic" { + value 2; + description + "Indicates that the mapping has been dynamically resolved + using, e.g., IPv4 ARP or the IPv6 Neighbor Discovery + protocol."; + } + } + description + "The origin of a neighbor entry."; + } + + augment "/if:interfaces/if:interface" { + description + "Parameters for configuring IP on interfaces. + + If an interface is not capable of running IP, the server + must not allow the client to configure these parameters."; + container ipv4 { + presence "Enables IPv4 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv4 address family."; + leaf enabled { + type boolean; + default "true"; + description + "Controls whether IPv4 is enabled or disabled on this + interface. When IPv4 is enabled, this interface is + connected to an IPv4 stack, and the interface can send + and receive IPv4 packets."; + } + + leaf forwarding { + type boolean; + default "false"; + description + "Controls IPv4 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv4 routers + forward datagrams. IPv4 hosts do not (except those + source-routed via the host)."; + } + + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 791: Internet Protocol"; + } + + list address { + key "ip"; + description + "The list of configured IPv4 addresses on the interface."; + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + + choice subnet { + mandatory true; + description + "The subnet can be specified as a prefix-length, or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + + leaf netmask { + if-feature "ipv4-non-contiguous-netmasks"; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + } + + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + Entries in this list are used as static entries in the + ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + } + } + + container ipv6 { + presence "Enables IPv6 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv6 address family."; + leaf enabled { + type boolean; + default "true"; + description + "Controls whether IPv6 is enabled or disabled on this + interface. When IPv6 is enabled, this interface is + connected to an IPv6 stack, and the interface can send + and receive IPv6 packets."; + } + + leaf forwarding { + type boolean; + default "false"; + description + "Controls IPv6 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv6 routers + forward datagrams. IPv6 hosts do not (except those + source-routed via the host)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + Section 5"; + } + + list address { + key "ip"; + description + "The list of configured IPv6 addresses on the interface."; + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + } + + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + Entries in this list are used as static entries in the + Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + } + + leaf dup-addr-detect-transmits { + type uint32; + default "1"; + description + "The number of consecutive Neighbor Solicitation messages + sent while performing Duplicate Address Detection on a + tentative address. A value of zero indicates that + Duplicate Address Detection is not performed on + tentative addresses. A value of one indicates a single + transmission with no follow-up retransmissions."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + + container autoconf { + description + "Parameters to control the autoconfiguration of IPv6 + addresses, as described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + leaf create-global-addresses { + type boolean; + default "true"; + description + "If enabled, the host creates global addresses as + described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration + Section 5.5"; + } + + leaf create-temporary-addresses { + if-feature "ipv6-privacy-autoconf"; + type boolean; + default "false"; + description + "If enabled, the host creates temporary addresses as + described in RFC 4941."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + leaf temporary-valid-lifetime { + if-feature "ipv6-privacy-autoconf"; + type uint32; + units "seconds"; + default "604800"; + description + "The time period during which the temporary address + is valid."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_VALID_LIFETIME"; + } + + leaf temporary-preferred-lifetime { + if-feature "ipv6-privacy-autoconf"; + type uint32; + units "seconds"; + default "86400"; + description + "The time period during which the temporary address is + preferred."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_PREFERRED_LIFETIME"; + } + } + } + } + + augment "/if:interfaces-state/if:interface" { + description + "Data nodes for the operational state of IP on interfaces."; + container ipv4 { + presence "Present if IPv4 is enabled on this interface"; + config false; + description + "Interface-specific parameters for the IPv4 address family."; + leaf forwarding { + type boolean; + description + "Indicates whether IPv4 packet forwarding is enabled or + disabled on this interface."; + } + + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive."; + reference + "RFC 791: Internet Protocol"; + } + + list address { + key "ip"; + description + "The list of IPv4 addresses on the interface."; + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + + choice subnet { + description + "The subnet can be specified as a prefix-length, or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + + leaf netmask { + if-feature "ipv4-non-contiguous-netmasks"; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + + leaf origin { + type ip-address-origin; + description + "The origin of this address."; + } + } + + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + This list represents the ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + + leaf link-layer-address { + type yang:phys-address; + description + "The link-layer address of the neighbor node."; + } + + leaf origin { + type neighbor-origin; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence "Present if IPv6 is enabled on this interface"; + config false; + description + "Parameters for the IPv6 address family."; + leaf forwarding { + type boolean; + default "false"; + description + "Indicates whether IPv6 packet forwarding is enabled or + disabled on this interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive."; + reference + "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + Section 5"; + } + + list address { + key "ip"; + description + "The list of IPv6 addresses on the interface."; + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + + leaf origin { + type ip-address-origin; + description + "The origin of this address."; + } + + leaf status { + type enumeration { + enum "preferred" { + value 0; + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum "deprecated" { + value 1; + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum "invalid" { + value 2; + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + enum "inaccessible" { + value 3; + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum "unknown" { + value 4; + description + "The status cannot be determined for some reason."; + } + enum "tentative" { + value 5; + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum "duplicate" { + value 6; + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum "optimistic" { + value 7; + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + This list represents the Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + + leaf link-layer-address { + type yang:phys-address; + description + "The link-layer address of the neighbor node."; + } + + leaf origin { + type neighbor-origin; + description + "The origin of this neighbor entry."; + } + + leaf is-router { + type empty; + description + "Indicates that the neighbor node acts as a router."; + } + + leaf state { + type enumeration { + enum "incomplete" { + value 0; + description + "Address resolution is in progress, and the link-layer + address of the neighbor has not yet been + determined."; + } + enum "reachable" { + value 1; + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum "stale" { + value 2; + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum "delay" { + value 3; + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum "probe" { + value 4; + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ip@2014-06-16.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ip@2014-06-16.yin new file mode 100644 index 00000000..503e2b9a --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ip@2014-06-16.yin @@ -0,0 +1,782 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-ip" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ip="urn:ietf:params:xml:ns:yang:ietf-ip" + xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"> + <yang-version value="1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-ip"/> + <prefix value="ip"/> + <import module="ietf-interfaces"> + <prefix value="if"/> + </import> + <import module="ietf-inet-types"> + <prefix value="inet"/> + </import> + <import module="ietf-yang-types"> + <prefix value="yang"/> + </import> + <organization> + <text>IETF NETMOD (NETCONF Data Modeling Language) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netmod/&gt; +WG List: &lt;mailto:netmod@ietf.org&gt; + +WG Chair: Thomas Nadeau + &lt;mailto:tnadeau@lucidvision.com&gt; + +WG Chair: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt; + +Editor: Martin Bjorklund + &lt;mailto:mbj@tail-f.com&gt;</text> + </contact> + <description> + <text>This module contains a collection of YANG definitions for +configuring IP implementations. + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 7277; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2014-06-16"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 7277: A YANG Data Model for IP Management</text> + </reference> + </revision> + <feature name="ipv4-non-contiguous-netmasks"> + <description> + <text>Indicates support for configuring non-contiguous +subnet masks.</text> + </description> + </feature> + <feature name="ipv6-privacy-autoconf"> + <description> + <text>Indicates support for Privacy Extensions for Stateless Address +Autoconfiguration in IPv6.</text> + </description> + <reference> + <text>RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6</text> + </reference> + </feature> + <typedef name="ip-address-origin"> + <type name="enumeration"> + <enum name="other"> + <value value="0"/> + <description> + <text>None of the following.</text> + </description> + </enum> + <enum name="static"> + <value value="1"/> + <description> + <text>Indicates that the address has been statically +configured - for example, using NETCONF or a Command Line +Interface.</text> + </description> + </enum> + <enum name="dhcp"> + <value value="2"/> + <description> + <text>Indicates an address that has been assigned to this +system by a DHCP server.</text> + </description> + </enum> + <enum name="link-layer"> + <value value="3"/> + <description> + <text>Indicates an address created by IPv6 stateless +autoconfiguration that embeds a link-layer address in its +interface identifier.</text> + </description> + </enum> + <enum name="random"> + <value value="4"/> + <description> + <text>Indicates an address chosen by the system at + +random, e.g., an IPv4 address within 169.254/16, an +RFC 4941 temporary address, or an RFC 7217 semantically +opaque address.</text> + </description> + <reference> + <text>RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 +RFC 7217: A Method for Generating Semantically Opaque + Interface Identifiers with IPv6 Stateless + Address Autoconfiguration (SLAAC)</text> + </reference> + </enum> + </type> + <description> + <text>The origin of an address.</text> + </description> + </typedef> + <typedef name="neighbor-origin"> + <type name="enumeration"> + <enum name="other"> + <value value="0"/> + <description> + <text>None of the following.</text> + </description> + </enum> + <enum name="static"> + <value value="1"/> + <description> + <text>Indicates that the mapping has been statically +configured - for example, using NETCONF or a Command Line +Interface.</text> + </description> + </enum> + <enum name="dynamic"> + <value value="2"/> + <description> + <text>Indicates that the mapping has been dynamically resolved +using, e.g., IPv4 ARP or the IPv6 Neighbor Discovery +protocol.</text> + </description> + </enum> + </type> + <description> + <text>The origin of a neighbor entry.</text> + </description> + </typedef> + <augment target-node="/if:interfaces/if:interface"> + <description> + <text>Parameters for configuring IP on interfaces. + +If an interface is not capable of running IP, the server +must not allow the client to configure these parameters.</text> + </description> + <container name="ipv4"> + <presence value="Enables IPv4 unless the 'enabled' leaf +(which defaults to 'true') is set to 'false'"/> + <description> + <text>Parameters for the IPv4 address family.</text> + </description> + <leaf name="enabled"> + <type name="boolean"/> + <default value="true"/> + <description> + <text>Controls whether IPv4 is enabled or disabled on this +interface. When IPv4 is enabled, this interface is +connected to an IPv4 stack, and the interface can send +and receive IPv4 packets.</text> + </description> + </leaf> + <leaf name="forwarding"> + <type name="boolean"/> + <default value="false"/> + <description> + <text>Controls IPv4 packet forwarding of datagrams received by, +but not addressed to, this interface. IPv4 routers +forward datagrams. IPv4 hosts do not (except those +source-routed via the host).</text> + </description> + </leaf> + <leaf name="mtu"> + <type name="uint16"> + <range value="68..max"/> + </type> + <units name="octets"/> + <description> + <text>The size, in octets, of the largest IPv4 packet that the +interface will send and receive. + +The server may restrict the allowed values for this leaf, +depending on the interface's type. + +If this leaf is not configured, the operationally used MTU +depends on the interface's type.</text> + </description> + <reference> + <text>RFC 791: Internet Protocol</text> + </reference> + </leaf> + <list name="address"> + <key value="ip"/> + <description> + <text>The list of configured IPv4 addresses on the interface.</text> + </description> + <leaf name="ip"> + <type name="inet:ipv4-address-no-zone"/> + <description> + <text>The IPv4 address on the interface.</text> + </description> + </leaf> + <choice name="subnet"> + <mandatory value="true"/> + <description> + <text>The subnet can be specified as a prefix-length, or, +if the server supports non-contiguous netmasks, as +a netmask.</text> + </description> + <leaf name="prefix-length"> + <type name="uint8"> + <range value="0..32"/> + </type> + <description> + <text>The length of the subnet prefix.</text> + </description> + </leaf> + <leaf name="netmask"> + <if-feature name="ipv4-non-contiguous-netmasks"/> + <type name="yang:dotted-quad"/> + <description> + <text>The subnet specified as a netmask.</text> + </description> + </leaf> + </choice> + </list> + <list name="neighbor"> + <key value="ip"/> + <description> + <text>A list of mappings from IPv4 addresses to +link-layer addresses. + +Entries in this list are used as static entries in the +ARP Cache.</text> + </description> + <reference> + <text>RFC 826: An Ethernet Address Resolution Protocol</text> + </reference> + <leaf name="ip"> + <type name="inet:ipv4-address-no-zone"/> + <description> + <text>The IPv4 address of the neighbor node.</text> + </description> + </leaf> + <leaf name="link-layer-address"> + <type name="yang:phys-address"/> + <mandatory value="true"/> + <description> + <text>The link-layer address of the neighbor node.</text> + </description> + </leaf> + </list> + </container> + <container name="ipv6"> + <presence value="Enables IPv6 unless the 'enabled' leaf +(which defaults to 'true') is set to 'false'"/> + <description> + <text>Parameters for the IPv6 address family.</text> + </description> + <leaf name="enabled"> + <type name="boolean"/> + <default value="true"/> + <description> + <text>Controls whether IPv6 is enabled or disabled on this +interface. When IPv6 is enabled, this interface is +connected to an IPv6 stack, and the interface can send +and receive IPv6 packets.</text> + </description> + </leaf> + <leaf name="forwarding"> + <type name="boolean"/> + <default value="false"/> + <description> + <text>Controls IPv6 packet forwarding of datagrams received by, +but not addressed to, this interface. IPv6 routers +forward datagrams. IPv6 hosts do not (except those +source-routed via the host).</text> + </description> + <reference> + <text>RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter</text> + </reference> + </leaf> + <leaf name="mtu"> + <type name="uint32"> + <range value="1280..max"/> + </type> + <units name="octets"/> + <description> + <text>The size, in octets, of the largest IPv6 packet that the +interface will send and receive. + +The server may restrict the allowed values for this leaf, +depending on the interface's type. + +If this leaf is not configured, the operationally used MTU +depends on the interface's type.</text> + </description> + <reference> + <text>RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + Section 5</text> + </reference> + </leaf> + <list name="address"> + <key value="ip"/> + <description> + <text>The list of configured IPv6 addresses on the interface.</text> + </description> + <leaf name="ip"> + <type name="inet:ipv6-address-no-zone"/> + <description> + <text>The IPv6 address on the interface.</text> + </description> + </leaf> + <leaf name="prefix-length"> + <type name="uint8"> + <range value="0..128"/> + </type> + <mandatory value="true"/> + <description> + <text>The length of the subnet prefix.</text> + </description> + </leaf> + </list> + <list name="neighbor"> + <key value="ip"/> + <description> + <text>A list of mappings from IPv6 addresses to +link-layer addresses. + +Entries in this list are used as static entries in the +Neighbor Cache.</text> + </description> + <reference> + <text>RFC 4861: Neighbor Discovery for IP version 6 (IPv6)</text> + </reference> + <leaf name="ip"> + <type name="inet:ipv6-address-no-zone"/> + <description> + <text>The IPv6 address of the neighbor node.</text> + </description> + </leaf> + <leaf name="link-layer-address"> + <type name="yang:phys-address"/> + <mandatory value="true"/> + <description> + <text>The link-layer address of the neighbor node.</text> + </description> + </leaf> + </list> + <leaf name="dup-addr-detect-transmits"> + <type name="uint32"/> + <default value="1"/> + <description> + <text>The number of consecutive Neighbor Solicitation messages +sent while performing Duplicate Address Detection on a +tentative address. A value of zero indicates that +Duplicate Address Detection is not performed on +tentative addresses. A value of one indicates a single +transmission with no follow-up retransmissions.</text> + </description> + <reference> + <text>RFC 4862: IPv6 Stateless Address Autoconfiguration</text> + </reference> + </leaf> + <container name="autoconf"> + <description> + <text>Parameters to control the autoconfiguration of IPv6 +addresses, as described in RFC 4862.</text> + </description> + <reference> + <text>RFC 4862: IPv6 Stateless Address Autoconfiguration</text> + </reference> + <leaf name="create-global-addresses"> + <type name="boolean"/> + <default value="true"/> + <description> + <text>If enabled, the host creates global addresses as +described in RFC 4862.</text> + </description> + <reference> + <text>RFC 4862: IPv6 Stateless Address Autoconfiguration + Section 5.5</text> + </reference> + </leaf> + <leaf name="create-temporary-addresses"> + <if-feature name="ipv6-privacy-autoconf"/> + <type name="boolean"/> + <default value="false"/> + <description> + <text>If enabled, the host creates temporary addresses as +described in RFC 4941.</text> + </description> + <reference> + <text>RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6</text> + </reference> + </leaf> + <leaf name="temporary-valid-lifetime"> + <if-feature name="ipv6-privacy-autoconf"/> + <type name="uint32"/> + <units name="seconds"/> + <default value="604800"/> + <description> + <text>The time period during which the temporary address +is valid.</text> + </description> + <reference> + <text>RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_VALID_LIFETIME</text> + </reference> + </leaf> + <leaf name="temporary-preferred-lifetime"> + <if-feature name="ipv6-privacy-autoconf"/> + <type name="uint32"/> + <units name="seconds"/> + <default value="86400"/> + <description> + <text>The time period during which the temporary address is +preferred.</text> + </description> + <reference> + <text>RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_PREFERRED_LIFETIME</text> + </reference> + </leaf> + </container> + </container> + </augment> + <augment target-node="/if:interfaces-state/if:interface"> + <description> + <text>Data nodes for the operational state of IP on interfaces.</text> + </description> + <container name="ipv4"> + <presence value="Present if IPv4 is enabled on this interface"/> + <config value="false"/> + <description> + <text>Interface-specific parameters for the IPv4 address family.</text> + </description> + <leaf name="forwarding"> + <type name="boolean"/> + <description> + <text>Indicates whether IPv4 packet forwarding is enabled or +disabled on this interface.</text> + </description> + </leaf> + <leaf name="mtu"> + <type name="uint16"> + <range value="68..max"/> + </type> + <units name="octets"/> + <description> + <text>The size, in octets, of the largest IPv4 packet that the +interface will send and receive.</text> + </description> + <reference> + <text>RFC 791: Internet Protocol</text> + </reference> + </leaf> + <list name="address"> + <key value="ip"/> + <description> + <text>The list of IPv4 addresses on the interface.</text> + </description> + <leaf name="ip"> + <type name="inet:ipv4-address-no-zone"/> + <description> + <text>The IPv4 address on the interface.</text> + </description> + </leaf> + <choice name="subnet"> + <description> + <text>The subnet can be specified as a prefix-length, or, +if the server supports non-contiguous netmasks, as +a netmask.</text> + </description> + <leaf name="prefix-length"> + <type name="uint8"> + <range value="0..32"/> + </type> + <description> + <text>The length of the subnet prefix.</text> + </description> + </leaf> + <leaf name="netmask"> + <if-feature name="ipv4-non-contiguous-netmasks"/> + <type name="yang:dotted-quad"/> + <description> + <text>The subnet specified as a netmask.</text> + </description> + </leaf> + </choice> + <leaf name="origin"> + <type name="ip-address-origin"/> + <description> + <text>The origin of this address.</text> + </description> + </leaf> + </list> + <list name="neighbor"> + <key value="ip"/> + <description> + <text>A list of mappings from IPv4 addresses to +link-layer addresses. + +This list represents the ARP Cache.</text> + </description> + <reference> + <text>RFC 826: An Ethernet Address Resolution Protocol</text> + </reference> + <leaf name="ip"> + <type name="inet:ipv4-address-no-zone"/> + <description> + <text>The IPv4 address of the neighbor node.</text> + </description> + </leaf> + <leaf name="link-layer-address"> + <type name="yang:phys-address"/> + <description> + <text>The link-layer address of the neighbor node.</text> + </description> + </leaf> + <leaf name="origin"> + <type name="neighbor-origin"/> + <description> + <text>The origin of this neighbor entry.</text> + </description> + </leaf> + </list> + </container> + <container name="ipv6"> + <presence value="Present if IPv6 is enabled on this interface"/> + <config value="false"/> + <description> + <text>Parameters for the IPv6 address family.</text> + </description> + <leaf name="forwarding"> + <type name="boolean"/> + <default value="false"/> + <description> + <text>Indicates whether IPv6 packet forwarding is enabled or +disabled on this interface.</text> + </description> + <reference> + <text>RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter</text> + </reference> + </leaf> + <leaf name="mtu"> + <type name="uint32"> + <range value="1280..max"/> + </type> + <units name="octets"/> + <description> + <text>The size, in octets, of the largest IPv6 packet that the +interface will send and receive.</text> + </description> + <reference> + <text>RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + Section 5</text> + </reference> + </leaf> + <list name="address"> + <key value="ip"/> + <description> + <text>The list of IPv6 addresses on the interface.</text> + </description> + <leaf name="ip"> + <type name="inet:ipv6-address-no-zone"/> + <description> + <text>The IPv6 address on the interface.</text> + </description> + </leaf> + <leaf name="prefix-length"> + <type name="uint8"> + <range value="0..128"/> + </type> + <mandatory value="true"/> + <description> + <text>The length of the subnet prefix.</text> + </description> + </leaf> + <leaf name="origin"> + <type name="ip-address-origin"/> + <description> + <text>The origin of this address.</text> + </description> + </leaf> + <leaf name="status"> + <type name="enumeration"> + <enum name="preferred"> + <value value="0"/> + <description> + <text>This is a valid address that can appear as the +destination or source address of a packet.</text> + </description> + </enum> + <enum name="deprecated"> + <value value="1"/> + <description> + <text>This is a valid but deprecated address that should +no longer be used as a source address in new +communications, but packets addressed to such an +address are processed as expected.</text> + </description> + </enum> + <enum name="invalid"> + <value value="2"/> + <description> + <text>This isn't a valid address, and it shouldn't appear +as the destination or source address of a packet.</text> + </description> + </enum> + <enum name="inaccessible"> + <value value="3"/> + <description> + <text>The address is not accessible because the interface +to which this address is assigned is not +operational.</text> + </description> + </enum> + <enum name="unknown"> + <value value="4"/> + <description> + <text>The status cannot be determined for some reason.</text> + </description> + </enum> + <enum name="tentative"> + <value value="5"/> + <description> + <text>The uniqueness of the address on the link is being +verified. Addresses in this state should not be +used for general communication and should only be +used to determine the uniqueness of the address.</text> + </description> + </enum> + <enum name="duplicate"> + <value value="6"/> + <description> + <text>The address has been determined to be non-unique on +the link and so must not be used.</text> + </description> + </enum> + <enum name="optimistic"> + <value value="7"/> + <description> + <text>The address is available for use, subject to +restrictions, while its uniqueness on a link is +being verified.</text> + </description> + </enum> + </type> + <description> + <text>The status of an address. Most of the states correspond +to states from the IPv6 Stateless Address +Autoconfiguration protocol.</text> + </description> + <reference> + <text>RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC +RFC 4862: IPv6 Stateless Address Autoconfiguration</text> + </reference> + </leaf> + </list> + <list name="neighbor"> + <key value="ip"/> + <description> + <text>A list of mappings from IPv6 addresses to +link-layer addresses. + +This list represents the Neighbor Cache.</text> + </description> + <reference> + <text>RFC 4861: Neighbor Discovery for IP version 6 (IPv6)</text> + </reference> + <leaf name="ip"> + <type name="inet:ipv6-address-no-zone"/> + <description> + <text>The IPv6 address of the neighbor node.</text> + </description> + </leaf> + <leaf name="link-layer-address"> + <type name="yang:phys-address"/> + <description> + <text>The link-layer address of the neighbor node.</text> + </description> + </leaf> + <leaf name="origin"> + <type name="neighbor-origin"/> + <description> + <text>The origin of this neighbor entry.</text> + </description> + </leaf> + <leaf name="is-router"> + <type name="empty"/> + <description> + <text>Indicates that the neighbor node acts as a router.</text> + </description> + </leaf> + <leaf name="state"> + <type name="enumeration"> + <enum name="incomplete"> + <value value="0"/> + <description> + <text>Address resolution is in progress, and the link-layer +address of the neighbor has not yet been +determined.</text> + </description> + </enum> + <enum name="reachable"> + <value value="1"/> + <description> + <text>Roughly speaking, the neighbor is known to have been +reachable recently (within tens of seconds ago).</text> + </description> + </enum> + <enum name="stale"> + <value value="2"/> + <description> + <text>The neighbor is no longer known to be reachable, but +until traffic is sent to the neighbor no attempt +should be made to verify its reachability.</text> + </description> + </enum> + <enum name="delay"> + <value value="3"/> + <description> + <text>The neighbor is no longer known to be reachable, and +traffic has recently been sent to the neighbor. +Rather than probe the neighbor immediately, however, +delay sending probes for a short while in order to +give upper-layer protocols a chance to provide +reachability confirmation.</text> + </description> + </enum> + <enum name="probe"> + <value value="4"/> + <description> + <text>The neighbor is no longer known to be reachable, and +unicast Neighbor Solicitation probes are being sent +to verify reachability.</text> + </description> + </enum> + </type> + <description> + <text>The Neighbor Unreachability Detection state of this +entry.</text> + </description> + <reference> + <text>RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2</text> + </reference> + </leaf> + </list> + </container> + </augment> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-keystore@2016-10-31.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-keystore@2016-10-31.yang new file mode 100644 index 00000000..0c20bd6e --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-keystore@2016-10-31.yang @@ -0,0 +1,559 @@ + + module ietf-keystore { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-keystore"; + prefix ks; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Mahesh Jethanandani + <mailto:mjethanandani@gmail.com> + + Editor: Kent Watsen + <mailto:kwatsen@juniper.net>"; + description + "This module defines a keystore to centralize management of + security credentials. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC VVVV; see + the RFC itself for full legal notices."; + + revision 2016-10-31 { + description + "Initial version"; + reference + "RFC VVVV: NETCONF Server and RESTCONF Server Configuration + Models"; + } + + identity key-algorithm { + description + "Base identity from which all key-algorithms are derived."; + } + + identity rsa { + base key-algorithm; + description + "The RSA algorithm."; + reference + "RFC3447: Public-Key Cryptography Standards (PKCS) #1: + RSA Cryptography Specifications Version 2.1."; + } + + identity secp192r1 { + base key-algorithm; + description + "The secp192r1 algorithm."; + reference + "RFC5480: + Elliptic Curve Cryptography Subject Public Key Information."; + } + + identity secp256r1 { + base key-algorithm; + description + "The secp256r1 algorithm."; + reference + "RFC5480: + Elliptic Curve Cryptography Subject Public Key Information."; + } + + identity secp384r1 { + base key-algorithm; + description + "The secp384r1 algorithm."; + reference + "RFC5480: + Elliptic Curve Cryptography Subject Public Key Information."; + } + + identity secp521r1 { + base key-algorithm; + description + "The secp521r1 algorithm."; + reference + "RFC5480: + Elliptic Curve Cryptography Subject Public Key Information."; + } + + container keystore { + description + "A list of private-keys and their associated certificates, as + well as lists of trusted certificates for client certificate + authentication. RPCs are provided to generate a new private + key and to generate a certificate signing requests."; + container private-keys { + description + "A list of private key maintained by the keystore."; + list private-key { + key "name"; + description + "A private key."; + leaf name { + type string; + description + "An arbitrary name for the private key."; + } + + leaf algorithm { + type identityref { + base key-algorithm; + } + config false; + description + "The algorithm used by the private key."; + } + + leaf key-length { + type uint32; + config false; + description + "The key-length used by the private key."; + } + + leaf public-key { + type binary; + config false; + mandatory true; + description + "An OneAsymmetricKey 'publicKey' structure as specified + by RFC 5958, Section 2 encoded using the ASN.1 + distinguished encoding rules (DER), as specified + in ITU-T X.690."; + reference + "RFC 5958: + Asymmetric Key Packages + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + + container certificate-chains { + description + "Certificate chains associated with this private key. + More than one chain per key is enabled to support, + for instance, a TPM-protected key that has associated + both IDevID and LDevID certificates."; + list certificate-chain { + key "name"; + description + "A certificate chain for this public key."; + leaf name { + type string; + description + "An arbitrary name for the certificate chain. The + name must be a unique across all private keys, not + just within this private key."; + } + + leaf-list certificate { + type binary; + ordered-by user; + description + "An X.509 v3 certificate structure as specified by RFC + 5280, Section 4 encoded using the ASN.1 distinguished + encoding rules (DER), as specified in ITU-T X.690. + The list of certificates that run from the server + certificate towards the trust anchor. The chain MAY + include the trust anchor certificate itself."; + reference + "RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile. + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + } + } + + action generate-certificate-signing-request { + description + "Generates a certificate signing request structure for + the associated private key using the passed subject and + attribute values. Please review both the Security + Considerations and Design Considerations sections in + RFC VVVV for more information regarding this action + statement."; + input { + leaf subject { + type binary; + mandatory true; + description + "The 'subject' field from the CertificationRequestInfo + structure as specified by RFC 2986, Section 4.1 encoded + using the ASN.1 distinguished encoding rules (DER), as + specified in ITU-T X.690."; + reference + "RFC 2986: + PKCS #10: Certification Request Syntax Specification + Version 1.7. + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + + leaf attributes { + type binary; + description + "The 'attributes' field from the CertificationRequestInfo + structure as specified by RFC 2986, Section 4.1 encoded + using the ASN.1 distinguished encoding rules (DER), as + specified in ITU-T X.690."; + reference + "RFC 2986: + PKCS #10: Certification Request Syntax Specification + Version 1.7. + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + } + + output { + leaf certificate-signing-request { + type binary; + mandatory true; + description + "A CertificationRequest structure as specified by RFC + 2986, Section 4.1 encoded using the ASN.1 distinguished + encoding rules (DER), as specified in ITU-T X.690."; + reference + "RFC 2986: + PKCS #10: Certification Request Syntax Specification + Version 1.7. + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + } + } + } + + action generate-private-key { + description + "Requests the device to generate a private key using the + specified algorithm and key length."; + input { + leaf name { + type string; + mandatory true; + description + "The name this private-key should have when listed + in /keystore/private-keys. As such, the passed + value must not match any existing 'name' value."; + } + + leaf algorithm { + type identityref { + base key-algorithm; + } + mandatory true; + description + "The algorithm to be used when generating the key."; + } + + leaf key-length { + type uint32; + description + "For algorithms that need a key length specified + when generating the key."; + } + } + } + + action load-private-key { + description + "Requests the device to load a private key"; + input { + leaf name { + type string; + mandatory true; + description + "The name this private-key should have when listed + in /keystore/private-keys. As such, the passed + value must not match any existing 'name' value."; + } + + leaf private-key { + type binary; + mandatory true; + description + "An OneAsymmetricKey structure as specified by RFC + 5958, Section 2 encoded using the ASN.1 distinguished + encoding rules (DER), as specified in ITU-T X.690. + Note that this is the raw private with no shrouding + to protect it. The strength of this private key + MUST NOT be greater than the strength of the secure + connection over which it is communicated. Devices + SHOULD fail this request if ever that happens."; + reference + "RFC 5958: + Asymmetric Key Packages + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + } + } + } + + list trusted-certificates { + key "name"; + description + "A list of trusted certificates. These certificates + can be used by a server to authenticate clients, or by clients + to authenticate servers. The certificates may be endpoint + specific or for certificate authorities (to authenticate many + clients at once. Each list of certificates SHOULD be specific + to a purpose, as the list as a whole may be referenced by other + modules. For instance, a NETCONF server model might point to + a list of certificates to use when authenticating client + certificates."; + leaf name { + type string; + description + "An arbitrary name for this list of trusted certificates."; + } + + leaf description { + type string; + description + "An arbitrary description for this list of trusted + certificates."; + } + + list trusted-certificate { + key "name"; + description + "A trusted certificate for a specific use. Note, this + 'certificate' is a list in order to encode any + associated intermediate certificates."; + leaf name { + type string; + description + "An arbitrary name for this trusted certificate. Must + be unique across all lists of trusted certificates + (not just this list) so that a leafref to it from + another module can resolve to unique values."; + } + + leaf certificate { + type binary; + description + "An X.509 v3 certificate structure as specified by RFC + 5280, Section 4 encoded using the ASN.1 distinguished + encoding rules (DER), as specified in ITU-T X.690."; + reference + "RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile. + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + } + } + + list trusted-ssh-host-keys { + key "name"; + description + "A list of trusted host-keys. These host-keys can be used + by clients to authenticate SSH servers. The host-keys are + endpoint specific. Each list of host-keys SHOULD be + specific to a purpose, as the list as a whole may be + referenced by other modules. For instance, a NETCONF + client model might point to a list of host-keys to use + when authenticating servers host-keys."; + leaf name { + type string; + description + "An arbitrary name for this list of trusted SSH host keys."; + } + + leaf description { + type string; + description + "An arbitrary description for this list of trusted SSH host + keys."; + } + + list trusted-host-key { + key "name"; + description + "A trusted host key."; + leaf name { + type string; + description + "An arbitrary name for this trusted host-key. Must be + unique across all lists of trusted host-keys (not just + this list) so that a leafref to it from another module + can resolve to unique values. + + Note that, for when the SSH client is able to listen + for call-home connections as well, there is no reference + identifier (e.g., hostname, IP address, etc.) that it + can use to uniquely identify the server with. The + call-home draft recommends SSH servers use X.509v3 + certificates (RFC6187) when calling home."; + } + + leaf host-key { + type binary; + mandatory true; + description + "An OneAsymmetricKey 'publicKey' structure as specified + by RFC 5958, Section 2 encoded using the ASN.1 + distinguished encoding rules (DER), as specified + in ITU-T X.690."; + reference + "RFC 5958: + Asymmetric Key Packages + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + } + } + + container user-auth-credentials { + description + "A list of user authentication credentials that can be used + by an SSH client to log into an SSH server, using any of + the supported authentication methods (e.g., password, + public key, client certificate, etc.)."; + list user-auth-credential { + key "username"; + description + "The authentication credentials for a specific user."; + leaf username { + type string; + description + "The username of this user. This will be the username + used, for instance, to log into an SSH server."; + } + + list auth-method { + key "priority"; + description + "A method of authenticating as this user."; + leaf priority { + type uint8; + description + "When multiple authentication methods in this list are + supported by the server, the one with the lowest priority + value will be the one that is used."; + } + + choice auth-type { + description + "The authentication type."; + leaf-list certificate { + type leafref { + path "/keystore/private-keys/private-key/certificate-chains/certificate-chain/name"; + } + ordered-by user; + description + "A list of references to certificates that can be used + for user authentication. When multiple certificates + in this list supported by the server, the one that + comes before the others in the leaf-list will be + used."; + } + + leaf-list public-key { + type leafref { + path "/keystore/private-keys/private-key/name"; + } + ordered-by user; + description + "A list of references to public keys that can be used + for user authentication. When multiple public keys + in this list supported by the server, the one that + comes before the others in the leaf-list will be + used."; + } + + leaf ciphertext-password { + type string; + description + "An ciphertext password. The method of encipherment + and how that method can be determined from this + string is implementation-specific."; + } + + leaf cleartext-password { + type string; + description + "An cleartext password."; + } + } + } + } + } + } + + notification certificate-expiration { + description + "A notification indicating that a configured certificate is + either about to expire or has already expired. When to send + notifications is an implementation specific decision, but + it is RECOMMENDED that a notification be sent once a month + for 3 months, then once a week for four weeks, and then once + a day thereafter."; + leaf certificate { + type instance-identifier; + mandatory true; + description + "Identifies which certificate is expiring or is expired."; + } + + leaf expiration-date { + type yang:date-and-time; + mandatory true; + description + "Identifies the expiration date on the certificate."; + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-keystore@2016-10-31.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-keystore@2016-10-31.yin new file mode 100644 index 00000000..d1208bd2 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-keystore@2016-10-31.yin @@ -0,0 +1,596 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-keystore" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"> + <yang-version value="1.1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-keystore"/> + <prefix value="ks"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + <reference> + <text>RFC 6991: Common YANG Data Types</text> + </reference> + </import> + <organization> + <text>IETF NETCONF (Network Configuration) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;mailto:netconf@ietf.org&gt; + +WG Chair: Mehmet Ersue + &lt;mailto:mehmet.ersue@nsn.com&gt; + +WG Chair: Mahesh Jethanandani + &lt;mailto:mjethanandani@gmail.com&gt; + +Editor: Kent Watsen + &lt;mailto:kwatsen@juniper.net&gt;</text> + </contact> + <description> + <text>This module defines a keystore to centralize management of +security credentials. + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD +License set forth in Section 4.c of the IETF Trust's +Legal Provisions Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC VVVV; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2016-10-31"> + <description> + <text>Initial version</text> + </description> + <reference> + <text>RFC VVVV: NETCONF Server and RESTCONF Server Configuration + Models</text> + </reference> + </revision> + <identity name="key-algorithm"> + <description> + <text>Base identity from which all key-algorithms are derived.</text> + </description> + </identity> + <identity name="rsa"> + <base name="key-algorithm"/> + <description> + <text>The RSA algorithm.</text> + </description> + <reference> + <text>RFC3447: Public-Key Cryptography Standards (PKCS) #1: + RSA Cryptography Specifications Version 2.1.</text> + </reference> + </identity> + <identity name="secp192r1"> + <base name="key-algorithm"/> + <description> + <text>The secp192r1 algorithm.</text> + </description> + <reference> + <text>RFC5480: + Elliptic Curve Cryptography Subject Public Key Information.</text> + </reference> + </identity> + <identity name="secp256r1"> + <base name="key-algorithm"/> + <description> + <text>The secp256r1 algorithm.</text> + </description> + <reference> + <text>RFC5480: + Elliptic Curve Cryptography Subject Public Key Information.</text> + </reference> + </identity> + <identity name="secp384r1"> + <base name="key-algorithm"/> + <description> + <text>The secp384r1 algorithm.</text> + </description> + <reference> + <text>RFC5480: + Elliptic Curve Cryptography Subject Public Key Information.</text> + </reference> + </identity> + <identity name="secp521r1"> + <base name="key-algorithm"/> + <description> + <text>The secp521r1 algorithm.</text> + </description> + <reference> + <text>RFC5480: + Elliptic Curve Cryptography Subject Public Key Information.</text> + </reference> + </identity> + <container name="keystore"> + <description> + <text>A list of private-keys and their associated certificates, as +well as lists of trusted certificates for client certificate +authentication. RPCs are provided to generate a new private +key and to generate a certificate signing requests.</text> + </description> + <container name="private-keys"> + <description> + <text>A list of private key maintained by the keystore.</text> + </description> + <list name="private-key"> + <key value="name"/> + <description> + <text>A private key.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for the private key.</text> + </description> + </leaf> + <leaf name="algorithm"> + <type name="identityref"> + <base name="key-algorithm"/> + </type> + <config value="false"/> + <description> + <text>The algorithm used by the private key.</text> + </description> + </leaf> + <leaf name="key-length"> + <type name="uint32"/> + <config value="false"/> + <description> + <text>The key-length used by the private key.</text> + </description> + </leaf> + <leaf name="public-key"> + <type name="binary"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>An OneAsymmetricKey 'publicKey' structure as specified +by RFC 5958, Section 2 encoded using the ASN.1 +distinguished encoding rules (DER), as specified +in ITU-T X.690.</text> + </description> + <reference> + <text>RFC 5958: + Asymmetric Key Packages +ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER).</text> + </reference> + </leaf> + <container name="certificate-chains"> + <description> + <text>Certificate chains associated with this private key. +More than one chain per key is enabled to support, +for instance, a TPM-protected key that has associated +both IDevID and LDevID certificates.</text> + </description> + <list name="certificate-chain"> + <key value="name"/> + <description> + <text>A certificate chain for this public key.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for the certificate chain. The +name must be a unique across all private keys, not +just within this private key.</text> + </description> + </leaf> + <leaf-list name="certificate"> + <type name="binary"/> + <ordered-by value="user"/> + <description> + <text>An X.509 v3 certificate structure as specified by RFC +5280, Section 4 encoded using the ASN.1 distinguished +encoding rules (DER), as specified in ITU-T X.690. +The list of certificates that run from the server +certificate towards the trust anchor. The chain MAY +include the trust anchor certificate itself.</text> + </description> + <reference> + <text>RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile. +ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER).</text> + </reference> + </leaf-list> + </list> + </container> + <action name="generate-certificate-signing-request"> + <description> + <text>Generates a certificate signing request structure for +the associated private key using the passed subject and +attribute values. Please review both the Security +Considerations and Design Considerations sections in +RFC VVVV for more information regarding this action +statement.</text> + </description> + <input> + <leaf name="subject"> + <type name="binary"/> + <mandatory value="true"/> + <description> + <text>The 'subject' field from the CertificationRequestInfo +structure as specified by RFC 2986, Section 4.1 encoded +using the ASN.1 distinguished encoding rules (DER), as +specified in ITU-T X.690.</text> + </description> + <reference> + <text>RFC 2986: + PKCS #10: Certification Request Syntax Specification + Version 1.7. +ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER).</text> + </reference> + </leaf> + <leaf name="attributes"> + <type name="binary"/> + <description> + <text>The 'attributes' field from the CertificationRequestInfo +structure as specified by RFC 2986, Section 4.1 encoded +using the ASN.1 distinguished encoding rules (DER), as +specified in ITU-T X.690.</text> + </description> + <reference> + <text>RFC 2986: + PKCS #10: Certification Request Syntax Specification + Version 1.7. +ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER).</text> + </reference> + </leaf> + </input> + <output> + <leaf name="certificate-signing-request"> + <type name="binary"/> + <mandatory value="true"/> + <description> + <text>A CertificationRequest structure as specified by RFC +2986, Section 4.1 encoded using the ASN.1 distinguished +encoding rules (DER), as specified in ITU-T X.690.</text> + </description> + <reference> + <text>RFC 2986: + PKCS #10: Certification Request Syntax Specification + Version 1.7. +ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER).</text> + </reference> + </leaf> + </output> + </action> + </list> + <action name="generate-private-key"> + <description> + <text>Requests the device to generate a private key using the +specified algorithm and key length.</text> + </description> + <input> + <leaf name="name"> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>The name this private-key should have when listed +in /keystore/private-keys. As such, the passed +value must not match any existing 'name' value.</text> + </description> + </leaf> + <leaf name="algorithm"> + <type name="identityref"> + <base name="key-algorithm"/> + </type> + <mandatory value="true"/> + <description> + <text>The algorithm to be used when generating the key.</text> + </description> + </leaf> + <leaf name="key-length"> + <type name="uint32"/> + <description> + <text>For algorithms that need a key length specified +when generating the key.</text> + </description> + </leaf> + </input> + </action> + <action name="load-private-key"> + <description> + <text>Requests the device to load a private key</text> + </description> + <input> + <leaf name="name"> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>The name this private-key should have when listed +in /keystore/private-keys. As such, the passed +value must not match any existing 'name' value.</text> + </description> + </leaf> + <leaf name="private-key"> + <type name="binary"/> + <mandatory value="true"/> + <description> + <text>An OneAsymmetricKey structure as specified by RFC +5958, Section 2 encoded using the ASN.1 distinguished +encoding rules (DER), as specified in ITU-T X.690. +Note that this is the raw private with no shrouding +to protect it. The strength of this private key +MUST NOT be greater than the strength of the secure +connection over which it is communicated. Devices +SHOULD fail this request if ever that happens.</text> + </description> + <reference> + <text>RFC 5958: + Asymmetric Key Packages +ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER).</text> + </reference> + </leaf> + </input> + </action> + </container> + <list name="trusted-certificates"> + <key value="name"/> + <description> + <text>A list of trusted certificates. These certificates +can be used by a server to authenticate clients, or by clients +to authenticate servers. The certificates may be endpoint +specific or for certificate authorities (to authenticate many +clients at once. Each list of certificates SHOULD be specific +to a purpose, as the list as a whole may be referenced by other +modules. For instance, a NETCONF server model might point to +a list of certificates to use when authenticating client +certificates.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for this list of trusted certificates.</text> + </description> + </leaf> + <leaf name="description"> + <type name="string"/> + <description> + <text>An arbitrary description for this list of trusted +certificates.</text> + </description> + </leaf> + <list name="trusted-certificate"> + <key value="name"/> + <description> + <text>A trusted certificate for a specific use. Note, this +'certificate' is a list in order to encode any +associated intermediate certificates.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for this trusted certificate. Must +be unique across all lists of trusted certificates +(not just this list) so that a leafref to it from +another module can resolve to unique values.</text> + </description> + </leaf> + <leaf name="certificate"> + <type name="binary"/> + <description> + <text>An X.509 v3 certificate structure as specified by RFC +5280, Section 4 encoded using the ASN.1 distinguished +encoding rules (DER), as specified in ITU-T X.690.</text> + </description> + <reference> + <text>RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile. +ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER).</text> + </reference> + </leaf> + </list> + </list> + <list name="trusted-ssh-host-keys"> + <key value="name"/> + <description> + <text>A list of trusted host-keys. These host-keys can be used +by clients to authenticate SSH servers. The host-keys are +endpoint specific. Each list of host-keys SHOULD be +specific to a purpose, as the list as a whole may be +referenced by other modules. For instance, a NETCONF +client model might point to a list of host-keys to use +when authenticating servers host-keys.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for this list of trusted SSH host keys.</text> + </description> + </leaf> + <leaf name="description"> + <type name="string"/> + <description> + <text>An arbitrary description for this list of trusted SSH host +keys.</text> + </description> + </leaf> + <list name="trusted-host-key"> + <key value="name"/> + <description> + <text>A trusted host key.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for this trusted host-key. Must be +unique across all lists of trusted host-keys (not just +this list) so that a leafref to it from another module +can resolve to unique values. + +Note that, for when the SSH client is able to listen +for call-home connections as well, there is no reference +identifier (e.g., hostname, IP address, etc.) that it +can use to uniquely identify the server with. The +call-home draft recommends SSH servers use X.509v3 +certificates (RFC6187) when calling home.</text> + </description> + </leaf> + <leaf name="host-key"> + <type name="binary"/> + <mandatory value="true"/> + <description> + <text>An OneAsymmetricKey 'publicKey' structure as specified +by RFC 5958, Section 2 encoded using the ASN.1 +distinguished encoding rules (DER), as specified +in ITU-T X.690.</text> + </description> + <reference> + <text>RFC 5958: + Asymmetric Key Packages +ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER).</text> + </reference> + </leaf> + </list> + </list> + <container name="user-auth-credentials"> + <description> + <text>A list of user authentication credentials that can be used +by an SSH client to log into an SSH server, using any of +the supported authentication methods (e.g., password, +public key, client certificate, etc.).</text> + </description> + <list name="user-auth-credential"> + <key value="username"/> + <description> + <text>The authentication credentials for a specific user.</text> + </description> + <leaf name="username"> + <type name="string"/> + <description> + <text>The username of this user. This will be the username +used, for instance, to log into an SSH server.</text> + </description> + </leaf> + <list name="auth-method"> + <key value="priority"/> + <description> + <text>A method of authenticating as this user.</text> + </description> + <leaf name="priority"> + <type name="uint8"/> + <description> + <text>When multiple authentication methods in this list are +supported by the server, the one with the lowest priority +value will be the one that is used.</text> + </description> + </leaf> + <choice name="auth-type"> + <description> + <text>The authentication type.</text> + </description> + <leaf-list name="certificate"> + <type name="leafref"> + <path value="/keystore/private-keys/private-key/certificate-chains/certificate-chain/name"/> + </type> + <ordered-by value="user"/> + <description> + <text>A list of references to certificates that can be used +for user authentication. When multiple certificates +in this list supported by the server, the one that +comes before the others in the leaf-list will be +used.</text> + </description> + </leaf-list> + <leaf-list name="public-key"> + <type name="leafref"> + <path value="/keystore/private-keys/private-key/name"/> + </type> + <ordered-by value="user"/> + <description> + <text>A list of references to public keys that can be used +for user authentication. When multiple public keys +in this list supported by the server, the one that +comes before the others in the leaf-list will be +used.</text> + </description> + </leaf-list> + <leaf name="ciphertext-password"> + <type name="string"/> + <description> + <text>An ciphertext password. The method of encipherment +and how that method can be determined from this +string is implementation-specific.</text> + </description> + </leaf> + <leaf name="cleartext-password"> + <type name="string"/> + <description> + <text>An cleartext password.</text> + </description> + </leaf> + </choice> + </list> + </list> + </container> + </container> + <notification name="certificate-expiration"> + <description> + <text>A notification indicating that a configured certificate is +either about to expire or has already expired. When to send +notifications is an implementation specific decision, but +it is RECOMMENDED that a notification be sent once a month +for 3 months, then once a week for four weeks, and then once +a day thereafter.</text> + </description> + <leaf name="certificate"> + <type name="instance-identifier"/> + <mandatory value="true"/> + <description> + <text>Identifies which certificate is expiring or is expired.</text> + </description> + </leaf> + <leaf name="expiration-date"> + <type name="yang:date-and-time"/> + <mandatory value="true"/> + <description> + <text>Identifies the expiration date on the certificate.</text> + </description> + </leaf> + </notification> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-acm@2012-02-22.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-acm@2012-02-22.yang new file mode 100644 index 00000000..f466c426 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-acm@2012-02-22.yang @@ -0,0 +1,433 @@ + + module ietf-netconf-acm { + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"; + prefix nacm; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Bert Wijnen + <mailto:bertietf@bwijnen.net> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "NETCONF Access Control Model. + + Copyright (c) 2012 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6536; see + the RFC itself for full legal notices."; + + revision 2012-02-22 { + description + "Initial version"; + reference + "RFC 6536: Network Configuration Protocol (NETCONF) + Access Control Model"; + } + + extension default-deny-write { + description + "Used to indicate that the data model node + represents a sensitive security system parameter. + + If present, and the NACM module is enabled (i.e., + /nacm/enable-nacm object equals 'true'), the NETCONF server + will only allow the designated 'recovery session' to have + write access to the node. An explicit access control rule is + required for all other users. + + The 'default-deny-write' extension MAY appear within a data + definition statement. It is ignored otherwise."; + } + + extension default-deny-all { + description + "Used to indicate that the data model node + controls a very sensitive security system parameter. + + If present, and the NACM module is enabled (i.e., + /nacm/enable-nacm object equals 'true'), the NETCONF server + will only allow the designated 'recovery session' to have + read, write, or execute access to the node. An explicit + access control rule is required for all other users. + + The 'default-deny-all' extension MAY appear within a data + definition statement, 'rpc' statement, or 'notification' + statement. It is ignored otherwise."; + } + + typedef user-name-type { + type string { + length "1..max"; + } + description + "General Purpose Username string."; + } + + typedef matchall-string-type { + type string { + pattern "\\*"; + } + description + "The string containing a single asterisk '*' is used + to conceptually represent all possible values + for the particular leaf using this data type."; + } + + typedef access-operations-type { + type bits { + bit create { + description + "Any protocol operation that creates a + new data node."; + } + bit read { + description + "Any protocol operation or notification that + returns the value of a data node."; + } + bit update { + description + "Any protocol operation that alters an existing + data node."; + } + bit delete { + description + "Any protocol operation that removes a data node."; + } + bit exec { + description + "Execution access to the specified protocol operation."; + } + } + description + "NETCONF Access Operation."; + } + + typedef group-name-type { + type string { + length "1..max"; + pattern "[^\\*].*"; + } + description + "Name of administrative group to which + users can be assigned."; + } + + typedef action-type { + type enumeration { + enum "permit" { + description + "Requested action is permitted."; + } + enum "deny" { + description + "Requested action is denied."; + } + } + description + "Action taken by the server when a particular + rule matches."; + } + + typedef node-instance-identifier { + type yang:xpath1.0; + description + "Path expression used to represent a special + data node instance identifier string. + + A node-instance-identifier value is an + unrestricted YANG instance-identifier expression. + All the same rules as an instance-identifier apply + except predicates for keys are optional. If a key + predicate is missing, then the node-instance-identifier + represents all possible server instances for that key. + + This XPath expression is evaluated in the following context: + + o The set of namespace declarations are those in scope on + the leaf element where this type is used. + + o The set of variable bindings contains one variable, + 'USER', which contains the name of the user of the current + session. + + o The function library is the core function library, but + note that due to the syntax restrictions of an + instance-identifier, no functions are allowed. + + o The context node is the root node in the data tree."; + } + + container nacm { + nacm:default-deny-all; + description + "Parameters for NETCONF Access Control Model."; + leaf enable-nacm { + type boolean; + default "true"; + description + "Enables or disables all NETCONF access control + enforcement. If 'true', then enforcement + is enabled. If 'false', then enforcement + is disabled."; + } + + leaf read-default { + type action-type; + default "permit"; + description + "Controls whether read access is granted if + no appropriate rule is found for a + particular read request."; + } + + leaf write-default { + type action-type; + default "deny"; + description + "Controls whether create, update, or delete access + is granted if no appropriate rule is found for a + particular write request."; + } + + leaf exec-default { + type action-type; + default "permit"; + description + "Controls whether exec access is granted if no appropriate + rule is found for a particular protocol operation request."; + } + + leaf enable-external-groups { + type boolean; + default "true"; + description + "Controls whether the server uses the groups reported by the + NETCONF transport layer when it assigns the user to a set of + NACM groups. If this leaf has the value 'false', any group + names reported by the transport layer are ignored by the + server."; + } + + leaf denied-operations { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request was denied."; + } + + leaf denied-data-writes { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request to alter + a configuration datastore was denied."; + } + + leaf denied-notifications { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that + a notification was dropped for a subscription because + access to the event type was denied."; + } + + container groups { + description + "NETCONF Access Control Groups."; + list group { + key "name"; + description + "One NACM Group Entry. This list will only contain + configured entries, not any entries learned from + any transport protocols."; + leaf name { + type group-name-type; + description + "Group name associated with this entry."; + } + + leaf-list user-name { + type user-name-type; + description + "Each entry identifies the username of + a member of the group associated with + this entry."; + } + } + } + + list rule-list { + key "name"; + ordered-by user; + description + "An ordered collection of access control rules."; + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule-list."; + } + + leaf-list group { + type union { + type matchall-string-type; + type group-name-type; + } + description + "List of administrative groups that will be + assigned the associated access rights + defined by the 'rule' list. + + The string '*' indicates that all groups apply to the + entry."; + } + + list rule { + key "name"; + ordered-by user; + description + "One access control rule. + + Rules are processed in user-defined order until a match is + found. A rule matches if 'module-name', 'rule-type', and + 'access-operations' match the request. If a rule + matches, the 'action' leaf determines if access is granted + or not."; + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule."; + } + + leaf module-name { + type union { + type matchall-string-type; + type string; + } + default "*"; + description + "Name of the module associated with this rule. + + This leaf matches if it has the value '*' or if the + object being accessed is defined in the module with the + specified module name."; + } + + choice rule-type { + description + "This choice matches if all leafs present in the rule + match the request. If no leafs are present, the + choice matches all requests."; + case protocol-operation { + leaf rpc-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if + its value equals the requested protocol operation + name."; + } + } + + case notification { + leaf notification-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if its + value equals the requested notification name."; + } + } + + case data-node { + leaf path { + type node-instance-identifier; + mandatory true; + description + "Data Node Instance Identifier associated with the + data node controlled by this rule. + + Configuration data or state data instance + identifiers start with a top-level data node. A + complete instance identifier is required for this + type of path value. + + The special value '/' refers to all possible + datastore contents."; + } + } + } + + leaf access-operations { + type union { + type matchall-string-type; + type access-operations-type; + } + default "*"; + description + "Access operations associated with this rule. + + This leaf matches if it has the value '*' or if the + bit corresponding to the requested operation is set."; + } + + leaf action { + type action-type; + mandatory true; + description + "The access control action associated with the + rule. If a rule is determined to match a + particular request, then this object is used + to determine whether to permit or deny the + request."; + } + + leaf comment { + type string; + description + "A textual description of the access rule."; + } + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-acm@2012-02-22.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-acm@2012-02-22.yin new file mode 100644 index 00000000..b73ab4e1 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-acm@2012-02-22.yin @@ -0,0 +1,452 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-netconf-acm" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:nacm="urn:ietf:params:xml:ns:yang:ietf-netconf-acm" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"/> + <prefix value="nacm"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + </import> + <organization> + <text>IETF NETCONF (Network Configuration) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;mailto:netconf@ietf.org&gt; + +WG Chair: Mehmet Ersue + &lt;mailto:mehmet.ersue@nsn.com&gt; + +WG Chair: Bert Wijnen + &lt;mailto:bertietf@bwijnen.net&gt; + +Editor: Andy Bierman + &lt;mailto:andy@yumaworks.com&gt; + +Editor: Martin Bjorklund + &lt;mailto:mbj@tail-f.com&gt;</text> + </contact> + <description> + <text>NETCONF Access Control Model. + +Copyright (c) 2012 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD +License set forth in Section 4.c of the IETF Trust's +Legal Provisions Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 6536; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2012-02-22"> + <description> + <text>Initial version</text> + </description> + <reference> + <text>RFC 6536: Network Configuration Protocol (NETCONF) + Access Control Model</text> + </reference> + </revision> + <extension name="default-deny-write"> + <description> + <text>Used to indicate that the data model node +represents a sensitive security system parameter. + +If present, and the NACM module is enabled (i.e., +/nacm/enable-nacm object equals 'true'), the NETCONF server +will only allow the designated 'recovery session' to have +write access to the node. An explicit access control rule is +required for all other users. + +The 'default-deny-write' extension MAY appear within a data +definition statement. It is ignored otherwise.</text> + </description> + </extension> + <extension name="default-deny-all"> + <description> + <text>Used to indicate that the data model node +controls a very sensitive security system parameter. + +If present, and the NACM module is enabled (i.e., +/nacm/enable-nacm object equals 'true'), the NETCONF server +will only allow the designated 'recovery session' to have +read, write, or execute access to the node. An explicit +access control rule is required for all other users. + +The 'default-deny-all' extension MAY appear within a data +definition statement, 'rpc' statement, or 'notification' +statement. It is ignored otherwise.</text> + </description> + </extension> + <typedef name="user-name-type"> + <type name="string"> + <length value="1..max"/> + </type> + <description> + <text>General Purpose Username string.</text> + </description> + </typedef> + <typedef name="matchall-string-type"> + <type name="string"> + <pattern value="\*"/> + </type> + <description> + <text>The string containing a single asterisk '*' is used +to conceptually represent all possible values +for the particular leaf using this data type.</text> + </description> + </typedef> + <typedef name="access-operations-type"> + <type name="bits"> + <bit name="create"> + <description> + <text>Any protocol operation that creates a +new data node.</text> + </description> + </bit> + <bit name="read"> + <description> + <text>Any protocol operation or notification that +returns the value of a data node.</text> + </description> + </bit> + <bit name="update"> + <description> + <text>Any protocol operation that alters an existing +data node.</text> + </description> + </bit> + <bit name="delete"> + <description> + <text>Any protocol operation that removes a data node.</text> + </description> + </bit> + <bit name="exec"> + <description> + <text>Execution access to the specified protocol operation.</text> + </description> + </bit> + </type> + <description> + <text>NETCONF Access Operation.</text> + </description> + </typedef> + <typedef name="group-name-type"> + <type name="string"> + <length value="1..max"/> + <pattern value="[^\*].*"/> + </type> + <description> + <text>Name of administrative group to which +users can be assigned.</text> + </description> + </typedef> + <typedef name="action-type"> + <type name="enumeration"> + <enum name="permit"> + <description> + <text>Requested action is permitted.</text> + </description> + </enum> + <enum name="deny"> + <description> + <text>Requested action is denied.</text> + </description> + </enum> + </type> + <description> + <text>Action taken by the server when a particular +rule matches.</text> + </description> + </typedef> + <typedef name="node-instance-identifier"> + <type name="yang:xpath1.0"/> + <description> + <text>Path expression used to represent a special +data node instance identifier string. + +A node-instance-identifier value is an +unrestricted YANG instance-identifier expression. +All the same rules as an instance-identifier apply +except predicates for keys are optional. If a key +predicate is missing, then the node-instance-identifier +represents all possible server instances for that key. + +This XPath expression is evaluated in the following context: + + o The set of namespace declarations are those in scope on + the leaf element where this type is used. + + o The set of variable bindings contains one variable, + 'USER', which contains the name of the user of the current + session. + + o The function library is the core function library, but + note that due to the syntax restrictions of an + instance-identifier, no functions are allowed. + + o The context node is the root node in the data tree.</text> + </description> + </typedef> + <container name="nacm"> + <nacm:default-deny-all/> + <description> + <text>Parameters for NETCONF Access Control Model.</text> + </description> + <leaf name="enable-nacm"> + <type name="boolean"/> + <default value="true"/> + <description> + <text>Enables or disables all NETCONF access control +enforcement. If 'true', then enforcement +is enabled. If 'false', then enforcement +is disabled.</text> + </description> + </leaf> + <leaf name="read-default"> + <type name="action-type"/> + <default value="permit"/> + <description> + <text>Controls whether read access is granted if +no appropriate rule is found for a +particular read request.</text> + </description> + </leaf> + <leaf name="write-default"> + <type name="action-type"/> + <default value="deny"/> + <description> + <text>Controls whether create, update, or delete access +is granted if no appropriate rule is found for a +particular write request.</text> + </description> + </leaf> + <leaf name="exec-default"> + <type name="action-type"/> + <default value="permit"/> + <description> + <text>Controls whether exec access is granted if no appropriate +rule is found for a particular protocol operation request.</text> + </description> + </leaf> + <leaf name="enable-external-groups"> + <type name="boolean"/> + <default value="true"/> + <description> + <text>Controls whether the server uses the groups reported by the +NETCONF transport layer when it assigns the user to a set of +NACM groups. If this leaf has the value 'false', any group +names reported by the transport layer are ignored by the +server.</text> + </description> + </leaf> + <leaf name="denied-operations"> + <type name="yang:zero-based-counter32"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>Number of times since the server last restarted that a +protocol operation request was denied.</text> + </description> + </leaf> + <leaf name="denied-data-writes"> + <type name="yang:zero-based-counter32"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>Number of times since the server last restarted that a +protocol operation request to alter +a configuration datastore was denied.</text> + </description> + </leaf> + <leaf name="denied-notifications"> + <type name="yang:zero-based-counter32"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>Number of times since the server last restarted that +a notification was dropped for a subscription because +access to the event type was denied.</text> + </description> + </leaf> + <container name="groups"> + <description> + <text>NETCONF Access Control Groups.</text> + </description> + <list name="group"> + <key value="name"/> + <description> + <text>One NACM Group Entry. This list will only contain +configured entries, not any entries learned from +any transport protocols.</text> + </description> + <leaf name="name"> + <type name="group-name-type"/> + <description> + <text>Group name associated with this entry.</text> + </description> + </leaf> + <leaf-list name="user-name"> + <type name="user-name-type"/> + <description> + <text>Each entry identifies the username of +a member of the group associated with +this entry.</text> + </description> + </leaf-list> + </list> + </container> + <list name="rule-list"> + <key value="name"/> + <ordered-by value="user"/> + <description> + <text>An ordered collection of access control rules.</text> + </description> + <leaf name="name"> + <type name="string"> + <length value="1..max"/> + </type> + <description> + <text>Arbitrary name assigned to the rule-list.</text> + </description> + </leaf> + <leaf-list name="group"> + <type name="union"> + <type name="matchall-string-type"/> + <type name="group-name-type"/> + </type> + <description> + <text>List of administrative groups that will be +assigned the associated access rights +defined by the 'rule' list. + +The string '*' indicates that all groups apply to the +entry.</text> + </description> + </leaf-list> + <list name="rule"> + <key value="name"/> + <ordered-by value="user"/> + <description> + <text>One access control rule. + +Rules are processed in user-defined order until a match is +found. A rule matches if 'module-name', 'rule-type', and +'access-operations' match the request. If a rule +matches, the 'action' leaf determines if access is granted +or not.</text> + </description> + <leaf name="name"> + <type name="string"> + <length value="1..max"/> + </type> + <description> + <text>Arbitrary name assigned to the rule.</text> + </description> + </leaf> + <leaf name="module-name"> + <type name="union"> + <type name="matchall-string-type"/> + <type name="string"/> + </type> + <default value="*"/> + <description> + <text>Name of the module associated with this rule. + +This leaf matches if it has the value '*' or if the +object being accessed is defined in the module with the +specified module name.</text> + </description> + </leaf> + <choice name="rule-type"> + <description> + <text>This choice matches if all leafs present in the rule +match the request. If no leafs are present, the +choice matches all requests.</text> + </description> + <case name="protocol-operation"> + <leaf name="rpc-name"> + <type name="union"> + <type name="matchall-string-type"/> + <type name="string"/> + </type> + <description> + <text>This leaf matches if it has the value '*' or if +its value equals the requested protocol operation +name.</text> + </description> + </leaf> + </case> + <case name="notification"> + <leaf name="notification-name"> + <type name="union"> + <type name="matchall-string-type"/> + <type name="string"/> + </type> + <description> + <text>This leaf matches if it has the value '*' or if its +value equals the requested notification name.</text> + </description> + </leaf> + </case> + <case name="data-node"> + <leaf name="path"> + <type name="node-instance-identifier"/> + <mandatory value="true"/> + <description> + <text>Data Node Instance Identifier associated with the +data node controlled by this rule. + +Configuration data or state data instance +identifiers start with a top-level data node. A +complete instance identifier is required for this +type of path value. + +The special value '/' refers to all possible +datastore contents.</text> + </description> + </leaf> + </case> + </choice> + <leaf name="access-operations"> + <type name="union"> + <type name="matchall-string-type"/> + <type name="access-operations-type"/> + </type> + <default value="*"/> + <description> + <text>Access operations associated with this rule. + +This leaf matches if it has the value '*' or if the +bit corresponding to the requested operation is set.</text> + </description> + </leaf> + <leaf name="action"> + <type name="action-type"/> + <mandatory value="true"/> + <description> + <text>The access control action associated with the +rule. If a rule is determined to match a +particular request, then this object is used +to determine whether to permit or deny the +request.</text> + </description> + </leaf> + <leaf name="comment"> + <type name="string"/> + <description> + <text>A textual description of the access rule.</text> + </description> + </leaf> + </list> + </list> + </container> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-monitoring@2010-10-04.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-monitoring@2010-10-04.yang new file mode 100644 index 00000000..bd4f63b5 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-monitoring@2010-10-04.yang @@ -0,0 +1,570 @@ + + module ietf-netconf-monitoring { + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"; + prefix ncm; + + import ietf-yang-types { + prefix yang; + } + + import ietf-inet-types { + prefix inet; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Bert Wijnen + <mailto:bertietf@bwijnen.net> + + Editor: Mark Scott + <mailto:mark.scott@ericsson.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "NETCONF Monitoring Module. + All elements in this module are read-only. + + Copyright (c) 2010 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6022; see + the RFC itself for full legal notices."; + + revision 2010-10-04 { + description + "Initial revision."; + reference + "RFC 6022: YANG Module for NETCONF Monitoring"; + } + + identity transport { + description + "Base identity for NETCONF transport types."; + } + + identity netconf-ssh { + base transport; + description + "NETCONF over Secure Shell (SSH)."; + reference + "RFC 4742: Using the NETCONF Configuration Protocol + over Secure SHell (SSH)"; + } + + identity netconf-soap-over-beep { + base transport; + description + "NETCONF over Simple Object Access Protocol (SOAP) over + Blocks Extensible Exchange Protocol (BEEP)."; + reference + "RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)"; + } + + identity netconf-soap-over-https { + base transport; + description + "NETCONF over Simple Object Access Protocol (SOAP) + over Hypertext Transfer Protocol Secure (HTTPS)."; + reference + "RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)"; + } + + identity netconf-beep { + base transport; + description + "NETCONF over Blocks Extensible Exchange Protocol (BEEP)."; + reference + "RFC 4744: Using the NETCONF Protocol over the + Blocks Extensible Exchange Protocol (BEEP)"; + } + + identity netconf-tls { + base transport; + description + "NETCONF over Transport Layer Security (TLS)."; + reference + "RFC 5539: NETCONF over Transport Layer Security (TLS)"; + } + + identity schema-format { + description + "Base identity for data model schema languages."; + } + + identity xsd { + base schema-format; + description + "W3C XML Schema Definition."; + reference + "W3C REC REC-xmlschema-1-20041028: + XML Schema Part 1: Structures"; + } + + identity yang { + base schema-format; + description + "The YANG data modeling language for NETCONF."; + reference + "RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)"; + } + + identity yin { + base schema-format; + description + "The YIN syntax for YANG."; + reference + "RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)"; + } + + identity rng { + base schema-format; + description + "Regular Language for XML Next Generation (RELAX NG)."; + reference + "ISO/IEC 19757-2:2008: RELAX NG"; + } + + identity rnc { + base schema-format; + description + "Relax NG Compact Syntax"; + reference + "ISO/IEC 19757-2:2008: RELAX NG"; + } + + typedef netconf-datastore-type { + type enumeration { + enum "running"; + enum "candidate"; + enum "startup"; + } + description + "Enumeration of possible NETCONF datastore types."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + + grouping common-counters { + description + "Counters that exist both per session, and also globally, + accumulated from all sessions."; + leaf in-rpcs { + type yang:zero-based-counter32; + description + "Number of correct <rpc> messages received."; + } + + leaf in-bad-rpcs { + type yang:zero-based-counter32; + description + "Number of messages received when an <rpc> message was expected, + that were not correct <rpc> messages. This includes XML parse + errors and errors on the rpc layer."; + } + + leaf out-rpc-errors { + type yang:zero-based-counter32; + description + "Number of <rpc-reply> messages sent that contained an + <rpc-error> element."; + } + + leaf out-notifications { + type yang:zero-based-counter32; + description + "Number of <notification> messages sent."; + } + } + + container netconf-state { + config false; + description + "The netconf-state container is the root of the monitoring + data model."; + container capabilities { + description + "Contains the list of NETCONF capabilities supported by the + server."; + leaf-list capability { + type inet:uri; + description + "List of NETCONF capabilities supported by the server."; + } + } + + container datastores { + description + "Contains the list of NETCONF configuration datastores."; + list datastore { + key "name"; + description + "List of NETCONF configuration datastores supported by + the NETCONF server and related information."; + leaf name { + type netconf-datastore-type; + description + "Name of the datastore associated with this list entry."; + } + + container locks { + presence "This container is present only if the datastore + is locked."; + description + "The NETCONF <lock> and <partial-lock> operations allow + a client to lock specific resources in a datastore. The + NETCONF server will prevent changes to the locked + resources by all sessions except the one that acquired + the lock(s). + + Monitoring information is provided for each datastore + entry including details such as the session that acquired + the lock, the type of lock (global or partial) and the + list of locked resources. Multiple locks per datastore + are supported."; + grouping lock-info { + description + "Lock related parameters, common to both global and + partial locks."; + leaf locked-by-session { + type uint32; + mandatory true; + description + "The session ID of the session that has locked + this resource. Both a global lock and a partial + lock MUST contain the NETCONF session-id. + + If the lock is held by a session that is not managed + by the NETCONF server (e.g., a CLI session), a session + id of 0 (zero) is reported."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + + leaf locked-time { + type yang:date-and-time; + mandatory true; + description + "The date and time of when the resource was + locked."; + } + } + + choice lock-type { + description + "Indicates if a global lock or a set of partial locks + are set."; + container global-lock { + description + "Present if the global lock is set."; + uses lock-info; + } + + list partial-lock { + key "lock-id"; + description + "List of partial locks."; + reference + "RFC 5717: Partial Lock Remote Procedure Call (RPC) for + NETCONF"; + leaf lock-id { + type uint32; + description + "This is the lock id returned in the <partial-lock> + response."; + } + + uses lock-info; + + leaf-list select { + type yang:xpath1.0; + min-elements 1; + description + "The xpath expression that was used to request + the lock. The select expression indicates the + original intended scope of the lock."; + } + + leaf-list locked-node { + type instance-identifier; + description + "The list of instance-identifiers (i.e., the + locked nodes). + + The scope of the partial lock is defined by the list + of locked nodes."; + } + } + } + } + } + } + + container schemas { + description + "Contains the list of data model schemas supported by the + server."; + list schema { + key "identifier version format"; + description + "List of data model schemas supported by the server."; + leaf identifier { + type string; + description + "Identifier to uniquely reference the schema. The + identifier is used in the <get-schema> operation and may + be used for other purposes such as file retrieval. + + For modeling languages that support or require a data + model name (e.g., YANG module name) the identifier MUST + match that name. For YANG data models, the identifier is + the name of the module or submodule. In other cases, an + identifier such as a filename MAY be used instead."; + } + + leaf version { + type string; + description + "Version of the schema supported. Multiple versions MAY be + supported simultaneously by a NETCONF server. Each + version MUST be reported individually in the schema list, + i.e., with same identifier, possibly different location, + but different version. + + For YANG data models, version is the value of the most + recent YANG 'revision' statement in the module or + submodule, or the empty string if no 'revision' statement + is present."; + } + + leaf format { + type identityref { + base schema-format; + } + description + "The data modeling language the schema is written + in (currently xsd, yang, yin, rng, or rnc). + For YANG data models, 'yang' format MUST be supported and + 'yin' format MAY also be provided."; + } + + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace defined by the data model. + + For YANG data models, this is the module's namespace. + If the list entry describes a submodule, this field + contains the namespace of the module to which the + submodule belongs."; + } + + leaf-list location { + type union { + type enumeration { + enum "NETCONF"; + } + type inet:uri; + } + description + "One or more locations from which the schema can be + retrieved. This list SHOULD contain at least one + entry per schema. + + A schema entry may be located on a remote file system + (e.g., reference to file system for ftp retrieval) or + retrieved directly from a server supporting the + <get-schema> operation (denoted by the value 'NETCONF')."; + } + } + } + + container sessions { + description + "The sessions container includes session-specific data for + NETCONF management sessions. The session list MUST include + all currently active NETCONF sessions."; + list session { + key "session-id"; + description + "All NETCONF sessions managed by the NETCONF server + MUST be reported in this list."; + leaf session-id { + type uint32 { + range "1..max"; + } + description + "Unique identifier for the session. This value is the + NETCONF session identifier, as defined in RFC 4741."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + } + + leaf transport { + type identityref { + base transport; + } + mandatory true; + description + "Identifies the transport for each session, e.g., + 'netconf-ssh', 'netconf-soap', etc."; + } + + leaf username { + type string; + mandatory true; + description + "The username is the client identity that was authenticated + by the NETCONF transport protocol. The algorithm used to + derive the username is NETCONF transport protocol specific + and in addition specific to the authentication mechanism + used by the NETCONF transport protocol."; + } + + leaf source-host { + type inet:host; + description + "Host identifier of the NETCONF client. The value + returned is implementation specific (e.g., hostname, + IPv4 address, IPv6 address)"; + } + + leaf login-time { + type yang:date-and-time; + mandatory true; + description + "Time at the server at which the session was established."; + } + + uses common-counters { + description + "Per-session counters. Zero based with following reset + behaviour: + - at start of a session + - when max value is reached"; + } + } + } + + container statistics { + description + "Statistical data pertaining to the NETCONF server."; + leaf netconf-start-time { + type yang:date-and-time; + description + "Date and time at which the management subsystem was + started."; + } + + leaf in-bad-hellos { + type yang:zero-based-counter32; + description + "Number of sessions silently dropped because an + invalid <hello> message was received. This includes <hello> + messages with a 'session-id' attribute, bad namespace, and + bad capability declarations."; + } + + leaf in-sessions { + type yang:zero-based-counter32; + description + "Number of sessions started. This counter is incremented + when a <hello> message with a <session-id> is sent. + + 'in-sessions' - 'in-bad-hellos' = + 'number of correctly started netconf sessions'"; + } + + leaf dropped-sessions { + type yang:zero-based-counter32; + description + "Number of sessions that were abnormally terminated, e.g., + due to idle timeout or transport close. This counter is not + incremented when a session is properly closed by a + <close-session> operation, or killed by a <kill-session> + operation."; + } + + uses common-counters { + description + "Global counters, accumulated from all sessions. + Zero based with following reset behaviour: + - re-initialization of NETCONF server + - when max value is reached"; + } + } + } + + rpc get-schema { + description + "This operation is used to retrieve a schema from the + NETCONF server. + + Positive Response: + The NETCONF server returns the requested schema. + + Negative Response: + If requested schema does not exist, the <error-tag> is + 'invalid-value'. + + If more than one schema matches the requested parameters, the + <error-tag> is 'operation-failed', and <error-app-tag> is + 'data-not-unique'."; + input { + leaf identifier { + type string; + mandatory true; + description + "Identifier for the schema list entry."; + } + + leaf version { + type string; + description + "Version of the schema requested. If this parameter is not + present, and more than one version of the schema exists on + the server, a 'data-not-unique' error is returned, as + described above."; + } + + leaf format { + type identityref { + base schema-format; + } + description + "The data modeling language of the schema. If this + parameter is not present, and more than one formats of + the schema exists on the server, a 'data-not-unique' error + is returned, as described above."; + } + } + + output { + anyxml data { + description + "Contains the schema content."; + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-monitoring@2010-10-04.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-monitoring@2010-10-04.yin new file mode 100644 index 00000000..2d2c1298 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-monitoring@2010-10-04.yin @@ -0,0 +1,604 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-netconf-monitoring" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ncm="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"/> + <prefix value="ncm"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + </import> + <import module="ietf-inet-types"> + <prefix value="inet"/> + </import> + <organization> + <text>IETF NETCONF (Network Configuration) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;mailto:netconf@ietf.org&gt; + +WG Chair: Mehmet Ersue + &lt;mailto:mehmet.ersue@nsn.com&gt; + +WG Chair: Bert Wijnen + &lt;mailto:bertietf@bwijnen.net&gt; + +Editor: Mark Scott + &lt;mailto:mark.scott@ericsson.com&gt; + +Editor: Martin Bjorklund + &lt;mailto:mbj@tail-f.com&gt;</text> + </contact> + <description> + <text>NETCONF Monitoring Module. +All elements in this module are read-only. + +Copyright (c) 2010 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD +License set forth in Section 4.c of the IETF Trust's +Legal Provisions Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 6022; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2010-10-04"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 6022: YANG Module for NETCONF Monitoring</text> + </reference> + </revision> + <identity name="transport"> + <description> + <text>Base identity for NETCONF transport types.</text> + </description> + </identity> + <identity name="netconf-ssh"> + <base name="transport"/> + <description> + <text>NETCONF over Secure Shell (SSH).</text> + </description> + <reference> + <text>RFC 4742: Using the NETCONF Configuration Protocol + over Secure SHell (SSH)</text> + </reference> + </identity> + <identity name="netconf-soap-over-beep"> + <base name="transport"/> + <description> + <text>NETCONF over Simple Object Access Protocol (SOAP) over +Blocks Extensible Exchange Protocol (BEEP).</text> + </description> + <reference> + <text>RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)</text> + </reference> + </identity> + <identity name="netconf-soap-over-https"> + <base name="transport"/> + <description> + <text>NETCONF over Simple Object Access Protocol (SOAP) +over Hypertext Transfer Protocol Secure (HTTPS).</text> + </description> + <reference> + <text>RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)</text> + </reference> + </identity> + <identity name="netconf-beep"> + <base name="transport"/> + <description> + <text>NETCONF over Blocks Extensible Exchange Protocol (BEEP).</text> + </description> + <reference> + <text>RFC 4744: Using the NETCONF Protocol over the + Blocks Extensible Exchange Protocol (BEEP)</text> + </reference> + </identity> + <identity name="netconf-tls"> + <base name="transport"/> + <description> + <text>NETCONF over Transport Layer Security (TLS).</text> + </description> + <reference> + <text>RFC 5539: NETCONF over Transport Layer Security (TLS)</text> + </reference> + </identity> + <identity name="schema-format"> + <description> + <text>Base identity for data model schema languages.</text> + </description> + </identity> + <identity name="xsd"> + <base name="schema-format"/> + <description> + <text>W3C XML Schema Definition.</text> + </description> + <reference> + <text>W3C REC REC-xmlschema-1-20041028: + XML Schema Part 1: Structures</text> + </reference> + </identity> + <identity name="yang"> + <base name="schema-format"/> + <description> + <text>The YANG data modeling language for NETCONF.</text> + </description> + <reference> + <text>RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)</text> + </reference> + </identity> + <identity name="yin"> + <base name="schema-format"/> + <description> + <text>The YIN syntax for YANG.</text> + </description> + <reference> + <text>RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)</text> + </reference> + </identity> + <identity name="rng"> + <base name="schema-format"/> + <description> + <text>Regular Language for XML Next Generation (RELAX NG).</text> + </description> + <reference> + <text>ISO/IEC 19757-2:2008: RELAX NG</text> + </reference> + </identity> + <identity name="rnc"> + <base name="schema-format"/> + <description> + <text>Relax NG Compact Syntax</text> + </description> + <reference> + <text>ISO/IEC 19757-2:2008: RELAX NG</text> + </reference> + </identity> + <typedef name="netconf-datastore-type"> + <type name="enumeration"> + <enum name="running"/> + <enum name="candidate"/> + <enum name="startup"/> + </type> + <description> + <text>Enumeration of possible NETCONF datastore types.</text> + </description> + <reference> + <text>RFC 4741: NETCONF Configuration Protocol</text> + </reference> + </typedef> + <grouping name="common-counters"> + <description> + <text>Counters that exist both per session, and also globally, +accumulated from all sessions.</text> + </description> + <leaf name="in-rpcs"> + <type name="yang:zero-based-counter32"/> + <description> + <text>Number of correct &lt;rpc&gt; messages received.</text> + </description> + </leaf> + <leaf name="in-bad-rpcs"> + <type name="yang:zero-based-counter32"/> + <description> + <text>Number of messages received when an &lt;rpc&gt; message was expected, +that were not correct &lt;rpc&gt; messages. This includes XML parse +errors and errors on the rpc layer.</text> + </description> + </leaf> + <leaf name="out-rpc-errors"> + <type name="yang:zero-based-counter32"/> + <description> + <text>Number of &lt;rpc-reply&gt; messages sent that contained an +&lt;rpc-error&gt; element.</text> + </description> + </leaf> + <leaf name="out-notifications"> + <type name="yang:zero-based-counter32"/> + <description> + <text>Number of &lt;notification&gt; messages sent.</text> + </description> + </leaf> + </grouping> + <container name="netconf-state"> + <config value="false"/> + <description> + <text>The netconf-state container is the root of the monitoring +data model.</text> + </description> + <container name="capabilities"> + <description> + <text>Contains the list of NETCONF capabilities supported by the +server.</text> + </description> + <leaf-list name="capability"> + <type name="inet:uri"/> + <description> + <text>List of NETCONF capabilities supported by the server.</text> + </description> + </leaf-list> + </container> + <container name="datastores"> + <description> + <text>Contains the list of NETCONF configuration datastores.</text> + </description> + <list name="datastore"> + <key value="name"/> + <description> + <text>List of NETCONF configuration datastores supported by +the NETCONF server and related information.</text> + </description> + <leaf name="name"> + <type name="netconf-datastore-type"/> + <description> + <text>Name of the datastore associated with this list entry.</text> + </description> + </leaf> + <container name="locks"> + <presence value="This container is present only if the datastore +is locked."/> + <description> + <text>The NETCONF &lt;lock&gt; and &lt;partial-lock&gt; operations allow +a client to lock specific resources in a datastore. The +NETCONF server will prevent changes to the locked +resources by all sessions except the one that acquired +the lock(s). + +Monitoring information is provided for each datastore +entry including details such as the session that acquired +the lock, the type of lock (global or partial) and the +list of locked resources. Multiple locks per datastore +are supported.</text> + </description> + <grouping name="lock-info"> + <description> + <text>Lock related parameters, common to both global and +partial locks.</text> + </description> + <leaf name="locked-by-session"> + <type name="uint32"/> + <mandatory value="true"/> + <description> + <text>The session ID of the session that has locked +this resource. Both a global lock and a partial +lock MUST contain the NETCONF session-id. + +If the lock is held by a session that is not managed +by the NETCONF server (e.g., a CLI session), a session +id of 0 (zero) is reported.</text> + </description> + <reference> + <text>RFC 4741: NETCONF Configuration Protocol</text> + </reference> + </leaf> + <leaf name="locked-time"> + <type name="yang:date-and-time"/> + <mandatory value="true"/> + <description> + <text>The date and time of when the resource was +locked.</text> + </description> + </leaf> + </grouping> + <choice name="lock-type"> + <description> + <text>Indicates if a global lock or a set of partial locks +are set.</text> + </description> + <container name="global-lock"> + <description> + <text>Present if the global lock is set.</text> + </description> + <uses name="lock-info"/> + </container> + <list name="partial-lock"> + <key value="lock-id"/> + <description> + <text>List of partial locks.</text> + </description> + <reference> + <text>RFC 5717: Partial Lock Remote Procedure Call (RPC) for + NETCONF</text> + </reference> + <leaf name="lock-id"> + <type name="uint32"/> + <description> + <text>This is the lock id returned in the &lt;partial-lock&gt; +response.</text> + </description> + </leaf> + <uses name="lock-info"/> + <leaf-list name="select"> + <type name="yang:xpath1.0"/> + <min-elements value="1"/> + <description> + <text>The xpath expression that was used to request +the lock. The select expression indicates the +original intended scope of the lock.</text> + </description> + </leaf-list> + <leaf-list name="locked-node"> + <type name="instance-identifier"/> + <description> + <text>The list of instance-identifiers (i.e., the +locked nodes). + +The scope of the partial lock is defined by the list +of locked nodes.</text> + </description> + </leaf-list> + </list> + </choice> + </container> + </list> + </container> + <container name="schemas"> + <description> + <text>Contains the list of data model schemas supported by the +server.</text> + </description> + <list name="schema"> + <key value="identifier version format"/> + <description> + <text>List of data model schemas supported by the server.</text> + </description> + <leaf name="identifier"> + <type name="string"/> + <description> + <text>Identifier to uniquely reference the schema. The +identifier is used in the &lt;get-schema&gt; operation and may +be used for other purposes such as file retrieval. + +For modeling languages that support or require a data +model name (e.g., YANG module name) the identifier MUST +match that name. For YANG data models, the identifier is +the name of the module or submodule. In other cases, an +identifier such as a filename MAY be used instead.</text> + </description> + </leaf> + <leaf name="version"> + <type name="string"/> + <description> + <text>Version of the schema supported. Multiple versions MAY be +supported simultaneously by a NETCONF server. Each +version MUST be reported individually in the schema list, +i.e., with same identifier, possibly different location, +but different version. + +For YANG data models, version is the value of the most +recent YANG 'revision' statement in the module or +submodule, or the empty string if no 'revision' statement +is present.</text> + </description> + </leaf> + <leaf name="format"> + <type name="identityref"> + <base name="schema-format"/> + </type> + <description> + <text>The data modeling language the schema is written +in (currently xsd, yang, yin, rng, or rnc). +For YANG data models, 'yang' format MUST be supported and +'yin' format MAY also be provided.</text> + </description> + </leaf> + <leaf name="namespace"> + <type name="inet:uri"/> + <mandatory value="true"/> + <description> + <text>The XML namespace defined by the data model. + +For YANG data models, this is the module's namespace. +If the list entry describes a submodule, this field +contains the namespace of the module to which the +submodule belongs.</text> + </description> + </leaf> + <leaf-list name="location"> + <type name="union"> + <type name="enumeration"> + <enum name="NETCONF"/> + </type> + <type name="inet:uri"/> + </type> + <description> + <text>One or more locations from which the schema can be +retrieved. This list SHOULD contain at least one +entry per schema. + +A schema entry may be located on a remote file system +(e.g., reference to file system for ftp retrieval) or +retrieved directly from a server supporting the +&lt;get-schema&gt; operation (denoted by the value 'NETCONF').</text> + </description> + </leaf-list> + </list> + </container> + <container name="sessions"> + <description> + <text>The sessions container includes session-specific data for +NETCONF management sessions. The session list MUST include +all currently active NETCONF sessions.</text> + </description> + <list name="session"> + <key value="session-id"/> + <description> + <text>All NETCONF sessions managed by the NETCONF server +MUST be reported in this list.</text> + </description> + <leaf name="session-id"> + <type name="uint32"> + <range value="1..max"/> + </type> + <description> + <text>Unique identifier for the session. This value is the +NETCONF session identifier, as defined in RFC 4741.</text> + </description> + <reference> + <text>RFC 4741: NETCONF Configuration Protocol</text> + </reference> + </leaf> + <leaf name="transport"> + <type name="identityref"> + <base name="transport"/> + </type> + <mandatory value="true"/> + <description> + <text>Identifies the transport for each session, e.g., +'netconf-ssh', 'netconf-soap', etc.</text> + </description> + </leaf> + <leaf name="username"> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>The username is the client identity that was authenticated +by the NETCONF transport protocol. The algorithm used to +derive the username is NETCONF transport protocol specific +and in addition specific to the authentication mechanism +used by the NETCONF transport protocol.</text> + </description> + </leaf> + <leaf name="source-host"> + <type name="inet:host"/> + <description> + <text>Host identifier of the NETCONF client. The value +returned is implementation specific (e.g., hostname, +IPv4 address, IPv6 address)</text> + </description> + </leaf> + <leaf name="login-time"> + <type name="yang:date-and-time"/> + <mandatory value="true"/> + <description> + <text>Time at the server at which the session was established.</text> + </description> + </leaf> + <uses name="common-counters"> + <description> + <text>Per-session counters. Zero based with following reset +behaviour: + - at start of a session + - when max value is reached</text> + </description> + </uses> + </list> + </container> + <container name="statistics"> + <description> + <text>Statistical data pertaining to the NETCONF server.</text> + </description> + <leaf name="netconf-start-time"> + <type name="yang:date-and-time"/> + <description> + <text>Date and time at which the management subsystem was +started.</text> + </description> + </leaf> + <leaf name="in-bad-hellos"> + <type name="yang:zero-based-counter32"/> + <description> + <text>Number of sessions silently dropped because an +invalid &lt;hello&gt; message was received. This includes &lt;hello&gt; +messages with a 'session-id' attribute, bad namespace, and +bad capability declarations.</text> + </description> + </leaf> + <leaf name="in-sessions"> + <type name="yang:zero-based-counter32"/> + <description> + <text>Number of sessions started. This counter is incremented +when a &lt;hello&gt; message with a &lt;session-id&gt; is sent. + +'in-sessions' - 'in-bad-hellos' = + 'number of correctly started netconf sessions'</text> + </description> + </leaf> + <leaf name="dropped-sessions"> + <type name="yang:zero-based-counter32"/> + <description> + <text>Number of sessions that were abnormally terminated, e.g., +due to idle timeout or transport close. This counter is not +incremented when a session is properly closed by a +&lt;close-session&gt; operation, or killed by a &lt;kill-session&gt; +operation.</text> + </description> + </leaf> + <uses name="common-counters"> + <description> + <text>Global counters, accumulated from all sessions. +Zero based with following reset behaviour: + - re-initialization of NETCONF server + - when max value is reached</text> + </description> + </uses> + </container> + </container> + <rpc name="get-schema"> + <description> + <text>This operation is used to retrieve a schema from the +NETCONF server. + +Positive Response: + The NETCONF server returns the requested schema. + +Negative Response: + If requested schema does not exist, the &lt;error-tag&gt; is + 'invalid-value'. + + If more than one schema matches the requested parameters, the + &lt;error-tag&gt; is 'operation-failed', and &lt;error-app-tag&gt; is + 'data-not-unique'.</text> + </description> + <input> + <leaf name="identifier"> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>Identifier for the schema list entry.</text> + </description> + </leaf> + <leaf name="version"> + <type name="string"/> + <description> + <text>Version of the schema requested. If this parameter is not +present, and more than one version of the schema exists on +the server, a 'data-not-unique' error is returned, as +described above.</text> + </description> + </leaf> + <leaf name="format"> + <type name="identityref"> + <base name="schema-format"/> + </type> + <description> + <text>The data modeling language of the schema. If this +parameter is not present, and more than one formats of +the schema exists on the server, a 'data-not-unique' error +is returned, as described above.</text> + </description> + </leaf> + </input> + <output> + <anyxml name="data"> + <description> + <text>Contains the schema content.</text> + </description> + </anyxml> + </output> + </rpc> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-notifications@2012-02-06.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-notifications@2012-02-06.yang new file mode 100644 index 00000000..a8711738 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-notifications@2012-02-06.yang @@ -0,0 +1,323 @@ + + module ietf-netconf-notifications { + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"; + prefix ncn; + + import ietf-inet-types { + prefix inet; + } + + import ietf-netconf { + prefix nc; + } + + organization + "IETF NETCONF (Network Configuration Protocol) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + WG Chair: Bert Wijnen + <mailto:bertietf@bwijnen.net> + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + Editor: Andy Bierman + <mailto:andy@netconfcentral.org>"; + description + "This module defines a YANG data model for use with the + NETCONF protocol that allows the NETCONF client to + receive common NETCONF base event notifications. + Copyright (c) 2012 IETF Trust and the persons identified as + the document authors. All rights reserved. + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC 6470; see + the RFC itself for full legal notices."; + + revision 2012-02-06 { + description + "Initial version."; + reference + "RFC 6470: NETCONF Base Notifications"; + } + + grouping common-session-parms { + description + "Common session parameters to identify a + management session."; + leaf username { + type string; + mandatory true; + description + "Name of the user for the session."; + } + + leaf session-id { + type nc:session-id-or-zero-type; + mandatory true; + description + "Identifier of the session. + A NETCONF session MUST be identified by a non-zero value. + A non-NETCONF session MAY be identified by the value zero."; + } + + leaf source-host { + type inet:ip-address; + description + "Address of the remote host for the session."; + } + } + + grouping changed-by-parms { + description + "Common parameters to identify the source + of a change event, such as a configuration + or capability change."; + container changed-by { + description + "Indicates the source of the change. + If caused by internal action, then the + empty leaf 'server' will be present. + If caused by a management session, then + the name, remote host address, and session ID + of the session that made the change will be reported."; + choice server-or-user { + mandatory true; + leaf server { + type empty; + description + "If present, the change was caused + by the server."; + } + + case by-user { + uses common-session-parms; + } + } + } + } + + notification netconf-config-change { + description + "Generated when the NETCONF server detects that the + <running> or <startup> configuration datastore + has been changed by a management session. + The notification summarizes the edits that + have been detected. + The server MAY choose to also generate this + notification while loading a datastore during the + boot process for the device."; + uses changed-by-parms; + + leaf datastore { + type enumeration { + enum "running" { + description + "The <running> datastore has changed."; + } + enum "startup" { + description + "The <startup> datastore has changed"; + } + } + default "running"; + description + "Indicates which configuration datastore has changed."; + } + + list edit { + description + "An edit record SHOULD be present for each distinct + edit operation that the server has detected on + the target datastore. This list MAY be omitted + if the detailed edit operations are not known. + The server MAY report entries in this list for + changes not made by a NETCONF session (e.g., CLI)."; + leaf target { + type instance-identifier; + description + "Topmost node associated with the configuration change. + A server SHOULD set this object to the node within + the datastore that is being altered. A server MAY + set this object to one of the ancestors of the actual + node that was changed, or omit this object, if the + exact node is not known."; + } + + leaf operation { + type nc:edit-operation-type; + description + "Type of edit operation performed. + A server MUST set this object to the NETCONF edit + operation performed on the target datastore."; + } + } + } + + notification netconf-capability-change { + description + "Generated when the NETCONF server detects that + the server capabilities have changed. + Indicates which capabilities have been added, deleted, + and/or modified. The manner in which a server + capability is changed is outside the scope of this + document."; + uses changed-by-parms; + + leaf-list added-capability { + type inet:uri; + description + "List of capabilities that have just been added."; + } + + leaf-list deleted-capability { + type inet:uri; + description + "List of capabilities that have just been deleted."; + } + + leaf-list modified-capability { + type inet:uri; + description + "List of capabilities that have just been modified. + A capability is considered to be modified if the + base URI for the capability has not changed, but + one or more of the parameters encoded at the end of + the capability URI have changed. + The new modified value of the complete URI is returned."; + } + } + + notification netconf-session-start { + description + "Generated when a NETCONF server detects that a + NETCONF session has started. A server MAY generate + this event for non-NETCONF management sessions. + Indicates the identity of the user that started + the session."; + uses common-session-parms; + } + + notification netconf-session-end { + description + "Generated when a NETCONF server detects that a + NETCONF session has terminated. + A server MAY optionally generate this event for + non-NETCONF management sessions. Indicates the + identity of the user that owned the session, + and why the session was terminated."; + uses common-session-parms; + + leaf killed-by { + when "../termination-reason = 'killed'"; + type nc:session-id-type; + description + "The ID of the session that directly caused this session + to be abnormally terminated. If this session was abnormally + terminated by a non-NETCONF session unknown to the server, + then this leaf will not be present."; + } + + leaf termination-reason { + type enumeration { + enum "closed" { + description + "The session was terminated by the client in normal + fashion, e.g., by the NETCONF <close-session> + protocol operation."; + } + enum "killed" { + description + "The session was terminated in abnormal + fashion, e.g., by the NETCONF <kill-session> + protocol operation."; + } + enum "dropped" { + description + "The session was terminated because the transport layer + connection was unexpectedly closed."; + } + enum "timeout" { + description + "The session was terminated because of inactivity, + e.g., waiting for the <hello> message or <rpc> + messages."; + } + enum "bad-hello" { + description + "The client's <hello> message was invalid."; + } + enum "other" { + description + "The session was terminated for some other reason."; + } + } + mandatory true; + description + "Reason the session was terminated."; + } + } + + notification netconf-confirmed-commit { + description + "Generated when a NETCONF server detects that a + confirmed-commit event has occurred. Indicates the event + and the current state of the confirmed-commit procedure + in progress."; + reference + "RFC 6241, Section 8.4"; + uses common-session-parms { + when "confirm-event != 'timeout'"; + } + + leaf confirm-event { + type enumeration { + enum "start" { + description + "The confirmed-commit procedure has started."; + } + enum "cancel" { + description + "The confirmed-commit procedure has been canceled, + e.g., due to the session being terminated, or an + explicit <cancel-commit> operation."; + } + enum "timeout" { + description + "The confirmed-commit procedure has been canceled + due to the confirm-timeout interval expiring. + The common session parameters will not be present + in this sub-mode."; + } + enum "extend" { + description + "The confirmed-commit timeout has been extended, + e.g., by a new <confirmed-commit> operation."; + } + enum "complete" { + description + "The confirmed-commit procedure has been completed."; + } + } + mandatory true; + description + "Indicates the event that caused the notification."; + } + + leaf timeout { + when "../confirm-event = 'start' or ../confirm-event = 'extend'"; + type uint32; + units "seconds"; + description + "The configured timeout value if the event type + is 'start' or 'extend'. This value represents + the approximate number of seconds from the event + time when the 'timeout' event might occur."; + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-notifications@2012-02-06.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-notifications@2012-02-06.yin new file mode 100644 index 00000000..c703b306 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-notifications@2012-02-06.yin @@ -0,0 +1,346 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-netconf-notifications" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ncn="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types" + xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"/> + <prefix value="ncn"/> + <import module="ietf-inet-types"> + <prefix value="inet"/> + </import> + <import module="ietf-netconf"> + <prefix value="nc"/> + </import> + <organization> + <text>IETF NETCONF (Network Configuration Protocol) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;mailto:netconf@ietf.org&gt; +WG Chair: Bert Wijnen + &lt;mailto:bertietf@bwijnen.net&gt; +WG Chair: Mehmet Ersue + &lt;mailto:mehmet.ersue@nsn.com&gt; +Editor: Andy Bierman + &lt;mailto:andy@netconfcentral.org&gt;</text> + </contact> + <description> + <text>This module defines a YANG data model for use with the +NETCONF protocol that allows the NETCONF client to +receive common NETCONF base event notifications. +Copyright (c) 2012 IETF Trust and the persons identified as +the document authors. All rights reserved. +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). +This version of this YANG module is part of RFC 6470; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2012-02-06"> + <description> + <text>Initial version.</text> + </description> + <reference> + <text>RFC 6470: NETCONF Base Notifications</text> + </reference> + </revision> + <grouping name="common-session-parms"> + <description> + <text>Common session parameters to identify a +management session.</text> + </description> + <leaf name="username"> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>Name of the user for the session.</text> + </description> + </leaf> + <leaf name="session-id"> + <type name="nc:session-id-or-zero-type"/> + <mandatory value="true"/> + <description> + <text>Identifier of the session. +A NETCONF session MUST be identified by a non-zero value. +A non-NETCONF session MAY be identified by the value zero.</text> + </description> + </leaf> + <leaf name="source-host"> + <type name="inet:ip-address"/> + <description> + <text>Address of the remote host for the session.</text> + </description> + </leaf> + </grouping> + <grouping name="changed-by-parms"> + <description> + <text>Common parameters to identify the source +of a change event, such as a configuration +or capability change.</text> + </description> + <container name="changed-by"> + <description> + <text>Indicates the source of the change. +If caused by internal action, then the +empty leaf 'server' will be present. +If caused by a management session, then +the name, remote host address, and session ID +of the session that made the change will be reported.</text> + </description> + <choice name="server-or-user"> + <mandatory value="true"/> + <leaf name="server"> + <type name="empty"/> + <description> + <text>If present, the change was caused +by the server.</text> + </description> + </leaf> + <case name="by-user"> + <uses name="common-session-parms"/> + </case> + </choice> + </container> + </grouping> + <notification name="netconf-config-change"> + <description> + <text>Generated when the NETCONF server detects that the +&lt;running&gt; or &lt;startup&gt; configuration datastore +has been changed by a management session. +The notification summarizes the edits that +have been detected. +The server MAY choose to also generate this +notification while loading a datastore during the +boot process for the device.</text> + </description> + <uses name="changed-by-parms"/> + <leaf name="datastore"> + <type name="enumeration"> + <enum name="running"> + <description> + <text>The &lt;running&gt; datastore has changed.</text> + </description> + </enum> + <enum name="startup"> + <description> + <text>The &lt;startup&gt; datastore has changed</text> + </description> + </enum> + </type> + <default value="running"/> + <description> + <text>Indicates which configuration datastore has changed.</text> + </description> + </leaf> + <list name="edit"> + <description> + <text>An edit record SHOULD be present for each distinct +edit operation that the server has detected on +the target datastore. This list MAY be omitted +if the detailed edit operations are not known. +The server MAY report entries in this list for +changes not made by a NETCONF session (e.g., CLI).</text> + </description> + <leaf name="target"> + <type name="instance-identifier"/> + <description> + <text>Topmost node associated with the configuration change. +A server SHOULD set this object to the node within +the datastore that is being altered. A server MAY +set this object to one of the ancestors of the actual +node that was changed, or omit this object, if the +exact node is not known.</text> + </description> + </leaf> + <leaf name="operation"> + <type name="nc:edit-operation-type"/> + <description> + <text>Type of edit operation performed. +A server MUST set this object to the NETCONF edit +operation performed on the target datastore.</text> + </description> + </leaf> + </list> + </notification> + <notification name="netconf-capability-change"> + <description> + <text>Generated when the NETCONF server detects that +the server capabilities have changed. +Indicates which capabilities have been added, deleted, +and/or modified. The manner in which a server +capability is changed is outside the scope of this +document.</text> + </description> + <uses name="changed-by-parms"/> + <leaf-list name="added-capability"> + <type name="inet:uri"/> + <description> + <text>List of capabilities that have just been added.</text> + </description> + </leaf-list> + <leaf-list name="deleted-capability"> + <type name="inet:uri"/> + <description> + <text>List of capabilities that have just been deleted.</text> + </description> + </leaf-list> + <leaf-list name="modified-capability"> + <type name="inet:uri"/> + <description> + <text>List of capabilities that have just been modified. +A capability is considered to be modified if the +base URI for the capability has not changed, but +one or more of the parameters encoded at the end of +the capability URI have changed. +The new modified value of the complete URI is returned.</text> + </description> + </leaf-list> + </notification> + <notification name="netconf-session-start"> + <description> + <text>Generated when a NETCONF server detects that a +NETCONF session has started. A server MAY generate +this event for non-NETCONF management sessions. +Indicates the identity of the user that started +the session.</text> + </description> + <uses name="common-session-parms"/> + </notification> + <notification name="netconf-session-end"> + <description> + <text>Generated when a NETCONF server detects that a +NETCONF session has terminated. +A server MAY optionally generate this event for +non-NETCONF management sessions. Indicates the +identity of the user that owned the session, +and why the session was terminated.</text> + </description> + <uses name="common-session-parms"/> + <leaf name="killed-by"> + <when condition="../termination-reason = 'killed'"/> + <type name="nc:session-id-type"/> + <description> + <text>The ID of the session that directly caused this session +to be abnormally terminated. If this session was abnormally +terminated by a non-NETCONF session unknown to the server, +then this leaf will not be present.</text> + </description> + </leaf> + <leaf name="termination-reason"> + <type name="enumeration"> + <enum name="closed"> + <description> + <text>The session was terminated by the client in normal +fashion, e.g., by the NETCONF &lt;close-session&gt; +protocol operation.</text> + </description> + </enum> + <enum name="killed"> + <description> + <text>The session was terminated in abnormal +fashion, e.g., by the NETCONF &lt;kill-session&gt; +protocol operation.</text> + </description> + </enum> + <enum name="dropped"> + <description> + <text>The session was terminated because the transport layer +connection was unexpectedly closed.</text> + </description> + </enum> + <enum name="timeout"> + <description> + <text>The session was terminated because of inactivity, +e.g., waiting for the &lt;hello&gt; message or &lt;rpc&gt; +messages.</text> + </description> + </enum> + <enum name="bad-hello"> + <description> + <text>The client's &lt;hello&gt; message was invalid.</text> + </description> + </enum> + <enum name="other"> + <description> + <text>The session was terminated for some other reason.</text> + </description> + </enum> + </type> + <mandatory value="true"/> + <description> + <text>Reason the session was terminated.</text> + </description> + </leaf> + </notification> + <notification name="netconf-confirmed-commit"> + <description> + <text>Generated when a NETCONF server detects that a +confirmed-commit event has occurred. Indicates the event +and the current state of the confirmed-commit procedure +in progress.</text> + </description> + <reference> + <text>RFC 6241, Section 8.4</text> + </reference> + <uses name="common-session-parms"> + <when condition="confirm-event != 'timeout'"/> + </uses> + <leaf name="confirm-event"> + <type name="enumeration"> + <enum name="start"> + <description> + <text>The confirmed-commit procedure has started.</text> + </description> + </enum> + <enum name="cancel"> + <description> + <text>The confirmed-commit procedure has been canceled, +e.g., due to the session being terminated, or an +explicit &lt;cancel-commit&gt; operation.</text> + </description> + </enum> + <enum name="timeout"> + <description> + <text>The confirmed-commit procedure has been canceled +due to the confirm-timeout interval expiring. +The common session parameters will not be present +in this sub-mode.</text> + </description> + </enum> + <enum name="extend"> + <description> + <text>The confirmed-commit timeout has been extended, +e.g., by a new &lt;confirmed-commit&gt; operation.</text> + </description> + </enum> + <enum name="complete"> + <description> + <text>The confirmed-commit procedure has been completed.</text> + </description> + </enum> + </type> + <mandatory value="true"/> + <description> + <text>Indicates the event that caused the notification.</text> + </description> + </leaf> + <leaf name="timeout"> + <when condition="../confirm-event = 'start' or ../confirm-event = 'extend'"/> + <type name="uint32"/> + <units name="seconds"/> + <description> + <text>The configured timeout value if the event type +is 'start' or 'extend'. This value represents +the approximate number of seconds from the event +time when the 'timeout' event might occur.</text> + </description> + </leaf> + </notification> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-server@2016-11-02.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-server@2016-11-02.yang new file mode 100644 index 00000000..fa433a1d --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-server@2016-11-02.yang @@ -0,0 +1,501 @@ + + module ietf-netconf-server { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-server"; + prefix ncs; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-x509-cert-to-name { + prefix x509c2n; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + import ietf-ssh-server { + prefix ss; + revision-date 2016-11-02; + reference + "RFC YYYY: SSH Client and Server Models"; + } + + import ietf-tls-server { + prefix ts; + revision-date 2016-11-02; + reference + "RFC ZZZZ: TLS Client and Server Models"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Mahesh Jethanandani + <mailto:mjethanandani@gmail.com> + + Editor: Kent Watsen + <mailto:kwatsen@juniper.net>"; + description + "This module contains a collection of YANG definitions for + configuring NETCONF servers. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + revision 2016-11-02 { + description + "Initial version"; + reference + "RFC XXXX: NETCONF Client and Server Models"; + } + + feature listen { + description + "The 'listen' feature indicates that the NETCONF server + supports opening a port to accept NETCONF client connections + using at least one transport (e.g., SSH, TLS, etc.)."; + } + + feature ssh-listen { + description + "The 'ssh-listen' feature indicates that the NETCONF server + supports opening a port to accept NETCONF over SSH + client connections."; + reference + "RFC 6242: Using the NETCONF Protocol over Secure Shell (SSH)"; + } + + feature tls-listen { + description + "The 'tls-listen' feature indicates that the NETCONF server + supports opening a port to accept NETCONF over TLS + client connections."; + reference + "RFC 7589: Using the NETCONF Protocol over Transport + Layer Security (TLS) with Mutual X.509 + Authentication"; + } + + feature call-home { + description + "The 'call-home' feature indicates that the NETCONF server + supports initiating NETCONF call home connections to NETCONF + clients using at least one transport (e.g., SSH, TLS, etc.)."; + reference + "RFC YYYY: NETCONF Call Home and RESTCONF Call Home"; + } + + feature ssh-call-home { + description + "The 'ssh-call-home' feature indicates that the NETCONF + server supports initiating a NETCONF over SSH call + home connection to NETCONF clients."; + reference + "RFC YYYY: NETCONF Call Home and RESTCONF Call Home"; + } + + feature tls-call-home { + description + "The 'tls-call-home' feature indicates that the NETCONF + server supports initiating a NETCONF over TLS call + home connection to NETCONF clients."; + reference + "RFC YYYY: NETCONF Call Home and RESTCONF Call Home"; + } + + grouping cert-maps-grouping { + description + "A grouping that defines a container around the + cert-to-name structure defined in RFC 7407."; + container cert-maps { + description + "The cert-maps container is used by a TLS-based NETCONF + server to map the NETCONF client's presented X.509 + certificate to a NETCONF username. If no matching and + valid cert-to-name list entry can be found, then the + NETCONF server MUST close the connection, and MUST NOT + accept NETCONF messages over it."; + reference + "RFC WWWW: NETCONF over TLS, Section 7"; + uses x509c2n:cert-to-name; + } + } + + grouping endpoints-container { + description + "This grouping is used by both the ssh and tls containers + for call-home configurations."; + container endpoints { + description + "Container for the list of endpoints."; + list endpoint { + key "name"; + min-elements 1; + ordered-by user; + description + "User-ordered list of endpoints for this NETCONF client. + Defining more than one enables high-availability."; + leaf name { + type string; + description + "An arbitrary name for this endpoint."; + } + + leaf address { + type inet:host; + mandatory true; + description + "The IP address or hostname of the endpoint. If a + hostname is configured and the DNS resolution results + in more than one IP address, the NETCONF server + will process the IP addresses as if they had been + explicitly configured in place of the hostname."; + } + + leaf port { + type inet:port-number; + description + "The IP port for this endpoint. The NETCONF server will + use the IANA-assigned well-known port if no value is + specified."; + } + } + } + } + + container netconf-server { + description + "Top-level container for NETCONF server configuration."; + container session-options { + description + "NETCONF session options, independent of transport + or connection strategy."; + leaf hello-timeout { + type uint16; + units "seconds"; + default "600"; + description + "Specifies the maximum number of seconds that a SSH/TLS + connection may wait for a hello message to be received. + A connection will be dropped if no hello message is + received before this number of seconds elapses. If set + to zero, then the server will wait forever for a hello + message."; + } + } + + container listen { + if-feature "listen"; + description + "Configures listen behavior"; + leaf max-sessions { + type uint16; + default "0"; + description + "Specifies the maximum number of concurrent sessions + that can be active at one time. The value 0 indicates + that no artificial session limit should be used."; + } + + leaf idle-timeout { + type uint16; + units "seconds"; + default "3600"; + description + "Specifies the maximum number of seconds that a NETCONF + session may remain idle. A NETCONF session will be dropped + if it is idle for an interval longer than this number of + seconds. If set to zero, then the server will never drop + a session because it is idle. Sessions that have a + notification subscription active are never dropped."; + } + + list endpoint { + key "name"; + description + "List of endpoints to listen for NETCONF connections on."; + leaf name { + type string; + description + "An arbitrary name for the NETCONF listen endpoint."; + } + + choice transport { + mandatory true; + description + "Selects between available transports."; + case ssh { + if-feature "ssh-listen"; + container ssh { + description + "SSH-specific listening configuration for inbound + connections."; + uses ss:listening-ssh-server-grouping { + refine "port" { + default "830"; + } + } + } + } + + case tls { + if-feature "tls-listen"; + container tls { + description + "TLS-specific listening configuration for inbound + connections."; + uses ts:listening-tls-server-grouping { + refine "port" { + default "6513"; + } + augment "client-auth" { + description + "Augments in the cert-to-name structure."; + uses cert-maps-grouping; + } + } + } + } + } + } + } + + container call-home { + if-feature "call-home"; + description + "Configures call-home behavior"; + list netconf-client { + key "name"; + description + "List of NETCONF clients the NETCONF server is to initiate + call-home connections to."; + leaf name { + type string; + description + "An arbitrary name for the remote NETCONF client."; + } + + choice transport { + mandatory true; + description + "Selects between available transports."; + case ssh { + if-feature "ssh-call-home"; + container ssh { + description + "Specifies SSH-specific call-home transport + configuration."; + uses endpoints-container { + refine "endpoints/endpoint/port" { + default "4334"; + } + } + + uses ss:non-listening-ssh-server-grouping; + } + } + + case tls { + if-feature "tls-call-home"; + container tls { + description + "Specifies TLS-specific call-home transport + configuration."; + uses endpoints-container { + refine "endpoints/endpoint/port" { + default "4335"; + } + } + + uses ts:non-listening-tls-server-grouping { + augment "client-auth" { + description + "Augments in the cert-to-name structure."; + uses cert-maps-grouping; + } + } + } + } + } + + container connection-type { + description + "Indicates the kind of connection to use."; + choice connection-type { + description + "Selects between available connection types."; + case persistent-connection { + container persistent { + presence "true"; + description + "Maintain a persistent connection to the NETCONF + client. If the connection goes down, immediately + start trying to reconnect to it, using the + reconnection strategy. + + This connection type minimizes any NETCONF client + to NETCONF server data-transfer delay, albeit at + the expense of holding resources longer."; + leaf idle-timeout { + type uint32; + units "seconds"; + default "86400"; + description + "Specifies the maximum number of seconds that a + a NETCONF session may remain idle. A NETCONF + session will be dropped if it is idle for an + interval longer than this number of seconds. + If set to zero, then the server will never drop + a session because it is idle. Sessions that + have a notification subscription active are + never dropped."; + } + + container keep-alives { + description + "Configures the keep-alive policy, to proactively + test the aliveness of the SSH/TLS client. An + unresponsive SSH/TLS client will be dropped after + approximately max-attempts * max-wait seconds."; + reference + "RFC YYYY: NETCONF Call Home and RESTCONF Call + Home, Section 3.1, item S6"; + leaf max-wait { + type uint16 { + range "1..max"; + } + units "seconds"; + default "30"; + description + "Sets the amount of time in seconds after which + if no data has been received from the SSH/TLS + client, a SSH/TLS-level message will be sent + to test the aliveness of the SSH/TLS client."; + } + + leaf max-attempts { + type uint8; + default "3"; + description + "Sets the maximum number of sequential keep-alive + messages that can fail to obtain a response from + the SSH/TLS client before assuming the SSH/TLS + client is no longer alive."; + } + } + } + } + + case periodic-connection { + container periodic { + presence "true"; + description + "Periodically connect to the NETCONF client, so that + the NETCONF client may deliver messages pending for + the NETCONF server. The NETCONF client must close + the connection when it is ready to release it. Once + the connection has been closed, the NETCONF server + will restart its timer until the next connection."; + leaf idle-timeout { + type uint16; + units "seconds"; + default "300"; + description + "Specifies the maximum number of seconds that a + a NETCONF session may remain idle. A NETCONF + session will be dropped if it is idle for an + interval longer than this number of seconds. + If set to zero, then the server will never drop + a session because it is idle. Sessions that + have a notification subscription active are + never dropped."; + } + + leaf reconnect_timeout { + type uint16 { + range "1..max"; + } + units "minutes"; + default "60"; + description + "Sets the maximum amount of unconnected time the + NETCONF server will wait before re-establishing + a connection to the NETCONF client. The NETCONF + server may initiate a connection before this + time if desired (e.g., to deliver an event + notification message)."; + } + } + } + } + } + + container reconnect-strategy { + description + "The reconnection strategy directs how a NETCONF server + reconnects to a NETCONF client, after discovering its + connection to the client has dropped, even if due to a + reboot. The NETCONF server starts with the specified + endpoint and tries to connect to it max-attempts times + before trying the next endpoint in the list (round + robin)."; + leaf start-with { + type enumeration { + enum "first-listed" { + description + "Indicates that reconnections should start with + the first endpoint listed."; + } + enum "last-connected" { + description + "Indicates that reconnections should start with + the endpoint last connected to. If no previous + connection has ever been established, then the + first endpoint configured is used. NETCONF + servers SHOULD be able to remember the last + endpoint connected to across reboots."; + } + } + default "first-listed"; + description + "Specifies which of the NETCONF client's endpoints the + NETCONF server should start with when trying to connect + to the NETCONF client."; + } + + leaf max-attempts { + type uint8 { + range "1..max"; + } + default "3"; + description + "Specifies the number times the NETCONF server tries to + connect to a specific endpoint before moving on to the + next endpoint in the list (round robin)."; + } + } + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-server@2016-11-02.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-server@2016-11-02.yin new file mode 100644 index 00000000..4d84c667 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-server@2016-11-02.yin @@ -0,0 +1,538 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-netconf-server" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ncs="urn:ietf:params:xml:ns:yang:ietf-netconf-server" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types" + xmlns:x509c2n="urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name" + xmlns:ss="urn:ietf:params:xml:ns:yang:ietf-ssh-server" + xmlns:ts="urn:ietf:params:xml:ns:yang:ietf-tls-server"> + <yang-version value="1.1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-server"/> + <prefix value="ncs"/> + <import module="ietf-inet-types"> + <prefix value="inet"/> + <reference> + <text>RFC 6991: Common YANG Data Types</text> + </reference> + </import> + <import module="ietf-x509-cert-to-name"> + <prefix value="x509c2n"/> + <reference> + <text>RFC 7407: A YANG Data Model for SNMP Configuration</text> + </reference> + </import> + <import module="ietf-ssh-server"> + <prefix value="ss"/> + <revision-date date="2016-11-02"/> + <reference> + <text>RFC YYYY: SSH Client and Server Models</text> + </reference> + </import> + <import module="ietf-tls-server"> + <prefix value="ts"/> + <revision-date date="2016-11-02"/> + <reference> + <text>RFC ZZZZ: TLS Client and Server Models</text> + </reference> + </import> + <organization> + <text>IETF NETCONF (Network Configuration) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;mailto:netconf@ietf.org&gt; + +WG Chair: Mehmet Ersue + &lt;mailto:mehmet.ersue@nsn.com&gt; + +WG Chair: Mahesh Jethanandani + &lt;mailto:mjethanandani@gmail.com&gt; + +Editor: Kent Watsen + &lt;mailto:kwatsen@juniper.net&gt;</text> + </contact> + <description> + <text>This module contains a collection of YANG definitions for +configuring NETCONF servers. + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD +License set forth in Section 4.c of the IETF Trust's +Legal Provisions Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC XXXX; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2016-11-02"> + <description> + <text>Initial version</text> + </description> + <reference> + <text>RFC XXXX: NETCONF Client and Server Models</text> + </reference> + </revision> + <feature name="listen"> + <description> + <text>The 'listen' feature indicates that the NETCONF server +supports opening a port to accept NETCONF client connections +using at least one transport (e.g., SSH, TLS, etc.).</text> + </description> + </feature> + <feature name="ssh-listen"> + <description> + <text>The 'ssh-listen' feature indicates that the NETCONF server +supports opening a port to accept NETCONF over SSH +client connections.</text> + </description> + <reference> + <text>RFC 6242: Using the NETCONF Protocol over Secure Shell (SSH)</text> + </reference> + </feature> + <feature name="tls-listen"> + <description> + <text>The 'tls-listen' feature indicates that the NETCONF server +supports opening a port to accept NETCONF over TLS +client connections.</text> + </description> + <reference> + <text>RFC 7589: Using the NETCONF Protocol over Transport + Layer Security (TLS) with Mutual X.509 + Authentication</text> + </reference> + </feature> + <feature name="call-home"> + <description> + <text>The 'call-home' feature indicates that the NETCONF server +supports initiating NETCONF call home connections to NETCONF +clients using at least one transport (e.g., SSH, TLS, etc.).</text> + </description> + <reference> + <text>RFC YYYY: NETCONF Call Home and RESTCONF Call Home</text> + </reference> + </feature> + <feature name="ssh-call-home"> + <description> + <text>The 'ssh-call-home' feature indicates that the NETCONF +server supports initiating a NETCONF over SSH call +home connection to NETCONF clients.</text> + </description> + <reference> + <text>RFC YYYY: NETCONF Call Home and RESTCONF Call Home</text> + </reference> + </feature> + <feature name="tls-call-home"> + <description> + <text>The 'tls-call-home' feature indicates that the NETCONF +server supports initiating a NETCONF over TLS call +home connection to NETCONF clients.</text> + </description> + <reference> + <text>RFC YYYY: NETCONF Call Home and RESTCONF Call Home</text> + </reference> + </feature> + <grouping name="cert-maps-grouping"> + <description> + <text>A grouping that defines a container around the +cert-to-name structure defined in RFC 7407.</text> + </description> + <container name="cert-maps"> + <description> + <text>The cert-maps container is used by a TLS-based NETCONF +server to map the NETCONF client's presented X.509 +certificate to a NETCONF username. If no matching and +valid cert-to-name list entry can be found, then the +NETCONF server MUST close the connection, and MUST NOT +accept NETCONF messages over it.</text> + </description> + <reference> + <text>RFC WWWW: NETCONF over TLS, Section 7</text> + </reference> + <uses name="x509c2n:cert-to-name"/> + </container> + </grouping> + <grouping name="endpoints-container"> + <description> + <text>This grouping is used by both the ssh and tls containers +for call-home configurations.</text> + </description> + <container name="endpoints"> + <description> + <text>Container for the list of endpoints.</text> + </description> + <list name="endpoint"> + <key value="name"/> + <min-elements value="1"/> + <ordered-by value="user"/> + <description> + <text>User-ordered list of endpoints for this NETCONF client. +Defining more than one enables high-availability.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for this endpoint.</text> + </description> + </leaf> + <leaf name="address"> + <type name="inet:host"/> + <mandatory value="true"/> + <description> + <text>The IP address or hostname of the endpoint. If a +hostname is configured and the DNS resolution results +in more than one IP address, the NETCONF server +will process the IP addresses as if they had been +explicitly configured in place of the hostname.</text> + </description> + </leaf> + <leaf name="port"> + <type name="inet:port-number"/> + <description> + <text>The IP port for this endpoint. The NETCONF server will +use the IANA-assigned well-known port if no value is +specified.</text> + </description> + </leaf> + </list> + </container> + </grouping> + <container name="netconf-server"> + <description> + <text>Top-level container for NETCONF server configuration.</text> + </description> + <container name="session-options"> + <description> + <text>NETCONF session options, independent of transport +or connection strategy.</text> + </description> + <leaf name="hello-timeout"> + <type name="uint16"/> + <units name="seconds"/> + <default value="600"/> + <description> + <text>Specifies the maximum number of seconds that a SSH/TLS +connection may wait for a hello message to be received. +A connection will be dropped if no hello message is +received before this number of seconds elapses. If set +to zero, then the server will wait forever for a hello +message.</text> + </description> + </leaf> + </container> + <container name="listen"> + <if-feature name="listen"/> + <description> + <text>Configures listen behavior</text> + </description> + <leaf name="max-sessions"> + <type name="uint16"/> + <default value="0"/> + <description> + <text>Specifies the maximum number of concurrent sessions +that can be active at one time. The value 0 indicates +that no artificial session limit should be used.</text> + </description> + </leaf> + <leaf name="idle-timeout"> + <type name="uint16"/> + <units name="seconds"/> + <default value="3600"/> + <description> + <text>Specifies the maximum number of seconds that a NETCONF +session may remain idle. A NETCONF session will be dropped +if it is idle for an interval longer than this number of +seconds. If set to zero, then the server will never drop +a session because it is idle. Sessions that have a +notification subscription active are never dropped.</text> + </description> + </leaf> + <list name="endpoint"> + <key value="name"/> + <description> + <text>List of endpoints to listen for NETCONF connections on.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for the NETCONF listen endpoint.</text> + </description> + </leaf> + <choice name="transport"> + <mandatory value="true"/> + <description> + <text>Selects between available transports.</text> + </description> + <case name="ssh"> + <if-feature name="ssh-listen"/> + <container name="ssh"> + <description> + <text>SSH-specific listening configuration for inbound +connections.</text> + </description> + <uses name="ss:listening-ssh-server-grouping"> + <refine target-node="port"> + <default value="830"/> + </refine> + </uses> + </container> + </case> + <case name="tls"> + <if-feature name="tls-listen"/> + <container name="tls"> + <description> + <text>TLS-specific listening configuration for inbound +connections.</text> + </description> + <uses name="ts:listening-tls-server-grouping"> + <refine target-node="port"> + <default value="6513"/> + </refine> + <augment target-node="client-auth"> + <description> + <text>Augments in the cert-to-name structure.</text> + </description> + <uses name="cert-maps-grouping"/> + </augment> + </uses> + </container> + </case> + </choice> + </list> + </container> + <container name="call-home"> + <if-feature name="call-home"/> + <description> + <text>Configures call-home behavior</text> + </description> + <list name="netconf-client"> + <key value="name"/> + <description> + <text>List of NETCONF clients the NETCONF server is to initiate +call-home connections to.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for the remote NETCONF client.</text> + </description> + </leaf> + <choice name="transport"> + <mandatory value="true"/> + <description> + <text>Selects between available transports.</text> + </description> + <case name="ssh"> + <if-feature name="ssh-call-home"/> + <container name="ssh"> + <description> + <text>Specifies SSH-specific call-home transport +configuration.</text> + </description> + <uses name="endpoints-container"> + <refine target-node="endpoints/endpoint/port"> + <default value="4334"/> + </refine> + </uses> + <uses name="ss:non-listening-ssh-server-grouping"/> + </container> + </case> + <case name="tls"> + <if-feature name="tls-call-home"/> + <container name="tls"> + <description> + <text>Specifies TLS-specific call-home transport +configuration.</text> + </description> + <uses name="endpoints-container"> + <refine target-node="endpoints/endpoint/port"> + <default value="4335"/> + </refine> + </uses> + <uses name="ts:non-listening-tls-server-grouping"> + <augment target-node="client-auth"> + <description> + <text>Augments in the cert-to-name structure.</text> + </description> + <uses name="cert-maps-grouping"/> + </augment> + </uses> + </container> + </case> + </choice> + <container name="connection-type"> + <description> + <text>Indicates the kind of connection to use.</text> + </description> + <choice name="connection-type"> + <description> + <text>Selects between available connection types.</text> + </description> + <case name="persistent-connection"> + <container name="persistent"> + <presence value="true"/> + <description> + <text>Maintain a persistent connection to the NETCONF +client. If the connection goes down, immediately +start trying to reconnect to it, using the +reconnection strategy. + +This connection type minimizes any NETCONF client +to NETCONF server data-transfer delay, albeit at +the expense of holding resources longer.</text> + </description> + <leaf name="idle-timeout"> + <type name="uint32"/> + <units name="seconds"/> + <default value="86400"/> + <description> + <text>Specifies the maximum number of seconds that a +a NETCONF session may remain idle. A NETCONF +session will be dropped if it is idle for an +interval longer than this number of seconds. +If set to zero, then the server will never drop +a session because it is idle. Sessions that +have a notification subscription active are +never dropped.</text> + </description> + </leaf> + <container name="keep-alives"> + <description> + <text>Configures the keep-alive policy, to proactively +test the aliveness of the SSH/TLS client. An +unresponsive SSH/TLS client will be dropped after +approximately max-attempts * max-wait seconds.</text> + </description> + <reference> + <text>RFC YYYY: NETCONF Call Home and RESTCONF Call +Home, Section 3.1, item S6</text> + </reference> + <leaf name="max-wait"> + <type name="uint16"> + <range value="1..max"/> + </type> + <units name="seconds"/> + <default value="30"/> + <description> + <text>Sets the amount of time in seconds after which +if no data has been received from the SSH/TLS +client, a SSH/TLS-level message will be sent +to test the aliveness of the SSH/TLS client.</text> + </description> + </leaf> + <leaf name="max-attempts"> + <type name="uint8"/> + <default value="3"/> + <description> + <text>Sets the maximum number of sequential keep-alive +messages that can fail to obtain a response from +the SSH/TLS client before assuming the SSH/TLS +client is no longer alive.</text> + </description> + </leaf> + </container> + </container> + </case> + <case name="periodic-connection"> + <container name="periodic"> + <presence value="true"/> + <description> + <text>Periodically connect to the NETCONF client, so that +the NETCONF client may deliver messages pending for +the NETCONF server. The NETCONF client must close +the connection when it is ready to release it. Once +the connection has been closed, the NETCONF server +will restart its timer until the next connection.</text> + </description> + <leaf name="idle-timeout"> + <type name="uint16"/> + <units name="seconds"/> + <default value="300"/> + <description> + <text>Specifies the maximum number of seconds that a +a NETCONF session may remain idle. A NETCONF +session will be dropped if it is idle for an +interval longer than this number of seconds. +If set to zero, then the server will never drop +a session because it is idle. Sessions that +have a notification subscription active are +never dropped.</text> + </description> + </leaf> + <leaf name="reconnect_timeout"> + <type name="uint16"> + <range value="1..max"/> + </type> + <units name="minutes"/> + <default value="60"/> + <description> + <text>Sets the maximum amount of unconnected time the +NETCONF server will wait before re-establishing +a connection to the NETCONF client. The NETCONF +server may initiate a connection before this +time if desired (e.g., to deliver an event +notification message).</text> + </description> + </leaf> + </container> + </case> + </choice> + </container> + <container name="reconnect-strategy"> + <description> + <text>The reconnection strategy directs how a NETCONF server +reconnects to a NETCONF client, after discovering its +connection to the client has dropped, even if due to a +reboot. The NETCONF server starts with the specified +endpoint and tries to connect to it max-attempts times +before trying the next endpoint in the list (round +robin).</text> + </description> + <leaf name="start-with"> + <type name="enumeration"> + <enum name="first-listed"> + <description> + <text>Indicates that reconnections should start with +the first endpoint listed.</text> + </description> + </enum> + <enum name="last-connected"> + <description> + <text>Indicates that reconnections should start with +the endpoint last connected to. If no previous +connection has ever been established, then the +first endpoint configured is used. NETCONF +servers SHOULD be able to remember the last +endpoint connected to across reboots.</text> + </description> + </enum> + </type> + <default value="first-listed"/> + <description> + <text>Specifies which of the NETCONF client's endpoints the +NETCONF server should start with when trying to connect +to the NETCONF client.</text> + </description> + </leaf> + <leaf name="max-attempts"> + <type name="uint8"> + <range value="1..max"/> + </type> + <default value="3"/> + <description> + <text>Specifies the number times the NETCONF server tries to +connect to a specific endpoint before moving on to the +next endpoint in the list (round robin).</text> + </description> + </leaf> + </container> + </list> + </container> + </container> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-with-defaults@2011-06-01.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-with-defaults@2011-06-01.yang new file mode 100644 index 00000000..896b6548 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-with-defaults@2011-06-01.yang @@ -0,0 +1,132 @@ + + module ietf-netconf-with-defaults { + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"; + prefix ncwd; + + import ietf-netconf { + prefix nc; + } + + organization + "IETF NETCONF (Network Configuration Protocol) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + + WG List: <netconf@ietf.org> + + WG Chair: Bert Wijnen + <bertietf@bwijnen.net> + + WG Chair: Mehmet Ersue + <mehmet.ersue@nsn.com> + + Editor: Andy Bierman + <andy.bierman@brocade.com> + + Editor: Balazs Lengyel + <balazs.lengyel@ericsson.com>"; + description + "This module defines an extension to the NETCONF protocol + that allows the NETCONF client to control how default + values are handled by the server in particular NETCONF + operations. + + Copyright (c) 2011 IETF Trust and the persons identified as + the document authors. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6243; see + the RFC itself for full legal notices."; + + revision 2011-06-01 { + description + "Initial version."; + reference + "RFC 6243: With-defaults Capability for NETCONF"; + } + + typedef with-defaults-mode { + type enumeration { + enum "report-all" { + description + "All default data is reported."; + reference + "RFC 6243; Section 3.1"; + } + enum "report-all-tagged" { + description + "All default data is reported. + Any nodes considered to be default data + will contain a 'default' XML attribute, + set to 'true' or '1'."; + reference + "RFC 6243; Section 3.4"; + } + enum "trim" { + description + "Values are not reported if they contain the default."; + reference + "RFC 6243; Section 3.2"; + } + enum "explicit" { + description + "Report values that contain the definition of + explicitly set data."; + reference + "RFC 6243; Section 3.3"; + } + } + description + "Possible modes to report default data."; + reference + "RFC 6243; Section 3."; + } + + grouping with-defaults-parameters { + description + "Contains the <with-defaults> parameter for control + of defaults in NETCONF retrieval operations."; + leaf with-defaults { + type with-defaults-mode; + description + "The explicit defaults processing mode requested."; + reference + "RFC 6243; Section 4.5.1"; + } + } + + augment "/nc:get-config/nc:input" { + description + "Adds the <with-defaults> parameter to the + input of the NETCONF <get-config> operation."; + reference + "RFC 6243; Section 4.5.1"; + uses with-defaults-parameters; + } + + augment "/nc:get/nc:input" { + description + "Adds the <with-defaults> parameter to + the input of the NETCONF <get> operation."; + reference + "RFC 6243; Section 4.5.1"; + uses with-defaults-parameters; + } + + augment "/nc:copy-config/nc:input" { + description + "Adds the <with-defaults> parameter to + the input of the NETCONF <copy-config> operation."; + reference + "RFC 6243; Section 4.5.1"; + uses with-defaults-parameters; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-with-defaults@2011-06-01.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-with-defaults@2011-06-01.yin new file mode 100644 index 00000000..d87ea7ff --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf-with-defaults@2011-06-01.yin @@ -0,0 +1,152 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-netconf-with-defaults" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ncwd="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults" + xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"/> + <prefix value="ncwd"/> + <import module="ietf-netconf"> + <prefix value="nc"/> + </import> + <organization> + <text>IETF NETCONF (Network Configuration Protocol) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; + +WG List: &lt;netconf@ietf.org&gt; + +WG Chair: Bert Wijnen + &lt;bertietf@bwijnen.net&gt; + +WG Chair: Mehmet Ersue + &lt;mehmet.ersue@nsn.com&gt; + +Editor: Andy Bierman + &lt;andy.bierman@brocade.com&gt; + +Editor: Balazs Lengyel + &lt;balazs.lengyel@ericsson.com&gt;</text> + </contact> + <description> + <text>This module defines an extension to the NETCONF protocol +that allows the NETCONF client to control how default +values are handled by the server in particular NETCONF +operations. + +Copyright (c) 2011 IETF Trust and the persons identified as +the document authors. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 6243; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2011-06-01"> + <description> + <text>Initial version.</text> + </description> + <reference> + <text>RFC 6243: With-defaults Capability for NETCONF</text> + </reference> + </revision> + <typedef name="with-defaults-mode"> + <type name="enumeration"> + <enum name="report-all"> + <description> + <text>All default data is reported.</text> + </description> + <reference> + <text>RFC 6243; Section 3.1</text> + </reference> + </enum> + <enum name="report-all-tagged"> + <description> + <text>All default data is reported. +Any nodes considered to be default data +will contain a 'default' XML attribute, +set to 'true' or '1'.</text> + </description> + <reference> + <text>RFC 6243; Section 3.4</text> + </reference> + </enum> + <enum name="trim"> + <description> + <text>Values are not reported if they contain the default.</text> + </description> + <reference> + <text>RFC 6243; Section 3.2</text> + </reference> + </enum> + <enum name="explicit"> + <description> + <text>Report values that contain the definition of +explicitly set data.</text> + </description> + <reference> + <text>RFC 6243; Section 3.3</text> + </reference> + </enum> + </type> + <description> + <text>Possible modes to report default data.</text> + </description> + <reference> + <text>RFC 6243; Section 3.</text> + </reference> + </typedef> + <grouping name="with-defaults-parameters"> + <description> + <text>Contains the &lt;with-defaults&gt; parameter for control +of defaults in NETCONF retrieval operations.</text> + </description> + <leaf name="with-defaults"> + <type name="with-defaults-mode"/> + <description> + <text>The explicit defaults processing mode requested.</text> + </description> + <reference> + <text>RFC 6243; Section 4.5.1</text> + </reference> + </leaf> + </grouping> + <augment target-node="/nc:get-config/nc:input"> + <description> + <text>Adds the &lt;with-defaults&gt; parameter to the +input of the NETCONF &lt;get-config&gt; operation.</text> + </description> + <reference> + <text>RFC 6243; Section 4.5.1</text> + </reference> + <uses name="with-defaults-parameters"/> + </augment> + <augment target-node="/nc:get/nc:input"> + <description> + <text>Adds the &lt;with-defaults&gt; parameter to +the input of the NETCONF &lt;get&gt; operation.</text> + </description> + <reference> + <text>RFC 6243; Section 4.5.1</text> + </reference> + <uses name="with-defaults-parameters"/> + </augment> + <augment target-node="/nc:copy-config/nc:input"> + <description> + <text>Adds the &lt;with-defaults&gt; parameter to +the input of the NETCONF &lt;copy-config&gt; operation.</text> + </description> + <reference> + <text>RFC 6243; Section 4.5.1</text> + </reference> + <uses name="with-defaults-parameters"/> + </augment> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf@2011-06-01.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf@2011-06-01.yang new file mode 100644 index 00000000..1ed9a5a5 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf@2011-06-01.yang @@ -0,0 +1,938 @@ + + module ietf-netconf { + namespace "urn:ietf:params:xml:ns:netconf:base:1.0"; + prefix nc; + + import ietf-inet-types { + prefix inet; + } + + import ietf-netconf-acm { + prefix nacm; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <netconf@ietf.org> + + WG Chair: Bert Wijnen + <bertietf@bwijnen.net> + + WG Chair: Mehmet Ersue + <mehmet.ersue@nsn.com> + + Editor: Martin Bjorklund + <mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <j.schoenwaelder@jacobs-university.de> + + Editor: Andy Bierman + <andy.bierman@brocade.com>"; + description + "NETCONF Protocol Data Types and Protocol Operations. + + Copyright (c) 2011 IETF Trust and the persons identified as + the document authors. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6241; see + the RFC itself for full legal notices."; + + revision 2011-06-01 { + description + "Initial revision; + 2013-09-29: Updated to include NACM attributes, + as specified in RFC 6536: sec 3.2.5 and 3.2.8"; + reference + "RFC 6241: Network Configuration Protocol"; + } + + extension get-filter-element-attributes { + description + "If this extension is present within an 'anyxml' + statement named 'filter', which must be conceptually + defined within the RPC input section for the <get> + and <get-config> protocol operations, then the + following unqualified XML attribute is supported + within the <filter> element, within a <get> or + <get-config> protocol operation: + + type : optional attribute with allowed + value strings 'subtree' and 'xpath'. + If missing, the default value is 'subtree'. + + If the 'xpath' feature is supported, then the + following unqualified XML attribute is + also supported: + + select: optional attribute containing a + string representing an XPath expression. + The 'type' attribute must be equal to 'xpath' + if this attribute is present."; + } + + + feature writable-running { + description + "NETCONF :writable-running capability; + If the server advertises the :writable-running + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6241, Section 8.2"; + } + + feature candidate { + description + "NETCONF :candidate capability; + If the server advertises the :candidate + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6241, Section 8.3"; + } + + feature confirmed-commit { + if-feature "candidate"; + description + "NETCONF :confirmed-commit:1.1 capability; + If the server advertises the :confirmed-commit:1.1 + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6241, Section 8.4"; + } + + feature rollback-on-error { + description + "NETCONF :rollback-on-error capability; + If the server advertises the :rollback-on-error + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6241, Section 8.5"; + } + + feature validate { + description + "NETCONF :validate:1.1 capability; + If the server advertises the :validate:1.1 + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6241, Section 8.6"; + } + + feature startup { + description + "NETCONF :startup capability; + If the server advertises the :startup + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6241, Section 8.7"; + } + + feature url { + description + "NETCONF :url capability; + If the server advertises the :url + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6241, Section 8.8"; + } + + feature xpath { + description + "NETCONF :xpath capability; + If the server advertises the :xpath + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference + "RFC 6241, Section 8.9"; + } + + typedef session-id-type { + type uint32 { + range "1..max"; + } + description + "NETCONF Session Id"; + } + + typedef session-id-or-zero-type { + type uint32; + description + "NETCONF Session Id or Zero to indicate none"; + } + + typedef error-tag-type { + type enumeration { + enum "in-use" { + description + "The request requires a resource that + already is in use."; + } + enum "invalid-value" { + description + "The request specifies an unacceptable value for one + or more parameters."; + } + enum "too-big" { + description + "The request or response (that would be generated) is + too large for the implementation to handle."; + } + enum "missing-attribute" { + description + "An expected attribute is missing."; + } + enum "bad-attribute" { + description + "An attribute value is not correct; e.g., wrong type, + out of range, pattern mismatch."; + } + enum "unknown-attribute" { + description + "An unexpected attribute is present."; + } + enum "missing-element" { + description + "An expected element is missing."; + } + enum "bad-element" { + description + "An element value is not correct; e.g., wrong type, + out of range, pattern mismatch."; + } + enum "unknown-element" { + description + "An unexpected element is present."; + } + enum "unknown-namespace" { + description + "An unexpected namespace is present."; + } + enum "access-denied" { + description + "Access to the requested protocol operation or + data model is denied because authorization failed."; + } + enum "lock-denied" { + description + "Access to the requested lock is denied because the + lock is currently held by another entity."; + } + enum "resource-denied" { + description + "Request could not be completed because of + insufficient resources."; + } + enum "rollback-failed" { + description + "Request to roll back some configuration change (via + rollback-on-error or <discard-changes> operations) + was not completed for some reason."; + } + enum "data-exists" { + description + "Request could not be completed because the relevant + data model content already exists. For example, + a 'create' operation was attempted on data that + already exists."; + } + enum "data-missing" { + description + "Request could not be completed because the relevant + data model content does not exist. For example, + a 'delete' operation was attempted on + data that does not exist."; + } + enum "operation-not-supported" { + description + "Request could not be completed because the requested + operation is not supported by this implementation."; + } + enum "operation-failed" { + description + "Request could not be completed because the requested + operation failed for some reason not covered by + any other error condition."; + } + enum "partial-operation" { + description + "This error-tag is obsolete, and SHOULD NOT be sent + by servers conforming to this document."; + } + enum "malformed-message" { + description + "A message could not be handled because it failed to + be parsed correctly. For example, the message is not + well-formed XML or it uses an invalid character set."; + } + } + description + "NETCONF Error Tag"; + reference + "RFC 6241, Appendix A"; + } + + typedef error-severity-type { + type enumeration { + enum "error" { + description + "Error severity"; + } + enum "warning" { + description + "Warning severity"; + } + } + description + "NETCONF Error Severity"; + reference + "RFC 6241, Section 4.3"; + } + + typedef edit-operation-type { + type enumeration { + enum "merge" { + description + "The configuration data identified by the + element containing this attribute is merged + with the configuration at the corresponding + level in the configuration datastore identified + by the target parameter."; + } + enum "replace" { + description + "The configuration data identified by the element + containing this attribute replaces any related + configuration in the configuration datastore + identified by the target parameter. If no such + configuration data exists in the configuration + datastore, it is created. Unlike a + <copy-config> operation, which replaces the + entire target configuration, only the configuration + actually present in the config parameter is affected."; + } + enum "create" { + description + "The configuration data identified by the element + containing this attribute is added to the + configuration if and only if the configuration + data does not already exist in the configuration + datastore. If the configuration data exists, an + <rpc-error> element is returned with an + <error-tag> value of 'data-exists'."; + } + enum "delete" { + description + "The configuration data identified by the element + containing this attribute is deleted from the + configuration if and only if the configuration + data currently exists in the configuration + datastore. If the configuration data does not + exist, an <rpc-error> element is returned with + an <error-tag> value of 'data-missing'."; + } + enum "remove" { + description + "The configuration data identified by the element + containing this attribute is deleted from the + configuration if the configuration + data currently exists in the configuration + datastore. If the configuration data does not + exist, the 'remove' operation is silently ignored + by the server."; + } + } + default "merge"; + description + "NETCONF 'operation' attribute values"; + reference + "RFC 6241, Section 7.2"; + } + + rpc get-config { + description + "Retrieve all or part of a specified configuration."; + reference + "RFC 6241, Section 7.1"; + input { + container source { + description + "Particular configuration to retrieve."; + choice config-source { + mandatory true; + description + "The configuration to retrieve."; + leaf candidate { + if-feature "candidate"; + type empty; + description + "The candidate configuration is the config source."; + } + + leaf running { + type empty; + description + "The running configuration is the config source."; + } + + leaf startup { + if-feature "startup"; + type empty; + description + "The startup configuration is the config source. + This is optional-to-implement on the server because + not all servers will support filtering for this + datastore."; + } + } + } + + anyxml filter { + nc:get-filter-element-attributes; + description + "Subtree or XPath filter to use."; + } + } + + output { + anyxml data { + description + "Copy of the source datastore subset that matched + the filter criteria (if any). An empty data container + indicates that the request did not produce any results."; + } + } + } + + rpc edit-config { + description + "The <edit-config> operation loads all or part of a specified + configuration to the specified target configuration."; + reference + "RFC 6241, Section 7.2"; + input { + container target { + description + "Particular configuration to edit."; + choice config-target { + mandatory true; + description + "The configuration target."; + leaf candidate { + if-feature "candidate"; + type empty; + description + "The candidate configuration is the config target."; + } + + leaf running { + if-feature "writable-running"; + type empty; + description + "The running configuration is the config source."; + } + } + } + + leaf default-operation { + type enumeration { + enum "merge" { + description + "The default operation is merge."; + } + enum "replace" { + description + "The default operation is replace."; + } + enum "none" { + description + "There is no default operation."; + } + } + default "merge"; + description + "The default operation to use."; + } + + leaf test-option { + if-feature "validate"; + type enumeration { + enum "test-then-set" { + description + "The server will test and then set if no errors."; + } + enum "set" { + description + "The server will set without a test first."; + } + enum "test-only" { + description + "The server will only test and not set, even + if there are no errors."; + } + } + default "test-then-set"; + description + "The test option to use."; + } + + leaf error-option { + type enumeration { + enum "stop-on-error" { + description + "The server will stop on errors."; + } + enum "continue-on-error" { + description + "The server may continue on errors."; + } + enum "rollback-on-error" { + description + "The server will roll back on errors. + This value can only be used if the 'rollback-on-error' + feature is supported."; + } + } + default "stop-on-error"; + description + "The error option to use."; + } + + choice edit-content { + mandatory true; + description + "The content for the edit operation."; + anyxml config { + description + "Inline Config content."; + } + + leaf url { + if-feature "url"; + type inet:uri; + description + "URL-based config content."; + } + } + } + } + + rpc copy-config { + description + "Create or replace an entire configuration datastore with the + contents of another complete configuration datastore."; + reference + "RFC 6241, Section 7.3"; + input { + container target { + description + "Particular configuration to copy to."; + choice config-target { + mandatory true; + description + "The configuration target of the copy operation."; + leaf candidate { + if-feature "candidate"; + type empty; + description + "The candidate configuration is the config target."; + } + + leaf running { + if-feature "writable-running"; + type empty; + description + "The running configuration is the config target. + This is optional-to-implement on the server."; + } + + leaf startup { + if-feature "startup"; + type empty; + description + "The startup configuration is the config target."; + } + + leaf url { + if-feature "url"; + type inet:uri; + description + "The URL-based configuration is the config target."; + } + } + } + + container source { + description + "Particular configuration to copy from."; + choice config-source { + mandatory true; + description + "The configuration source for the copy operation."; + leaf candidate { + if-feature "candidate"; + type empty; + description + "The candidate configuration is the config source."; + } + + leaf running { + type empty; + description + "The running configuration is the config source."; + } + + leaf startup { + if-feature "startup"; + type empty; + description + "The startup configuration is the config source."; + } + + leaf url { + if-feature "url"; + type inet:uri; + description + "The URL-based configuration is the config source."; + } + + anyxml config { + description + "Inline Config content: <config> element. Represents + an entire configuration datastore, not + a subset of the running datastore."; + } + } + } + } + } + + rpc delete-config { + nacm:default-deny-all; + description + "Delete a configuration datastore."; + reference + "RFC 6241, Section 7.4"; + input { + container target { + description + "Particular configuration to delete."; + choice config-target { + mandatory true; + description + "The configuration target to delete."; + leaf startup { + if-feature "startup"; + type empty; + description + "The startup configuration is the config target."; + } + + leaf url { + if-feature "url"; + type inet:uri; + description + "The URL-based configuration is the config target."; + } + } + } + } + } + + rpc lock { + description + "The lock operation allows the client to lock the configuration + system of a device."; + reference + "RFC 6241, Section 7.5"; + input { + container target { + description + "Particular configuration to lock."; + choice config-target { + mandatory true; + description + "The configuration target to lock."; + leaf candidate { + if-feature "candidate"; + type empty; + description + "The candidate configuration is the config target."; + } + + leaf running { + type empty; + description + "The running configuration is the config target."; + } + + leaf startup { + if-feature "startup"; + type empty; + description + "The startup configuration is the config target."; + } + } + } + } + } + + rpc unlock { + description + "The unlock operation is used to release a configuration lock, + previously obtained with the 'lock' operation."; + reference + "RFC 6241, Section 7.6"; + input { + container target { + description + "Particular configuration to unlock."; + choice config-target { + mandatory true; + description + "The configuration target to unlock."; + leaf candidate { + if-feature "candidate"; + type empty; + description + "The candidate configuration is the config target."; + } + + leaf running { + type empty; + description + "The running configuration is the config target."; + } + + leaf startup { + if-feature "startup"; + type empty; + description + "The startup configuration is the config target."; + } + } + } + } + } + + rpc get { + description + "Retrieve running configuration and device state information."; + reference + "RFC 6241, Section 7.7"; + input { + anyxml filter { + nc:get-filter-element-attributes; + description + "This parameter specifies the portion of the system + configuration and state data to retrieve."; + } + } + + output { + anyxml data { + description + "Copy of the running datastore subset and/or state + data that matched the filter criteria (if any). + An empty data container indicates that the request did not + produce any results."; + } + } + } + + rpc close-session { + description + "Request graceful termination of a NETCONF session."; + reference + "RFC 6241, Section 7.8"; + } + + rpc kill-session { + nacm:default-deny-all; + description + "Force the termination of a NETCONF session."; + reference + "RFC 6241, Section 7.9"; + input { + leaf session-id { + type session-id-type; + mandatory true; + description + "Particular session to kill."; + } + } + } + + rpc commit { + if-feature "candidate"; + description + "Commit the candidate configuration as the device's new + current configuration."; + reference + "RFC 6241, Section 8.3.4.1"; + input { + leaf confirmed { + if-feature "confirmed-commit"; + type empty; + description + "Requests a confirmed commit."; + reference + "RFC 6241, Section 8.3.4.1"; + } + + leaf confirm-timeout { + if-feature "confirmed-commit"; + type uint32 { + range "1..max"; + } + units "seconds"; + default "600"; + description + "The timeout interval for a confirmed commit."; + reference + "RFC 6241, Section 8.3.4.1"; + } + + leaf persist { + if-feature "confirmed-commit"; + type string; + description + "This parameter is used to make a confirmed commit + persistent. A persistent confirmed commit is not aborted + if the NETCONF session terminates. The only way to abort + a persistent confirmed commit is to let the timer expire, + or to use the <cancel-commit> operation. + + The value of this parameter is a token that must be given + in the 'persist-id' parameter of <commit> or + <cancel-commit> operations in order to confirm or cancel + the persistent confirmed commit. + + The token should be a random string."; + reference + "RFC 6241, Section 8.3.4.1"; + } + + leaf persist-id { + if-feature "confirmed-commit"; + type string; + description + "This parameter is given in order to commit a persistent + confirmed commit. The value must be equal to the value + given in the 'persist' parameter to the <commit> operation. + If it does not match, the operation fails with an + 'invalid-value' error."; + reference + "RFC 6241, Section 8.3.4.1"; + } + } + } + + rpc discard-changes { + if-feature "candidate"; + description + "Revert the candidate configuration to the current + running configuration."; + reference + "RFC 6241, Section 8.3.4.2"; + } + + rpc cancel-commit { + if-feature "confirmed-commit"; + description + "This operation is used to cancel an ongoing confirmed commit. + If the confirmed commit is persistent, the parameter + 'persist-id' must be given, and it must match the value of the + 'persist' parameter."; + reference + "RFC 6241, Section 8.4.4.1"; + input { + leaf persist-id { + type string; + description + "This parameter is given in order to cancel a persistent + confirmed commit. The value must be equal to the value + given in the 'persist' parameter to the <commit> operation. + If it does not match, the operation fails with an + 'invalid-value' error."; + } + } + } + + rpc validate { + if-feature "validate"; + description + "Validates the contents of the specified configuration."; + reference + "RFC 6241, Section 8.6.4.1"; + input { + container source { + description + "Particular configuration to validate."; + choice config-source { + mandatory true; + description + "The configuration source to validate."; + leaf candidate { + if-feature "candidate"; + type empty; + description + "The candidate configuration is the config source."; + } + + leaf running { + type empty; + description + "The running configuration is the config source."; + } + + leaf startup { + if-feature "startup"; + type empty; + description + "The startup configuration is the config source."; + } + + leaf url { + if-feature "url"; + type inet:uri; + description + "The URL-based configuration is the config source."; + } + + anyxml config { + description + "Inline Config content: <config> element. Represents + an entire configuration datastore, not + a subset of the running datastore."; + } + } + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf@2011-06-01.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf@2011-06-01.yin new file mode 100644 index 00000000..65b800e6 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-netconf@2011-06-01.yin @@ -0,0 +1,1035 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-netconf" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types" + xmlns:nacm="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> + <namespace uri="urn:ietf:params:xml:ns:netconf:base:1.0"/> + <prefix value="nc"/> + <import module="ietf-inet-types"> + <prefix value="inet"/> + </import> + <import module="ietf-netconf-acm"> + <prefix value="nacm"/> + </import> + <organization> + <text>IETF NETCONF (Network Configuration) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;netconf@ietf.org&gt; + +WG Chair: Bert Wijnen + &lt;bertietf@bwijnen.net&gt; + +WG Chair: Mehmet Ersue + &lt;mehmet.ersue@nsn.com&gt; + +Editor: Martin Bjorklund + &lt;mbj@tail-f.com&gt; + +Editor: Juergen Schoenwaelder + &lt;j.schoenwaelder@jacobs-university.de&gt; + +Editor: Andy Bierman + &lt;andy.bierman@brocade.com&gt;</text> + </contact> + <description> + <text>NETCONF Protocol Data Types and Protocol Operations. + +Copyright (c) 2011 IETF Trust and the persons identified as +the document authors. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 6241; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2011-06-01"> + <description> + <text>Initial revision; +2013-09-29: Updated to include NACM attributes, +as specified in RFC 6536: sec 3.2.5 and 3.2.8</text> + </description> + <reference> + <text>RFC 6241: Network Configuration Protocol</text> + </reference> + </revision> + <extension name="get-filter-element-attributes"> + <description> + <text>If this extension is present within an 'anyxml' +statement named 'filter', which must be conceptually +defined within the RPC input section for the &lt;get&gt; +and &lt;get-config&gt; protocol operations, then the +following unqualified XML attribute is supported +within the &lt;filter&gt; element, within a &lt;get&gt; or +&lt;get-config&gt; protocol operation: + + type : optional attribute with allowed + value strings 'subtree' and 'xpath'. + If missing, the default value is 'subtree'. + +If the 'xpath' feature is supported, then the +following unqualified XML attribute is +also supported: + + select: optional attribute containing a + string representing an XPath expression. + The 'type' attribute must be equal to 'xpath' + if this attribute is present.</text> + </description> + </extension> + <feature name="writable-running"> + <description> + <text>NETCONF :writable-running capability; +If the server advertises the :writable-running +capability for a session, then this feature must +also be enabled for that session. Otherwise, +this feature must not be enabled.</text> + </description> + <reference> + <text>RFC 6241, Section 8.2</text> + </reference> + </feature> + <feature name="candidate"> + <description> + <text>NETCONF :candidate capability; +If the server advertises the :candidate +capability for a session, then this feature must +also be enabled for that session. Otherwise, +this feature must not be enabled.</text> + </description> + <reference> + <text>RFC 6241, Section 8.3</text> + </reference> + </feature> + <feature name="confirmed-commit"> + <if-feature name="candidate"/> + <description> + <text>NETCONF :confirmed-commit:1.1 capability; +If the server advertises the :confirmed-commit:1.1 +capability for a session, then this feature must +also be enabled for that session. Otherwise, +this feature must not be enabled.</text> + </description> + <reference> + <text>RFC 6241, Section 8.4</text> + </reference> + </feature> + <feature name="rollback-on-error"> + <description> + <text>NETCONF :rollback-on-error capability; +If the server advertises the :rollback-on-error +capability for a session, then this feature must +also be enabled for that session. Otherwise, +this feature must not be enabled.</text> + </description> + <reference> + <text>RFC 6241, Section 8.5</text> + </reference> + </feature> + <feature name="validate"> + <description> + <text>NETCONF :validate:1.1 capability; +If the server advertises the :validate:1.1 +capability for a session, then this feature must +also be enabled for that session. Otherwise, +this feature must not be enabled.</text> + </description> + <reference> + <text>RFC 6241, Section 8.6</text> + </reference> + </feature> + <feature name="startup"> + <description> + <text>NETCONF :startup capability; +If the server advertises the :startup +capability for a session, then this feature must +also be enabled for that session. Otherwise, +this feature must not be enabled.</text> + </description> + <reference> + <text>RFC 6241, Section 8.7</text> + </reference> + </feature> + <feature name="url"> + <description> + <text>NETCONF :url capability; +If the server advertises the :url +capability for a session, then this feature must +also be enabled for that session. Otherwise, +this feature must not be enabled.</text> + </description> + <reference> + <text>RFC 6241, Section 8.8</text> + </reference> + </feature> + <feature name="xpath"> + <description> + <text>NETCONF :xpath capability; +If the server advertises the :xpath +capability for a session, then this feature must +also be enabled for that session. Otherwise, +this feature must not be enabled.</text> + </description> + <reference> + <text>RFC 6241, Section 8.9</text> + </reference> + </feature> + <typedef name="session-id-type"> + <type name="uint32"> + <range value="1..max"/> + </type> + <description> + <text>NETCONF Session Id</text> + </description> + </typedef> + <typedef name="session-id-or-zero-type"> + <type name="uint32"/> + <description> + <text>NETCONF Session Id or Zero to indicate none</text> + </description> + </typedef> + <typedef name="error-tag-type"> + <type name="enumeration"> + <enum name="in-use"> + <description> + <text>The request requires a resource that +already is in use.</text> + </description> + </enum> + <enum name="invalid-value"> + <description> + <text>The request specifies an unacceptable value for one +or more parameters.</text> + </description> + </enum> + <enum name="too-big"> + <description> + <text>The request or response (that would be generated) is +too large for the implementation to handle.</text> + </description> + </enum> + <enum name="missing-attribute"> + <description> + <text>An expected attribute is missing.</text> + </description> + </enum> + <enum name="bad-attribute"> + <description> + <text>An attribute value is not correct; e.g., wrong type, +out of range, pattern mismatch.</text> + </description> + </enum> + <enum name="unknown-attribute"> + <description> + <text>An unexpected attribute is present.</text> + </description> + </enum> + <enum name="missing-element"> + <description> + <text>An expected element is missing.</text> + </description> + </enum> + <enum name="bad-element"> + <description> + <text>An element value is not correct; e.g., wrong type, +out of range, pattern mismatch.</text> + </description> + </enum> + <enum name="unknown-element"> + <description> + <text>An unexpected element is present.</text> + </description> + </enum> + <enum name="unknown-namespace"> + <description> + <text>An unexpected namespace is present.</text> + </description> + </enum> + <enum name="access-denied"> + <description> + <text>Access to the requested protocol operation or +data model is denied because authorization failed.</text> + </description> + </enum> + <enum name="lock-denied"> + <description> + <text>Access to the requested lock is denied because the +lock is currently held by another entity.</text> + </description> + </enum> + <enum name="resource-denied"> + <description> + <text>Request could not be completed because of +insufficient resources.</text> + </description> + </enum> + <enum name="rollback-failed"> + <description> + <text>Request to roll back some configuration change (via +rollback-on-error or &lt;discard-changes&gt; operations) +was not completed for some reason.</text> + </description> + </enum> + <enum name="data-exists"> + <description> + <text>Request could not be completed because the relevant +data model content already exists. For example, +a 'create' operation was attempted on data that +already exists.</text> + </description> + </enum> + <enum name="data-missing"> + <description> + <text>Request could not be completed because the relevant +data model content does not exist. For example, +a 'delete' operation was attempted on +data that does not exist.</text> + </description> + </enum> + <enum name="operation-not-supported"> + <description> + <text>Request could not be completed because the requested +operation is not supported by this implementation.</text> + </description> + </enum> + <enum name="operation-failed"> + <description> + <text>Request could not be completed because the requested +operation failed for some reason not covered by +any other error condition.</text> + </description> + </enum> + <enum name="partial-operation"> + <description> + <text>This error-tag is obsolete, and SHOULD NOT be sent +by servers conforming to this document.</text> + </description> + </enum> + <enum name="malformed-message"> + <description> + <text>A message could not be handled because it failed to +be parsed correctly. For example, the message is not +well-formed XML or it uses an invalid character set.</text> + </description> + </enum> + </type> + <description> + <text>NETCONF Error Tag</text> + </description> + <reference> + <text>RFC 6241, Appendix A</text> + </reference> + </typedef> + <typedef name="error-severity-type"> + <type name="enumeration"> + <enum name="error"> + <description> + <text>Error severity</text> + </description> + </enum> + <enum name="warning"> + <description> + <text>Warning severity</text> + </description> + </enum> + </type> + <description> + <text>NETCONF Error Severity</text> + </description> + <reference> + <text>RFC 6241, Section 4.3</text> + </reference> + </typedef> + <typedef name="edit-operation-type"> + <type name="enumeration"> + <enum name="merge"> + <description> + <text>The configuration data identified by the +element containing this attribute is merged +with the configuration at the corresponding +level in the configuration datastore identified +by the target parameter.</text> + </description> + </enum> + <enum name="replace"> + <description> + <text>The configuration data identified by the element +containing this attribute replaces any related +configuration in the configuration datastore +identified by the target parameter. If no such +configuration data exists in the configuration +datastore, it is created. Unlike a +&lt;copy-config&gt; operation, which replaces the +entire target configuration, only the configuration +actually present in the config parameter is affected.</text> + </description> + </enum> + <enum name="create"> + <description> + <text>The configuration data identified by the element +containing this attribute is added to the +configuration if and only if the configuration +data does not already exist in the configuration +datastore. If the configuration data exists, an +&lt;rpc-error&gt; element is returned with an +&lt;error-tag&gt; value of 'data-exists'.</text> + </description> + </enum> + <enum name="delete"> + <description> + <text>The configuration data identified by the element +containing this attribute is deleted from the +configuration if and only if the configuration +data currently exists in the configuration +datastore. If the configuration data does not +exist, an &lt;rpc-error&gt; element is returned with +an &lt;error-tag&gt; value of 'data-missing'.</text> + </description> + </enum> + <enum name="remove"> + <description> + <text>The configuration data identified by the element +containing this attribute is deleted from the +configuration if the configuration +data currently exists in the configuration +datastore. If the configuration data does not +exist, the 'remove' operation is silently ignored +by the server.</text> + </description> + </enum> + </type> + <default value="merge"/> + <description> + <text>NETCONF 'operation' attribute values</text> + </description> + <reference> + <text>RFC 6241, Section 7.2</text> + </reference> + </typedef> + <rpc name="get-config"> + <description> + <text>Retrieve all or part of a specified configuration.</text> + </description> + <reference> + <text>RFC 6241, Section 7.1</text> + </reference> + <input> + <container name="source"> + <description> + <text>Particular configuration to retrieve.</text> + </description> + <choice name="config-source"> + <mandatory value="true"/> + <description> + <text>The configuration to retrieve.</text> + </description> + <leaf name="candidate"> + <if-feature name="candidate"/> + <type name="empty"/> + <description> + <text>The candidate configuration is the config source.</text> + </description> + </leaf> + <leaf name="running"> + <type name="empty"/> + <description> + <text>The running configuration is the config source.</text> + </description> + </leaf> + <leaf name="startup"> + <if-feature name="startup"/> + <type name="empty"/> + <description> + <text>The startup configuration is the config source. +This is optional-to-implement on the server because +not all servers will support filtering for this +datastore.</text> + </description> + </leaf> + </choice> + </container> + <anyxml name="filter"> + <nc:get-filter-element-attributes/> + <description> + <text>Subtree or XPath filter to use.</text> + </description> + </anyxml> + </input> + <output> + <anyxml name="data"> + <description> + <text>Copy of the source datastore subset that matched +the filter criteria (if any). An empty data container +indicates that the request did not produce any results.</text> + </description> + </anyxml> + </output> + </rpc> + <rpc name="edit-config"> + <description> + <text>The &lt;edit-config&gt; operation loads all or part of a specified +configuration to the specified target configuration.</text> + </description> + <reference> + <text>RFC 6241, Section 7.2</text> + </reference> + <input> + <container name="target"> + <description> + <text>Particular configuration to edit.</text> + </description> + <choice name="config-target"> + <mandatory value="true"/> + <description> + <text>The configuration target.</text> + </description> + <leaf name="candidate"> + <if-feature name="candidate"/> + <type name="empty"/> + <description> + <text>The candidate configuration is the config target.</text> + </description> + </leaf> + <leaf name="running"> + <if-feature name="writable-running"/> + <type name="empty"/> + <description> + <text>The running configuration is the config source.</text> + </description> + </leaf> + </choice> + </container> + <leaf name="default-operation"> + <type name="enumeration"> + <enum name="merge"> + <description> + <text>The default operation is merge.</text> + </description> + </enum> + <enum name="replace"> + <description> + <text>The default operation is replace.</text> + </description> + </enum> + <enum name="none"> + <description> + <text>There is no default operation.</text> + </description> + </enum> + </type> + <default value="merge"/> + <description> + <text>The default operation to use.</text> + </description> + </leaf> + <leaf name="test-option"> + <if-feature name="validate"/> + <type name="enumeration"> + <enum name="test-then-set"> + <description> + <text>The server will test and then set if no errors.</text> + </description> + </enum> + <enum name="set"> + <description> + <text>The server will set without a test first.</text> + </description> + </enum> + <enum name="test-only"> + <description> + <text>The server will only test and not set, even +if there are no errors.</text> + </description> + </enum> + </type> + <default value="test-then-set"/> + <description> + <text>The test option to use.</text> + </description> + </leaf> + <leaf name="error-option"> + <type name="enumeration"> + <enum name="stop-on-error"> + <description> + <text>The server will stop on errors.</text> + </description> + </enum> + <enum name="continue-on-error"> + <description> + <text>The server may continue on errors.</text> + </description> + </enum> + <enum name="rollback-on-error"> + <description> + <text>The server will roll back on errors. +This value can only be used if the 'rollback-on-error' +feature is supported.</text> + </description> + </enum> + </type> + <default value="stop-on-error"/> + <description> + <text>The error option to use.</text> + </description> + </leaf> + <choice name="edit-content"> + <mandatory value="true"/> + <description> + <text>The content for the edit operation.</text> + </description> + <anyxml name="config"> + <description> + <text>Inline Config content.</text> + </description> + </anyxml> + <leaf name="url"> + <if-feature name="url"/> + <type name="inet:uri"/> + <description> + <text>URL-based config content.</text> + </description> + </leaf> + </choice> + </input> + </rpc> + <rpc name="copy-config"> + <description> + <text>Create or replace an entire configuration datastore with the +contents of another complete configuration datastore.</text> + </description> + <reference> + <text>RFC 6241, Section 7.3</text> + </reference> + <input> + <container name="target"> + <description> + <text>Particular configuration to copy to.</text> + </description> + <choice name="config-target"> + <mandatory value="true"/> + <description> + <text>The configuration target of the copy operation.</text> + </description> + <leaf name="candidate"> + <if-feature name="candidate"/> + <type name="empty"/> + <description> + <text>The candidate configuration is the config target.</text> + </description> + </leaf> + <leaf name="running"> + <if-feature name="writable-running"/> + <type name="empty"/> + <description> + <text>The running configuration is the config target. +This is optional-to-implement on the server.</text> + </description> + </leaf> + <leaf name="startup"> + <if-feature name="startup"/> + <type name="empty"/> + <description> + <text>The startup configuration is the config target.</text> + </description> + </leaf> + <leaf name="url"> + <if-feature name="url"/> + <type name="inet:uri"/> + <description> + <text>The URL-based configuration is the config target.</text> + </description> + </leaf> + </choice> + </container> + <container name="source"> + <description> + <text>Particular configuration to copy from.</text> + </description> + <choice name="config-source"> + <mandatory value="true"/> + <description> + <text>The configuration source for the copy operation.</text> + </description> + <leaf name="candidate"> + <if-feature name="candidate"/> + <type name="empty"/> + <description> + <text>The candidate configuration is the config source.</text> + </description> + </leaf> + <leaf name="running"> + <type name="empty"/> + <description> + <text>The running configuration is the config source.</text> + </description> + </leaf> + <leaf name="startup"> + <if-feature name="startup"/> + <type name="empty"/> + <description> + <text>The startup configuration is the config source.</text> + </description> + </leaf> + <leaf name="url"> + <if-feature name="url"/> + <type name="inet:uri"/> + <description> + <text>The URL-based configuration is the config source.</text> + </description> + </leaf> + <anyxml name="config"> + <description> + <text>Inline Config content: &lt;config&gt; element. Represents +an entire configuration datastore, not +a subset of the running datastore.</text> + </description> + </anyxml> + </choice> + </container> + </input> + </rpc> + <rpc name="delete-config"> + <nacm:default-deny-all/> + <description> + <text>Delete a configuration datastore.</text> + </description> + <reference> + <text>RFC 6241, Section 7.4</text> + </reference> + <input> + <container name="target"> + <description> + <text>Particular configuration to delete.</text> + </description> + <choice name="config-target"> + <mandatory value="true"/> + <description> + <text>The configuration target to delete.</text> + </description> + <leaf name="startup"> + <if-feature name="startup"/> + <type name="empty"/> + <description> + <text>The startup configuration is the config target.</text> + </description> + </leaf> + <leaf name="url"> + <if-feature name="url"/> + <type name="inet:uri"/> + <description> + <text>The URL-based configuration is the config target.</text> + </description> + </leaf> + </choice> + </container> + </input> + </rpc> + <rpc name="lock"> + <description> + <text>The lock operation allows the client to lock the configuration +system of a device.</text> + </description> + <reference> + <text>RFC 6241, Section 7.5</text> + </reference> + <input> + <container name="target"> + <description> + <text>Particular configuration to lock.</text> + </description> + <choice name="config-target"> + <mandatory value="true"/> + <description> + <text>The configuration target to lock.</text> + </description> + <leaf name="candidate"> + <if-feature name="candidate"/> + <type name="empty"/> + <description> + <text>The candidate configuration is the config target.</text> + </description> + </leaf> + <leaf name="running"> + <type name="empty"/> + <description> + <text>The running configuration is the config target.</text> + </description> + </leaf> + <leaf name="startup"> + <if-feature name="startup"/> + <type name="empty"/> + <description> + <text>The startup configuration is the config target.</text> + </description> + </leaf> + </choice> + </container> + </input> + </rpc> + <rpc name="unlock"> + <description> + <text>The unlock operation is used to release a configuration lock, +previously obtained with the 'lock' operation.</text> + </description> + <reference> + <text>RFC 6241, Section 7.6</text> + </reference> + <input> + <container name="target"> + <description> + <text>Particular configuration to unlock.</text> + </description> + <choice name="config-target"> + <mandatory value="true"/> + <description> + <text>The configuration target to unlock.</text> + </description> + <leaf name="candidate"> + <if-feature name="candidate"/> + <type name="empty"/> + <description> + <text>The candidate configuration is the config target.</text> + </description> + </leaf> + <leaf name="running"> + <type name="empty"/> + <description> + <text>The running configuration is the config target.</text> + </description> + </leaf> + <leaf name="startup"> + <if-feature name="startup"/> + <type name="empty"/> + <description> + <text>The startup configuration is the config target.</text> + </description> + </leaf> + </choice> + </container> + </input> + </rpc> + <rpc name="get"> + <description> + <text>Retrieve running configuration and device state information.</text> + </description> + <reference> + <text>RFC 6241, Section 7.7</text> + </reference> + <input> + <anyxml name="filter"> + <nc:get-filter-element-attributes/> + <description> + <text>This parameter specifies the portion of the system +configuration and state data to retrieve.</text> + </description> + </anyxml> + </input> + <output> + <anyxml name="data"> + <description> + <text>Copy of the running datastore subset and/or state +data that matched the filter criteria (if any). +An empty data container indicates that the request did not +produce any results.</text> + </description> + </anyxml> + </output> + </rpc> + <rpc name="close-session"> + <description> + <text>Request graceful termination of a NETCONF session.</text> + </description> + <reference> + <text>RFC 6241, Section 7.8</text> + </reference> + </rpc> + <rpc name="kill-session"> + <nacm:default-deny-all/> + <description> + <text>Force the termination of a NETCONF session.</text> + </description> + <reference> + <text>RFC 6241, Section 7.9</text> + </reference> + <input> + <leaf name="session-id"> + <type name="session-id-type"/> + <mandatory value="true"/> + <description> + <text>Particular session to kill.</text> + </description> + </leaf> + </input> + </rpc> + <rpc name="commit"> + <if-feature name="candidate"/> + <description> + <text>Commit the candidate configuration as the device's new +current configuration.</text> + </description> + <reference> + <text>RFC 6241, Section 8.3.4.1</text> + </reference> + <input> + <leaf name="confirmed"> + <if-feature name="confirmed-commit"/> + <type name="empty"/> + <description> + <text>Requests a confirmed commit.</text> + </description> + <reference> + <text>RFC 6241, Section 8.3.4.1</text> + </reference> + </leaf> + <leaf name="confirm-timeout"> + <if-feature name="confirmed-commit"/> + <type name="uint32"> + <range value="1..max"/> + </type> + <units name="seconds"/> + <default value="600"/> + <description> + <text>The timeout interval for a confirmed commit.</text> + </description> + <reference> + <text>RFC 6241, Section 8.3.4.1</text> + </reference> + </leaf> + <leaf name="persist"> + <if-feature name="confirmed-commit"/> + <type name="string"/> + <description> + <text>This parameter is used to make a confirmed commit +persistent. A persistent confirmed commit is not aborted +if the NETCONF session terminates. The only way to abort +a persistent confirmed commit is to let the timer expire, +or to use the &lt;cancel-commit&gt; operation. + +The value of this parameter is a token that must be given +in the 'persist-id' parameter of &lt;commit&gt; or +&lt;cancel-commit&gt; operations in order to confirm or cancel +the persistent confirmed commit. + +The token should be a random string.</text> + </description> + <reference> + <text>RFC 6241, Section 8.3.4.1</text> + </reference> + </leaf> + <leaf name="persist-id"> + <if-feature name="confirmed-commit"/> + <type name="string"/> + <description> + <text>This parameter is given in order to commit a persistent +confirmed commit. The value must be equal to the value +given in the 'persist' parameter to the &lt;commit&gt; operation. +If it does not match, the operation fails with an +'invalid-value' error.</text> + </description> + <reference> + <text>RFC 6241, Section 8.3.4.1</text> + </reference> + </leaf> + </input> + </rpc> + <rpc name="discard-changes"> + <if-feature name="candidate"/> + <description> + <text>Revert the candidate configuration to the current +running configuration.</text> + </description> + <reference> + <text>RFC 6241, Section 8.3.4.2</text> + </reference> + </rpc> + <rpc name="cancel-commit"> + <if-feature name="confirmed-commit"/> + <description> + <text>This operation is used to cancel an ongoing confirmed commit. +If the confirmed commit is persistent, the parameter +'persist-id' must be given, and it must match the value of the +'persist' parameter.</text> + </description> + <reference> + <text>RFC 6241, Section 8.4.4.1</text> + </reference> + <input> + <leaf name="persist-id"> + <type name="string"/> + <description> + <text>This parameter is given in order to cancel a persistent +confirmed commit. The value must be equal to the value +given in the 'persist' parameter to the &lt;commit&gt; operation. +If it does not match, the operation fails with an +'invalid-value' error.</text> + </description> + </leaf> + </input> + </rpc> + <rpc name="validate"> + <if-feature name="validate"/> + <description> + <text>Validates the contents of the specified configuration.</text> + </description> + <reference> + <text>RFC 6241, Section 8.6.4.1</text> + </reference> + <input> + <container name="source"> + <description> + <text>Particular configuration to validate.</text> + </description> + <choice name="config-source"> + <mandatory value="true"/> + <description> + <text>The configuration source to validate.</text> + </description> + <leaf name="candidate"> + <if-feature name="candidate"/> + <type name="empty"/> + <description> + <text>The candidate configuration is the config source.</text> + </description> + </leaf> + <leaf name="running"> + <type name="empty"/> + <description> + <text>The running configuration is the config source.</text> + </description> + </leaf> + <leaf name="startup"> + <if-feature name="startup"/> + <type name="empty"/> + <description> + <text>The startup configuration is the config source.</text> + </description> + </leaf> + <leaf name="url"> + <if-feature name="url"/> + <type name="inet:uri"/> + <description> + <text>The URL-based configuration is the config source.</text> + </description> + </leaf> + <anyxml name="config"> + <description> + <text>Inline Config content: &lt;config&gt; element. Represents +an entire configuration datastore, not +a subset of the running datastore.</text> + </description> + </anyxml> + </choice> + </container> + </input> + </rpc> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ssh-server@2016-11-02.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ssh-server@2016-11-02.yang new file mode 100644 index 00000000..e7393114 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ssh-server@2016-11-02.yang @@ -0,0 +1,171 @@ + + module ietf-ssh-server { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ssh-server"; + prefix sshs; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-keystore { + prefix ks; + reference + "RFC YYYY: Keystore Model"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Mahesh Jethanandani + <mailto:mjethanandani@gmail.com> + + Editor: Kent Watsen + <mailto:kwatsen@juniper.net>"; + description + "This module defines a reusable grouping for a SSH server that + can be used as a basis for specific SSH server instances. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + revision 2016-11-02 { + description + "Initial version"; + reference + "RFC XXXX: SSH Client and Server Models"; + } + + feature ssh-x509-certs { + description + "The ssh-x509-certs feature indicates that the NETCONF + server supports RFC 6187"; + reference + "RFC 6187: X.509v3 Certificates for Secure Shell + Authentication"; + } + + grouping non-listening-ssh-server-grouping { + description + "A reusable grouping for a SSH server that can be used as a + basis for specific SSH server instances."; + container host-keys { + description + "The list of host-keys the SSH server will present when + establishing a SSH connection."; + list host-key { + key "name"; + min-elements 1; + ordered-by user; + description + "An ordered list of host keys the SSH server will use to + construct its ordered list of algorithms, when sending + its SSH_MSG_KEXINIT message, as defined in Section 7.1 + of RFC 4253."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; + leaf name { + type string; + description + "An arbitrary name for this host-key"; + } + + choice host-key-type { + mandatory true; + description + "The type of host key being specified"; + leaf public-key { + type leafref { + path "/ks:keystore/ks:private-keys/ks:private-key/ks:name"; + } + description + "The public key is actually identified by the name of + its cooresponding private-key in the keystore."; + } + + leaf certificate { + if-feature "ssh-x509-certs"; + type leafref { + path "/ks:keystore/ks:private-keys/ks:private-key/ks:certificate-chains/ks:certificate-chain/ks:name"; + } + description + "The name of a certificate in the keystore."; + } + } + } + } + + container client-cert-auth { + if-feature "ssh-x509-certs"; + description + "A reference to a list of trusted certificate authority (CA) + certificates and a reference to a list of trusted client + certificates."; + leaf trusted-ca-certs { + type leafref { + path "/ks:keystore/ks:trusted-certificates/ks:name"; + } + description + "A reference to a list of certificate authority (CA) + certificates used by the SSH server to authenticate + SSH client certificates."; + } + + leaf trusted-client-certs { + type leafref { + path "/ks:keystore/ks:trusted-certificates/ks:name"; + } + description + "A reference to a list of client certificates used by + the SSH server to authenticate SSH client certificates. + A clients certificate is authenticated if it is an + exact match to a configured trusted client certificate."; + } + } + } + + grouping listening-ssh-server-grouping { + description + "A reusable grouping for a SSH server that can be used as a + basis for specific SSH server instances."; + leaf address { + type inet:ip-address; + description + "The IP address of the interface to listen on. The SSH + server will listen on all interfaces if no value is + specified. Please note that some addresses have special + meanings (e.g., '0.0.0.0' and '::')."; + } + + leaf port { + type inet:port-number; + description + "The local port number on this interface the SSH server + listens on. When this grouping is used, it is RECOMMENED + that refine statement is used to either set a default port + value or to set mandatory true."; + } + + uses non-listening-ssh-server-grouping; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ssh-server@2016-11-02.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ssh-server@2016-11-02.yin new file mode 100644 index 00000000..e57fcd32 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-ssh-server@2016-11-02.yin @@ -0,0 +1,186 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-ssh-server" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:sshs="urn:ietf:params:xml:ns:yang:ietf-ssh-server" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types" + xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore"> + <yang-version value="1.1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-ssh-server"/> + <prefix value="sshs"/> + <import module="ietf-inet-types"> + <prefix value="inet"/> + <reference> + <text>RFC 6991: Common YANG Data Types</text> + </reference> + </import> + <import module="ietf-keystore"> + <prefix value="ks"/> + <reference> + <text>RFC YYYY: Keystore Model</text> + </reference> + </import> + <organization> + <text>IETF NETCONF (Network Configuration) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;mailto:netconf@ietf.org&gt; + +WG Chair: Mehmet Ersue + &lt;mailto:mehmet.ersue@nsn.com&gt; + +WG Chair: Mahesh Jethanandani + &lt;mailto:mjethanandani@gmail.com&gt; + +Editor: Kent Watsen + &lt;mailto:kwatsen@juniper.net&gt;</text> + </contact> + <description> + <text>This module defines a reusable grouping for a SSH server that +can be used as a basis for specific SSH server instances. + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD +License set forth in Section 4.c of the IETF Trust's +Legal Provisions Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC XXXX; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2016-11-02"> + <description> + <text>Initial version</text> + </description> + <reference> + <text>RFC XXXX: SSH Client and Server Models</text> + </reference> + </revision> + <feature name="ssh-x509-certs"> + <description> + <text>The ssh-x509-certs feature indicates that the NETCONF +server supports RFC 6187</text> + </description> + <reference> + <text>RFC 6187: X.509v3 Certificates for Secure Shell +Authentication</text> + </reference> + </feature> + <grouping name="non-listening-ssh-server-grouping"> + <description> + <text>A reusable grouping for a SSH server that can be used as a +basis for specific SSH server instances.</text> + </description> + <container name="host-keys"> + <description> + <text>The list of host-keys the SSH server will present when +establishing a SSH connection.</text> + </description> + <list name="host-key"> + <key value="name"/> + <min-elements value="1"/> + <ordered-by value="user"/> + <description> + <text>An ordered list of host keys the SSH server will use to +construct its ordered list of algorithms, when sending +its SSH_MSG_KEXINIT message, as defined in Section 7.1 +of RFC 4253.</text> + </description> + <reference> + <text>RFC 4253: The Secure Shell (SSH) Transport Layer Protocol</text> + </reference> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for this host-key</text> + </description> + </leaf> + <choice name="host-key-type"> + <mandatory value="true"/> + <description> + <text>The type of host key being specified</text> + </description> + <leaf name="public-key"> + <type name="leafref"> + <path value="/ks:keystore/ks:private-keys/ks:private-key/ks:name"/> + </type> + <description> + <text>The public key is actually identified by the name of +its cooresponding private-key in the keystore.</text> + </description> + </leaf> + <leaf name="certificate"> + <if-feature name="ssh-x509-certs"/> + <type name="leafref"> + <path value="/ks:keystore/ks:private-keys/ks:private-key/ks:certificate-chains/ks:certificate-chain/ks:name"/> + </type> + <description> + <text>The name of a certificate in the keystore.</text> + </description> + </leaf> + </choice> + </list> + </container> + <container name="client-cert-auth"> + <if-feature name="ssh-x509-certs"/> + <description> + <text>A reference to a list of trusted certificate authority (CA) +certificates and a reference to a list of trusted client +certificates.</text> + </description> + <leaf name="trusted-ca-certs"> + <type name="leafref"> + <path value="/ks:keystore/ks:trusted-certificates/ks:name"/> + </type> + <description> + <text>A reference to a list of certificate authority (CA) +certificates used by the SSH server to authenticate +SSH client certificates.</text> + </description> + </leaf> + <leaf name="trusted-client-certs"> + <type name="leafref"> + <path value="/ks:keystore/ks:trusted-certificates/ks:name"/> + </type> + <description> + <text>A reference to a list of client certificates used by +the SSH server to authenticate SSH client certificates. +A clients certificate is authenticated if it is an +exact match to a configured trusted client certificate.</text> + </description> + </leaf> + </container> + </grouping> + <grouping name="listening-ssh-server-grouping"> + <description> + <text>A reusable grouping for a SSH server that can be used as a +basis for specific SSH server instances.</text> + </description> + <leaf name="address"> + <type name="inet:ip-address"/> + <description> + <text>The IP address of the interface to listen on. The SSH +server will listen on all interfaces if no value is +specified. Please note that some addresses have special +meanings (e.g., '0.0.0.0' and '::').</text> + </description> + </leaf> + <leaf name="port"> + <type name="inet:port-number"/> + <description> + <text>The local port number on this interface the SSH server +listens on. When this grouping is used, it is RECOMMENED +that refine statement is used to either set a default port +value or to set mandatory true.</text> + </description> + </leaf> + <uses name="non-listening-ssh-server-grouping"/> + </grouping> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-system@2014-08-06.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-system@2014-08-06.yang new file mode 100644 index 00000000..3b1ff6da --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-system@2014-08-06.yang @@ -0,0 +1,779 @@ + + module ietf-system { + namespace "urn:ietf:params:xml:ns:yang:ietf-system"; + prefix sys; + + import ietf-yang-types { + prefix yang; + } + + import ietf-inet-types { + prefix inet; + } + + import ietf-netconf-acm { + prefix nacm; + } + + import iana-crypt-hash { + prefix ianach; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Andy Bierman + <mailto:andy@yumaworks.com> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + description + "This module contains a collection of YANG definitions for the + configuration and identification of some common system + properties within a device containing a NETCONF server. This + includes data node definitions for system identification, + time-of-day management, user management, DNS resolver + configuration, and some protocol operations for system + management. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7317; see + the RFC itself for full legal notices."; + + revision 2014-08-06 { + description + "Initial revision."; + reference + "RFC 7317: A YANG Data Model for System Management"; + } + + feature radius { + description + "Indicates that the device can be configured as a RADIUS + client."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + feature authentication { + description + "Indicates that the device supports configuration of + user authentication."; + } + + feature local-users { + if-feature "authentication"; + description + "Indicates that the device supports configuration of + local user authentication."; + } + + feature radius-authentication { + if-feature "radius"; + if-feature "authentication"; + description + "Indicates that the device supports configuration of user + authentication over RADIUS."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS) + RFC 5607: Remote Authentication Dial-In User Service (RADIUS) + Authorization for Network Access Server (NAS) + Management"; + } + + feature ntp { + description + "Indicates that the device can be configured to use one or + more NTP servers to set the system date and time."; + } + + feature ntp-udp-port { + if-feature "ntp"; + description + "Indicates that the device supports the configuration of + the UDP port for NTP servers. + + This is a 'feature', since many implementations do not support + any port other than the default port."; + } + + feature timezone-name { + description + "Indicates that the local time zone on the device + can be configured to use the TZ database + to set the time zone and manage daylight saving time."; + reference + "RFC 6557: Procedures for Maintaining the Time Zone Database"; + } + + feature dns-udp-tcp-port { + description + "Indicates that the device supports the configuration of + the UDP and TCP port for DNS servers. + + This is a 'feature', since many implementations do not support + any port other than the default port."; + } + + identity authentication-method { + description + "Base identity for user authentication methods."; + } + + identity radius { + base authentication-method; + description + "Indicates user authentication using RADIUS."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS) + RFC 5607: Remote Authentication Dial-In User Service (RADIUS) + Authorization for Network Access Server (NAS) + Management"; + } + + identity local-users { + base authentication-method; + description + "Indicates password-based authentication of locally + configured users."; + } + + identity radius-authentication-type { + description + "Base identity for RADIUS authentication types."; + } + + identity radius-pap { + base radius-authentication-type; + description + "The device requests Password Authentication Protocol (PAP) + authentication from the RADIUS server."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + identity radius-chap { + base radius-authentication-type; + description + "The device requests Challenge Handshake Authentication + Protocol (CHAP) authentication from the RADIUS server."; + reference + "RFC 2865: Remote Authentication Dial In User Service (RADIUS)"; + } + + typedef timezone-name { + type string; + description + "A time zone name as used by the Time Zone Database, + sometimes referred to as the 'Olson Database'. + + The exact set of valid values is an implementation-specific + matter. Client discovery of the exact set of time zone names + for a particular server is out of scope."; + reference + "RFC 6557: Procedures for Maintaining the Time Zone Database"; + } + + container system { + description + "System group configuration."; + leaf contact { + type string; + description + "The administrator contact information for the system. + + A server implementation MAY map this leaf to the sysContact + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and sysContact. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.sysContact"; + } + + leaf hostname { + type inet:domain-name; + description + "The name of the host. This name can be a single domain + label or the fully qualified domain name of the host."; + } + + leaf location { + type string; + description + "The system location. + + A server implementation MAY map this leaf to the sysLocation + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and sysLocation. The definition + of such a mechanism is outside the scope of this document."; + reference + "RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.sysLocation"; + } + + container clock { + description + "Configuration of the system date and time properties."; + choice timezone { + description + "The system time zone information."; + case timezone-name { + if-feature "timezone-name"; + leaf timezone-name { + type timezone-name; + description + "The TZ database name to use for the system, such + as 'Europe/Stockholm'."; + } + } + + case timezone-utc-offset { + leaf timezone-utc-offset { + type int16 { + range "-1500 .. 1500"; + } + units "minutes"; + description + "The number of minutes to add to UTC time to + identify the time zone for this system. For example, + 'UTC - 8:00 hours' would be represented as '-480'. + Note that automatic daylight saving time adjustment + is not provided if this object is used."; + } + } + } + } + + container ntp { + if-feature "ntp"; + presence "Enables the NTP client unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Configuration of the NTP client."; + leaf enabled { + type boolean; + default "true"; + description + "Indicates that the system should attempt to + synchronize the system clock with an NTP server + from the 'ntp/server' list."; + } + + list server { + key "name"; + description + "List of NTP servers to use for system clock + synchronization. If '/system/ntp/enabled' + is 'true', then the system will attempt to + contact and utilize the specified NTP servers."; + leaf name { + type string; + description + "An arbitrary name for the NTP server."; + } + + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + case udp { + container udp { + description + "Contains UDP-specific configuration parameters + for NTP."; + leaf address { + type inet:host; + mandatory true; + description + "The address of the NTP server."; + } + + leaf port { + if-feature "ntp-udp-port"; + type inet:port-number; + default "123"; + description + "The port number of the NTP server."; + } + } + } + } + + leaf association-type { + type enumeration { + enum "server" { + description + "Use client association mode. This device + will not provide synchronization to the + configured NTP server."; + } + enum "peer" { + description + "Use symmetric active association mode. + This device may provide synchronization + to the configured NTP server."; + } + enum "pool" { + description + "Use client association mode with one or + more of the NTP servers found by DNS + resolution of the domain name given by + the 'address' leaf. This device will not + provide synchronization to the servers."; + } + } + default "server"; + description + "The desired association type for this NTP server."; + } + + leaf iburst { + type boolean; + default "false"; + description + "Indicates whether this server should enable burst + synchronization or not."; + } + + leaf prefer { + type boolean; + default "false"; + description + "Indicates whether this server should be preferred + or not."; + } + } + } + + container dns-resolver { + description + "Configuration of the DNS resolver."; + leaf-list search { + type inet:domain-name; + ordered-by user; + description + "An ordered list of domains to search when resolving + a host name."; + } + + list server { + key "name"; + ordered-by user; + description + "List of the DNS servers that the resolver should query. + + When the resolver is invoked by a calling application, it + sends the query to the first name server in this list. If + no response has been received within 'timeout' seconds, + the resolver continues with the next server in the list. + If no response is received from any server, the resolver + continues with the first server again. When the resolver + has traversed the list 'attempts' times without receiving + any response, it gives up and returns an error to the + calling application. + + Implementations MAY limit the number of entries in this + list."; + leaf name { + type string; + description + "An arbitrary name for the DNS server."; + } + + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + case udp-and-tcp { + container udp-and-tcp { + description + "Contains UDP- and TCP-specific configuration + parameters for DNS."; + reference + "RFC 1035: Domain Names - Implementation and + Specification + RFC 5966: DNS Transport over TCP - Implementation + Requirements"; + leaf address { + type inet:ip-address; + mandatory true; + description + "The address of the DNS server."; + } + + leaf port { + if-feature "dns-udp-tcp-port"; + type inet:port-number; + default "53"; + description + "The UDP and TCP port number of the DNS server."; + } + } + } + } + } + + container options { + description + "Resolver options. The set of available options has been + limited to those that are generally available across + different resolver implementations and generally useful."; + leaf timeout { + type uint8 { + range "1..max"; + } + units "seconds"; + default "5"; + description + "The amount of time the resolver will wait for a + response from each remote name server before + retrying the query via a different name server."; + } + + leaf attempts { + type uint8 { + range "1..max"; + } + default "2"; + description + "The number of times the resolver will send a query to + all of its name servers before giving up and returning + an error to the calling application."; + } + } + } + + container radius { + if-feature "radius"; + description + "Configuration of the RADIUS client."; + list server { + key "name"; + ordered-by user; + description + "List of RADIUS servers used by the device. + + When the RADIUS client is invoked by a calling + application, it sends the query to the first server in + this list. If no response has been received within + 'timeout' seconds, the client continues with the next + server in the list. If no response is received from any + server, the client continues with the first server again. + When the client has traversed the list 'attempts' times + without receiving any response, it gives up and returns an + error to the calling application."; + leaf name { + type string; + description + "An arbitrary name for the RADIUS server."; + } + + choice transport { + mandatory true; + description + "The transport-protocol-specific parameters for this + server."; + case udp { + container udp { + description + "Contains UDP-specific configuration parameters + for RADIUS."; + leaf address { + type inet:host; + mandatory true; + description + "The address of the RADIUS server."; + } + + leaf authentication-port { + type inet:port-number; + default "1812"; + description + "The port number of the RADIUS server."; + } + + leaf shared-secret { + nacm:default-deny-all; + type string; + mandatory true; + description + "The shared secret, which is known to both the + RADIUS client and server."; + reference + "RFC 2865: Remote Authentication Dial In User + Service (RADIUS)"; + } + } + } + } + + leaf authentication-type { + type identityref { + base radius-authentication-type; + } + default "radius-pap"; + description + "The authentication type requested from the RADIUS + server."; + } + } + + container options { + description + "RADIUS client options."; + leaf timeout { + type uint8 { + range "1..max"; + } + units "seconds"; + default "5"; + description + "The number of seconds the device will wait for a + response from each RADIUS server before trying with a + different server."; + } + + leaf attempts { + type uint8 { + range "1..max"; + } + default "2"; + description + "The number of times the device will send a query to + all of its RADIUS servers before giving up."; + } + } + } + + container authentication { + nacm:default-deny-write; + if-feature "authentication"; + description + "The authentication configuration subtree."; + leaf-list user-authentication-order { + type identityref { + base authentication-method; + } + must "(. != \"sys:radius\" or ../../radius/server)" { + error-message + "When 'radius' is used, a RADIUS server must be configured."; + description + "When 'radius' is used as an authentication method, + a RADIUS server must be configured."; + } + ordered-by user; + description + "When the device authenticates a user with a password, + it tries the authentication methods in this leaf-list in + order. If authentication with one method fails, the next + method is used. If no method succeeds, the user is + denied access. + + An empty user-authentication-order leaf-list still allows + authentication of users using mechanisms that do not + involve a password. + + If the 'radius-authentication' feature is advertised by + the NETCONF server, the 'radius' identity can be added to + this list. + + If the 'local-users' feature is advertised by the + NETCONF server, the 'local-users' identity can be + added to this list."; + } + + list user { + if-feature "local-users"; + key "name"; + description + "The list of local users configured on this device."; + leaf name { + type string; + description + "The user name string identifying this entry."; + } + + leaf password { + type ianach:crypt-hash; + description + "The password for this entry."; + } + + list authorized-key { + key "name"; + description + "A list of public SSH keys for this user. These keys + are allowed for SSH authentication, as described in + RFC 4253."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + leaf name { + type string; + description + "An arbitrary name for the SSH key."; + } + + leaf algorithm { + type string; + mandatory true; + description + "The public key algorithm name for this SSH key. + + Valid values are the values in the IANA 'Secure Shell + (SSH) Protocol Parameters' registry, Public Key + Algorithm Names."; + reference + "IANA 'Secure Shell (SSH) Protocol Parameters' + registry, Public Key Algorithm Names"; + } + + leaf key-data { + type binary; + mandatory true; + description + "The binary public key data for this SSH key, as + specified by RFC 4253, Section 6.6, i.e.: + + string certificate or public key format + identifier + byte[n] key/certificate data."; + reference + "RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol"; + } + } + } + } + } + + container system-state { + config false; + description + "System group operational state."; + container platform { + description + "Contains vendor-specific information for + identifying the system platform and operating system."; + reference + "IEEE Std 1003.1-2008 - sys/utsname.h"; + leaf os-name { + type string; + description + "The name of the operating system in use - + for example, 'Linux'."; + reference + "IEEE Std 1003.1-2008 - utsname.sysname"; + } + + leaf os-release { + type string; + description + "The current release level of the operating + system in use. This string MAY indicate + the OS source code revision."; + reference + "IEEE Std 1003.1-2008 - utsname.release"; + } + + leaf os-version { + type string; + description + "The current version level of the operating + system in use. This string MAY indicate + the specific OS build date and target variant + information."; + reference + "IEEE Std 1003.1-2008 - utsname.version"; + } + + leaf machine { + type string; + description + "A vendor-specific identifier string representing + the hardware in use."; + reference + "IEEE Std 1003.1-2008 - utsname.machine"; + } + } + + container clock { + description + "Monitoring of the system date and time properties."; + leaf current-datetime { + type yang:date-and-time; + description + "The current system date and time."; + } + + leaf boot-datetime { + type yang:date-and-time; + description + "The system date and time when the system last restarted."; + } + } + } + + rpc set-current-datetime { + nacm:default-deny-all; + description + "Set the /system-state/clock/current-datetime leaf + to the specified value. + + If the system is using NTP (i.e., /system/ntp/enabled + is set to 'true'), then this operation will fail with + error-tag 'operation-failed' and error-app-tag value of + 'ntp-active'."; + input { + leaf current-datetime { + type yang:date-and-time; + mandatory true; + description + "The current system date and time."; + } + } + } + + rpc system-restart { + nacm:default-deny-all; + description + "Request that the entire system be restarted immediately. + A server SHOULD send an rpc reply to the client before + restarting the system."; + } + + rpc system-shutdown { + nacm:default-deny-all; + description + "Request that the entire system be shut down immediately. + A server SHOULD send an rpc reply to the client before + shutting down the system."; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-system@2014-08-06.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-system@2014-08-06.yin new file mode 100644 index 00000000..45ef3e51 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-system@2014-08-06.yin @@ -0,0 +1,833 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-system" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types" + xmlns:nacm="urn:ietf:params:xml:ns:yang:ietf-netconf-acm" + xmlns:ianach="urn:ietf:params:xml:ns:yang:iana-crypt-hash"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-system"/> + <prefix value="sys"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + </import> + <import module="ietf-inet-types"> + <prefix value="inet"/> + </import> + <import module="ietf-netconf-acm"> + <prefix value="nacm"/> + </import> + <import module="iana-crypt-hash"> + <prefix value="ianach"/> + </import> + <organization> + <text>IETF NETMOD (NETCONF Data Modeling Language) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netmod/&gt; +WG List: &lt;mailto:netmod@ietf.org&gt; + +WG Chair: Thomas Nadeau + &lt;mailto:tnadeau@lucidvision.com&gt; + +WG Chair: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt; + +Editor: Andy Bierman + &lt;mailto:andy@yumaworks.com&gt; + +Editor: Martin Bjorklund + &lt;mailto:mbj@tail-f.com&gt;</text> + </contact> + <description> + <text>This module contains a collection of YANG definitions for the +configuration and identification of some common system +properties within a device containing a NETCONF server. This +includes data node definitions for system identification, +time-of-day management, user management, DNS resolver +configuration, and some protocol operations for system +management. + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 7317; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2014-08-06"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 7317: A YANG Data Model for System Management</text> + </reference> + </revision> + <feature name="radius"> + <description> + <text>Indicates that the device can be configured as a RADIUS +client.</text> + </description> + <reference> + <text>RFC 2865: Remote Authentication Dial In User Service (RADIUS)</text> + </reference> + </feature> + <feature name="authentication"> + <description> + <text>Indicates that the device supports configuration of +user authentication.</text> + </description> + </feature> + <feature name="local-users"> + <if-feature name="authentication"/> + <description> + <text>Indicates that the device supports configuration of +local user authentication.</text> + </description> + </feature> + <feature name="radius-authentication"> + <if-feature name="radius"/> + <if-feature name="authentication"/> + <description> + <text>Indicates that the device supports configuration of user +authentication over RADIUS.</text> + </description> + <reference> + <text>RFC 2865: Remote Authentication Dial In User Service (RADIUS) +RFC 5607: Remote Authentication Dial-In User Service (RADIUS) + Authorization for Network Access Server (NAS) + Management</text> + </reference> + </feature> + <feature name="ntp"> + <description> + <text>Indicates that the device can be configured to use one or +more NTP servers to set the system date and time.</text> + </description> + </feature> + <feature name="ntp-udp-port"> + <if-feature name="ntp"/> + <description> + <text>Indicates that the device supports the configuration of +the UDP port for NTP servers. + +This is a 'feature', since many implementations do not support +any port other than the default port.</text> + </description> + </feature> + <feature name="timezone-name"> + <description> + <text>Indicates that the local time zone on the device +can be configured to use the TZ database +to set the time zone and manage daylight saving time.</text> + </description> + <reference> + <text>RFC 6557: Procedures for Maintaining the Time Zone Database</text> + </reference> + </feature> + <feature name="dns-udp-tcp-port"> + <description> + <text>Indicates that the device supports the configuration of +the UDP and TCP port for DNS servers. + +This is a 'feature', since many implementations do not support +any port other than the default port.</text> + </description> + </feature> + <identity name="authentication-method"> + <description> + <text>Base identity for user authentication methods.</text> + </description> + </identity> + <identity name="radius"> + <base name="authentication-method"/> + <description> + <text>Indicates user authentication using RADIUS.</text> + </description> + <reference> + <text>RFC 2865: Remote Authentication Dial In User Service (RADIUS) +RFC 5607: Remote Authentication Dial-In User Service (RADIUS) + Authorization for Network Access Server (NAS) + Management</text> + </reference> + </identity> + <identity name="local-users"> + <base name="authentication-method"/> + <description> + <text>Indicates password-based authentication of locally +configured users.</text> + </description> + </identity> + <identity name="radius-authentication-type"> + <description> + <text>Base identity for RADIUS authentication types.</text> + </description> + </identity> + <identity name="radius-pap"> + <base name="radius-authentication-type"/> + <description> + <text>The device requests Password Authentication Protocol (PAP) +authentication from the RADIUS server.</text> + </description> + <reference> + <text>RFC 2865: Remote Authentication Dial In User Service (RADIUS)</text> + </reference> + </identity> + <identity name="radius-chap"> + <base name="radius-authentication-type"/> + <description> + <text>The device requests Challenge Handshake Authentication +Protocol (CHAP) authentication from the RADIUS server.</text> + </description> + <reference> + <text>RFC 2865: Remote Authentication Dial In User Service (RADIUS)</text> + </reference> + </identity> + <typedef name="timezone-name"> + <type name="string"/> + <description> + <text>A time zone name as used by the Time Zone Database, +sometimes referred to as the 'Olson Database'. + +The exact set of valid values is an implementation-specific +matter. Client discovery of the exact set of time zone names +for a particular server is out of scope.</text> + </description> + <reference> + <text>RFC 6557: Procedures for Maintaining the Time Zone Database</text> + </reference> + </typedef> + <container name="system"> + <description> + <text>System group configuration.</text> + </description> + <leaf name="contact"> + <type name="string"/> + <description> + <text>The administrator contact information for the system. + +A server implementation MAY map this leaf to the sysContact +MIB object. Such an implementation needs to use some +mechanism to handle the differences in size and characters +allowed between this leaf and sysContact. The definition of +such a mechanism is outside the scope of this document.</text> + </description> + <reference> + <text>RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.sysContact</text> + </reference> + </leaf> + <leaf name="hostname"> + <type name="inet:domain-name"/> + <description> + <text>The name of the host. This name can be a single domain +label or the fully qualified domain name of the host.</text> + </description> + </leaf> + <leaf name="location"> + <type name="string"/> + <description> + <text>The system location. + +A server implementation MAY map this leaf to the sysLocation +MIB object. Such an implementation needs to use some +mechanism to handle the differences in size and characters +allowed between this leaf and sysLocation. The definition +of such a mechanism is outside the scope of this document.</text> + </description> + <reference> + <text>RFC 3418: Management Information Base (MIB) for the + Simple Network Management Protocol (SNMP) + SNMPv2-MIB.sysLocation</text> + </reference> + </leaf> + <container name="clock"> + <description> + <text>Configuration of the system date and time properties.</text> + </description> + <choice name="timezone"> + <description> + <text>The system time zone information.</text> + </description> + <case name="timezone-name"> + <if-feature name="timezone-name"/> + <leaf name="timezone-name"> + <type name="timezone-name"/> + <description> + <text>The TZ database name to use for the system, such +as 'Europe/Stockholm'.</text> + </description> + </leaf> + </case> + <case name="timezone-utc-offset"> + <leaf name="timezone-utc-offset"> + <type name="int16"> + <range value="-1500 .. 1500"/> + </type> + <units name="minutes"/> + <description> + <text>The number of minutes to add to UTC time to +identify the time zone for this system. For example, +'UTC - 8:00 hours' would be represented as '-480'. +Note that automatic daylight saving time adjustment +is not provided if this object is used.</text> + </description> + </leaf> + </case> + </choice> + </container> + <container name="ntp"> + <if-feature name="ntp"/> + <presence value="Enables the NTP client unless the 'enabled' leaf +(which defaults to 'true') is set to 'false'"/> + <description> + <text>Configuration of the NTP client.</text> + </description> + <leaf name="enabled"> + <type name="boolean"/> + <default value="true"/> + <description> + <text>Indicates that the system should attempt to +synchronize the system clock with an NTP server +from the 'ntp/server' list.</text> + </description> + </leaf> + <list name="server"> + <key value="name"/> + <description> + <text>List of NTP servers to use for system clock +synchronization. If '/system/ntp/enabled' +is 'true', then the system will attempt to +contact and utilize the specified NTP servers.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for the NTP server.</text> + </description> + </leaf> + <choice name="transport"> + <mandatory value="true"/> + <description> + <text>The transport-protocol-specific parameters for this +server.</text> + </description> + <case name="udp"> + <container name="udp"> + <description> + <text>Contains UDP-specific configuration parameters +for NTP.</text> + </description> + <leaf name="address"> + <type name="inet:host"/> + <mandatory value="true"/> + <description> + <text>The address of the NTP server.</text> + </description> + </leaf> + <leaf name="port"> + <if-feature name="ntp-udp-port"/> + <type name="inet:port-number"/> + <default value="123"/> + <description> + <text>The port number of the NTP server.</text> + </description> + </leaf> + </container> + </case> + </choice> + <leaf name="association-type"> + <type name="enumeration"> + <enum name="server"> + <description> + <text>Use client association mode. This device +will not provide synchronization to the +configured NTP server.</text> + </description> + </enum> + <enum name="peer"> + <description> + <text>Use symmetric active association mode. +This device may provide synchronization +to the configured NTP server.</text> + </description> + </enum> + <enum name="pool"> + <description> + <text>Use client association mode with one or +more of the NTP servers found by DNS +resolution of the domain name given by +the 'address' leaf. This device will not +provide synchronization to the servers.</text> + </description> + </enum> + </type> + <default value="server"/> + <description> + <text>The desired association type for this NTP server.</text> + </description> + </leaf> + <leaf name="iburst"> + <type name="boolean"/> + <default value="false"/> + <description> + <text>Indicates whether this server should enable burst +synchronization or not.</text> + </description> + </leaf> + <leaf name="prefer"> + <type name="boolean"/> + <default value="false"/> + <description> + <text>Indicates whether this server should be preferred +or not.</text> + </description> + </leaf> + </list> + </container> + <container name="dns-resolver"> + <description> + <text>Configuration of the DNS resolver.</text> + </description> + <leaf-list name="search"> + <type name="inet:domain-name"/> + <ordered-by value="user"/> + <description> + <text>An ordered list of domains to search when resolving +a host name.</text> + </description> + </leaf-list> + <list name="server"> + <key value="name"/> + <ordered-by value="user"/> + <description> + <text>List of the DNS servers that the resolver should query. + +When the resolver is invoked by a calling application, it +sends the query to the first name server in this list. If +no response has been received within 'timeout' seconds, +the resolver continues with the next server in the list. +If no response is received from any server, the resolver +continues with the first server again. When the resolver +has traversed the list 'attempts' times without receiving +any response, it gives up and returns an error to the +calling application. + +Implementations MAY limit the number of entries in this +list.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for the DNS server.</text> + </description> + </leaf> + <choice name="transport"> + <mandatory value="true"/> + <description> + <text>The transport-protocol-specific parameters for this +server.</text> + </description> + <case name="udp-and-tcp"> + <container name="udp-and-tcp"> + <description> + <text>Contains UDP- and TCP-specific configuration +parameters for DNS.</text> + </description> + <reference> + <text>RFC 1035: Domain Names - Implementation and + Specification +RFC 5966: DNS Transport over TCP - Implementation + Requirements</text> + </reference> + <leaf name="address"> + <type name="inet:ip-address"/> + <mandatory value="true"/> + <description> + <text>The address of the DNS server.</text> + </description> + </leaf> + <leaf name="port"> + <if-feature name="dns-udp-tcp-port"/> + <type name="inet:port-number"/> + <default value="53"/> + <description> + <text>The UDP and TCP port number of the DNS server.</text> + </description> + </leaf> + </container> + </case> + </choice> + </list> + <container name="options"> + <description> + <text>Resolver options. The set of available options has been +limited to those that are generally available across +different resolver implementations and generally useful.</text> + </description> + <leaf name="timeout"> + <type name="uint8"> + <range value="1..max"/> + </type> + <units name="seconds"/> + <default value="5"/> + <description> + <text>The amount of time the resolver will wait for a +response from each remote name server before +retrying the query via a different name server.</text> + </description> + </leaf> + <leaf name="attempts"> + <type name="uint8"> + <range value="1..max"/> + </type> + <default value="2"/> + <description> + <text>The number of times the resolver will send a query to +all of its name servers before giving up and returning +an error to the calling application.</text> + </description> + </leaf> + </container> + </container> + <container name="radius"> + <if-feature name="radius"/> + <description> + <text>Configuration of the RADIUS client.</text> + </description> + <list name="server"> + <key value="name"/> + <ordered-by value="user"/> + <description> + <text>List of RADIUS servers used by the device. + +When the RADIUS client is invoked by a calling +application, it sends the query to the first server in +this list. If no response has been received within +'timeout' seconds, the client continues with the next +server in the list. If no response is received from any +server, the client continues with the first server again. +When the client has traversed the list 'attempts' times +without receiving any response, it gives up and returns an +error to the calling application.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for the RADIUS server.</text> + </description> + </leaf> + <choice name="transport"> + <mandatory value="true"/> + <description> + <text>The transport-protocol-specific parameters for this +server.</text> + </description> + <case name="udp"> + <container name="udp"> + <description> + <text>Contains UDP-specific configuration parameters +for RADIUS.</text> + </description> + <leaf name="address"> + <type name="inet:host"/> + <mandatory value="true"/> + <description> + <text>The address of the RADIUS server.</text> + </description> + </leaf> + <leaf name="authentication-port"> + <type name="inet:port-number"/> + <default value="1812"/> + <description> + <text>The port number of the RADIUS server.</text> + </description> + </leaf> + <leaf name="shared-secret"> + <nacm:default-deny-all/> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>The shared secret, which is known to both the +RADIUS client and server.</text> + </description> + <reference> + <text>RFC 2865: Remote Authentication Dial In User + Service (RADIUS)</text> + </reference> + </leaf> + </container> + </case> + </choice> + <leaf name="authentication-type"> + <type name="identityref"> + <base name="radius-authentication-type"/> + </type> + <default value="radius-pap"/> + <description> + <text>The authentication type requested from the RADIUS +server.</text> + </description> + </leaf> + </list> + <container name="options"> + <description> + <text>RADIUS client options.</text> + </description> + <leaf name="timeout"> + <type name="uint8"> + <range value="1..max"/> + </type> + <units name="seconds"/> + <default value="5"/> + <description> + <text>The number of seconds the device will wait for a +response from each RADIUS server before trying with a +different server.</text> + </description> + </leaf> + <leaf name="attempts"> + <type name="uint8"> + <range value="1..max"/> + </type> + <default value="2"/> + <description> + <text>The number of times the device will send a query to +all of its RADIUS servers before giving up.</text> + </description> + </leaf> + </container> + </container> + <container name="authentication"> + <nacm:default-deny-write/> + <if-feature name="authentication"/> + <description> + <text>The authentication configuration subtree.</text> + </description> + <leaf-list name="user-authentication-order"> + <type name="identityref"> + <base name="authentication-method"/> + </type> + <must condition="(. != &quot;sys:radius&quot; or ../../radius/server)"> + <error-message> + <value>When 'radius' is used, a RADIUS server must be configured.</value> + </error-message> + <description> + <text>When 'radius' is used as an authentication method, +a RADIUS server must be configured.</text> + </description> + </must> + <ordered-by value="user"/> + <description> + <text>When the device authenticates a user with a password, +it tries the authentication methods in this leaf-list in +order. If authentication with one method fails, the next +method is used. If no method succeeds, the user is +denied access. + +An empty user-authentication-order leaf-list still allows +authentication of users using mechanisms that do not +involve a password. + +If the 'radius-authentication' feature is advertised by +the NETCONF server, the 'radius' identity can be added to +this list. + +If the 'local-users' feature is advertised by the +NETCONF server, the 'local-users' identity can be +added to this list.</text> + </description> + </leaf-list> + <list name="user"> + <if-feature name="local-users"/> + <key value="name"/> + <description> + <text>The list of local users configured on this device.</text> + </description> + <leaf name="name"> + <type name="string"/> + <description> + <text>The user name string identifying this entry.</text> + </description> + </leaf> + <leaf name="password"> + <type name="ianach:crypt-hash"/> + <description> + <text>The password for this entry.</text> + </description> + </leaf> + <list name="authorized-key"> + <key value="name"/> + <description> + <text>A list of public SSH keys for this user. These keys +are allowed for SSH authentication, as described in +RFC 4253.</text> + </description> + <reference> + <text>RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol</text> + </reference> + <leaf name="name"> + <type name="string"/> + <description> + <text>An arbitrary name for the SSH key.</text> + </description> + </leaf> + <leaf name="algorithm"> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>The public key algorithm name for this SSH key. + +Valid values are the values in the IANA 'Secure Shell +(SSH) Protocol Parameters' registry, Public Key +Algorithm Names.</text> + </description> + <reference> + <text>IANA 'Secure Shell (SSH) Protocol Parameters' +registry, Public Key Algorithm Names</text> + </reference> + </leaf> + <leaf name="key-data"> + <type name="binary"/> + <mandatory value="true"/> + <description> + <text>The binary public key data for this SSH key, as +specified by RFC 4253, Section 6.6, i.e.: + + string certificate or public key format + identifier + byte[n] key/certificate data.</text> + </description> + <reference> + <text>RFC 4253: The Secure Shell (SSH) Transport Layer + Protocol</text> + </reference> + </leaf> + </list> + </list> + </container> + </container> + <container name="system-state"> + <config value="false"/> + <description> + <text>System group operational state.</text> + </description> + <container name="platform"> + <description> + <text>Contains vendor-specific information for +identifying the system platform and operating system.</text> + </description> + <reference> + <text>IEEE Std 1003.1-2008 - sys/utsname.h</text> + </reference> + <leaf name="os-name"> + <type name="string"/> + <description> + <text>The name of the operating system in use - +for example, 'Linux'.</text> + </description> + <reference> + <text>IEEE Std 1003.1-2008 - utsname.sysname</text> + </reference> + </leaf> + <leaf name="os-release"> + <type name="string"/> + <description> + <text>The current release level of the operating +system in use. This string MAY indicate +the OS source code revision.</text> + </description> + <reference> + <text>IEEE Std 1003.1-2008 - utsname.release</text> + </reference> + </leaf> + <leaf name="os-version"> + <type name="string"/> + <description> + <text>The current version level of the operating +system in use. This string MAY indicate +the specific OS build date and target variant +information.</text> + </description> + <reference> + <text>IEEE Std 1003.1-2008 - utsname.version</text> + </reference> + </leaf> + <leaf name="machine"> + <type name="string"/> + <description> + <text>A vendor-specific identifier string representing +the hardware in use.</text> + </description> + <reference> + <text>IEEE Std 1003.1-2008 - utsname.machine</text> + </reference> + </leaf> + </container> + <container name="clock"> + <description> + <text>Monitoring of the system date and time properties.</text> + </description> + <leaf name="current-datetime"> + <type name="yang:date-and-time"/> + <description> + <text>The current system date and time.</text> + </description> + </leaf> + <leaf name="boot-datetime"> + <type name="yang:date-and-time"/> + <description> + <text>The system date and time when the system last restarted.</text> + </description> + </leaf> + </container> + </container> + <rpc name="set-current-datetime"> + <nacm:default-deny-all/> + <description> + <text>Set the /system-state/clock/current-datetime leaf +to the specified value. + +If the system is using NTP (i.e., /system/ntp/enabled +is set to 'true'), then this operation will fail with +error-tag 'operation-failed' and error-app-tag value of +'ntp-active'.</text> + </description> + <input> + <leaf name="current-datetime"> + <type name="yang:date-and-time"/> + <mandatory value="true"/> + <description> + <text>The current system date and time.</text> + </description> + </leaf> + </input> + </rpc> + <rpc name="system-restart"> + <nacm:default-deny-all/> + <description> + <text>Request that the entire system be restarted immediately. +A server SHOULD send an rpc reply to the client before +restarting the system.</text> + </description> + </rpc> + <rpc name="system-shutdown"> + <nacm:default-deny-all/> + <description> + <text>Request that the entire system be shut down immediately. +A server SHOULD send an rpc reply to the client before +shutting down the system.</text> + </description> + </rpc> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-tls-server@2016-11-02.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-tls-server@2016-11-02.yang new file mode 100644 index 00000000..6a15a551 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-tls-server@2016-11-02.yang @@ -0,0 +1,141 @@ + + module ietf-tls-server { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-tls-server"; + prefix tlss; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-keystore { + prefix ks; + reference + "RFC YYYY: Keystore Model"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + WG Chair: Mehmet Ersue + <mailto:mehmet.ersue@nsn.com> + + WG Chair: Mahesh Jethanandani + <mailto:mjethanandani@gmail.com> + + Editor: Kent Watsen + <mailto:kwatsen@juniper.net>"; + description + "This module defines a reusable grouping for a TLS server that + can be used as a basis for specific TLS server instances. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + revision 2016-11-02 { + description + "Initial version"; + reference + "RFC XXXX: TLS Client and Server Models"; + } + + grouping non-listening-tls-server-grouping { + description + "A reusable grouping for a TLS server that can be used as a + basis for specific TLS server instances."; + container certificates { + description + "The list of certificates the TLS server will present when + establishing a TLS connection in its Certificate message, + as defined in Section 7.4.2 in RRC 5246."; + reference + "RFC 5246: + The Transport Layer Security (TLS) Protocol Version 1.2"; + list certificate { + key "name"; + min-elements 1; + description + "An unordered list of certificates the TLS server can pick + from when sending its Server Certificate message."; + reference + "RFC 5246: The TLS Protocol, Section 7.4.2"; + leaf name { + type leafref { + path "/ks:keystore/ks:private-keys/ks:private-key/ks:certificate-chains/ks:certificate-chain/ks:name"; + } + description + "The name of the certificate in the keystore."; + } + } + } + + container client-auth { + description + "A reference to a list of trusted certificate authority (CA) + certificates and a reference to a list of trusted client + certificates."; + leaf trusted-ca-certs { + type leafref { + path "/ks:keystore/ks:trusted-certificates/ks:name"; + } + description + "A reference to a list of certificate authority (CA) + certificates used by the TLS server to authenticate + TLS client certificates."; + } + + leaf trusted-client-certs { + type leafref { + path "/ks:keystore/ks:trusted-certificates/ks:name"; + } + description + "A reference to a list of client certificates used by + the TLS server to authenticate TLS client certificates. + A clients certificate is authenticated if it is an + exact match to a configured trusted client certificate."; + } + } + } + + grouping listening-tls-server-grouping { + description + "A reusable grouping for a TLS server that can be used as a + basis for specific TLS server instances."; + leaf address { + type inet:ip-address; + description + "The IP address of the interface to listen on. The TLS + server will listen on all interfaces if no value is + specified. Please note that some addresses have special + meanings (e.g., '0.0.0.0' and '::')."; + } + + leaf port { + type inet:port-number; + description + "The local port number on this interface the TLS server + listens on. When this grouping is used, it is RECOMMENDED + that refine statement is used to either set a default port + value or to set mandatory true."; + } + + uses non-listening-tls-server-grouping; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-tls-server@2016-11-02.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-tls-server@2016-11-02.yin new file mode 100644 index 00000000..ee67095e --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-tls-server@2016-11-02.yin @@ -0,0 +1,155 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-tls-server" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:tlss="urn:ietf:params:xml:ns:yang:ietf-tls-server" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types" + xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore"> + <yang-version value="1.1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-tls-server"/> + <prefix value="tlss"/> + <import module="ietf-inet-types"> + <prefix value="inet"/> + <reference> + <text>RFC 6991: Common YANG Data Types</text> + </reference> + </import> + <import module="ietf-keystore"> + <prefix value="ks"/> + <reference> + <text>RFC YYYY: Keystore Model</text> + </reference> + </import> + <organization> + <text>IETF NETCONF (Network Configuration) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;mailto:netconf@ietf.org&gt; + +WG Chair: Mehmet Ersue + &lt;mailto:mehmet.ersue@nsn.com&gt; + +WG Chair: Mahesh Jethanandani + &lt;mailto:mjethanandani@gmail.com&gt; + +Editor: Kent Watsen + &lt;mailto:kwatsen@juniper.net&gt;</text> + </contact> + <description> + <text>This module defines a reusable grouping for a TLS server that +can be used as a basis for specific TLS server instances. + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD +License set forth in Section 4.c of the IETF Trust's +Legal Provisions Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC XXXX; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2016-11-02"> + <description> + <text>Initial version</text> + </description> + <reference> + <text>RFC XXXX: TLS Client and Server Models</text> + </reference> + </revision> + <grouping name="non-listening-tls-server-grouping"> + <description> + <text>A reusable grouping for a TLS server that can be used as a +basis for specific TLS server instances.</text> + </description> + <container name="certificates"> + <description> + <text>The list of certificates the TLS server will present when +establishing a TLS connection in its Certificate message, +as defined in Section 7.4.2 in RRC 5246.</text> + </description> + <reference> + <text>RFC 5246: + The Transport Layer Security (TLS) Protocol Version 1.2</text> + </reference> + <list name="certificate"> + <key value="name"/> + <min-elements value="1"/> + <description> + <text>An unordered list of certificates the TLS server can pick +from when sending its Server Certificate message.</text> + </description> + <reference> + <text>RFC 5246: The TLS Protocol, Section 7.4.2</text> + </reference> + <leaf name="name"> + <type name="leafref"> + <path value="/ks:keystore/ks:private-keys/ks:private-key/ks:certificate-chains/ks:certificate-chain/ks:name"/> + </type> + <description> + <text>The name of the certificate in the keystore.</text> + </description> + </leaf> + </list> + </container> + <container name="client-auth"> + <description> + <text>A reference to a list of trusted certificate authority (CA) +certificates and a reference to a list of trusted client +certificates.</text> + </description> + <leaf name="trusted-ca-certs"> + <type name="leafref"> + <path value="/ks:keystore/ks:trusted-certificates/ks:name"/> + </type> + <description> + <text>A reference to a list of certificate authority (CA) +certificates used by the TLS server to authenticate +TLS client certificates.</text> + </description> + </leaf> + <leaf name="trusted-client-certs"> + <type name="leafref"> + <path value="/ks:keystore/ks:trusted-certificates/ks:name"/> + </type> + <description> + <text>A reference to a list of client certificates used by +the TLS server to authenticate TLS client certificates. +A clients certificate is authenticated if it is an +exact match to a configured trusted client certificate.</text> + </description> + </leaf> + </container> + </grouping> + <grouping name="listening-tls-server-grouping"> + <description> + <text>A reusable grouping for a TLS server that can be used as a +basis for specific TLS server instances.</text> + </description> + <leaf name="address"> + <type name="inet:ip-address"/> + <description> + <text>The IP address of the interface to listen on. The TLS +server will listen on all interfaces if no value is +specified. Please note that some addresses have special +meanings (e.g., '0.0.0.0' and '::').</text> + </description> + </leaf> + <leaf name="port"> + <type name="inet:port-number"/> + <description> + <text>The local port number on this interface the TLS server +listens on. When this grouping is used, it is RECOMMENDED +that refine statement is used to either set a default port +value or to set mandatory true.</text> + </description> + </leaf> + <uses name="non-listening-tls-server-grouping"/> + </grouping> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-x509-cert-to-name@2014-12-10.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-x509-cert-to-name@2014-12-10.yang new file mode 100644 index 00000000..c0dfd35b --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-x509-cert-to-name@2014-12-10.yang @@ -0,0 +1,293 @@ + + module ietf-x509-cert-to-name { + namespace "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"; + prefix x509c2n; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: Thomas Nadeau + <mailto:tnadeau@lucidvision.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + description + "This module contains a collection of YANG definitions for + extracting a name from an X.509 certificate. + The algorithm used to extract a name from an X.509 certificate + was first defined in RFC 6353. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7407; see + the RFC itself for full legal notices."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model for + the Simple Network Management Protocol (SNMP)"; + + revision 2014-12-10 { + description + "Initial revision."; + reference + "RFC 7407: A YANG Data Model for SNMP Configuration"; + } + + identity cert-to-name { + description + "Base identity for algorithms to derive a name from a + certificate."; + } + + identity specified { + base cert-to-name; + description + "Directly specifies the name to be used for the certificate. + The value of the leaf 'name' in the cert-to-name list is + used."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSpecified"; + } + + identity san-rfc822-name { + base cert-to-name; + description + "Maps a subjectAltName's rfc822Name to a name. The local part + of the rfc822Name is passed unaltered, but the host-part of + the name must be passed in lowercase. For example, the + rfc822Name field FooBar@Example.COM is mapped to name + FooBar@example.com."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANRFC822Name"; + } + + identity san-dns-name { + base cert-to-name; + description + "Maps a subjectAltName's dNSName to a name after first + converting it to all lowercase (RFC 5280 does not specify + converting to lowercase, so this involves an extra step). + This mapping results in a 1:1 correspondence between + subjectAltName dNSName values and the name values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANDNSName"; + } + + identity san-ip-address { + base cert-to-name; + description + "Maps a subjectAltName's iPAddress to a name by + transforming the binary-encoded address as follows: + + 1) for IPv4, the value is converted into a + decimal-dotted quad address (e.g., '192.0.2.1'). + + 2) for IPv6 addresses, the value is converted into a + 32-character, all-lowercase hexadecimal string + without any colon separators. + + This mapping results in a 1:1 correspondence between + subjectAltName iPAddress values and the name values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANIpAddress"; + } + + identity san-any { + base cert-to-name; + description + "Maps any of the following fields using the corresponding + mapping algorithms: + + +------------+-----------------+ + | Type | Algorithm | + |------------+-----------------| + | rfc822Name | san-rfc822-name | + | dNSName | san-dns-name | + | iPAddress | san-ip-address | + +------------+-----------------+ + + The first matching subjectAltName value found in the + certificate of the above types MUST be used when deriving + the name. The mapping algorithm specified in the + 'Algorithm' column MUST be used to derive the name. + + This mapping results in a 1:1 correspondence between + subjectAltName values and name values. The three sub-mapping + algorithms produced by this combined algorithm cannot produce + conflicting results between themselves."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANAny"; + } + + identity common-name { + base cert-to-name; + description + "Maps a certificate's CommonName to a name after converting + it to a UTF-8 encoding. The usage of CommonNames is + deprecated, and users are encouraged to use subjectAltName + mapping methods instead. This mapping results in a 1:1 + correspondence between certificate CommonName values and name + values."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertCommonName"; + } + + typedef tls-fingerprint { + type yang:hex-string { + pattern "([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){0,254}"; + } + description + "A fingerprint value that can be used to uniquely reference + other data of potentially arbitrary length. + + A tls-fingerprint value is composed of a 1-octet hashing + algorithm identifier followed by the fingerprint value. The + first octet value identifying the hashing algorithm is taken + from the IANA 'TLS HashAlgorithm Registry' (RFC 5246). The + remaining octets are filled using the results of the hashing + algorithm."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.SnmpTLSFingerprint"; + } + + grouping cert-to-name { + description + "Defines nodes for mapping certificates to names. Modules + that use this grouping should describe how the resulting + name is used."; + list cert-to-name { + key "id"; + description + "This list defines how certificates are mapped to names. + The name is derived by considering each cert-to-name + list entry in order. The cert-to-name entry's fingerprint + determines whether the list entry is a match: + + 1) If the cert-to-name list entry's fingerprint value + matches that of the presented certificate, then consider + the list entry a successful match. + + 2) If the cert-to-name list entry's fingerprint value + matches that of a locally held copy of a trusted CA + certificate, and that CA certificate was part of the CA + certificate chain to the presented certificate, then + consider the list entry a successful match. + + Once a matching cert-to-name list entry has been found, the + map-type is used to determine how the name associated with + the certificate should be determined. See the map-type + leaf's description for details on determining the name value. + If it is impossible to determine a name from the cert-to-name + list entry's data combined with the data presented in the + certificate, then additional cert-to-name list entries MUST + be searched to look for another potential match. + + Security administrators are encouraged to make use of + certificates with subjectAltName fields that can be mapped to + names so that a single root CA certificate can allow all + child certificates' subjectAltName fields to map directly to + a name via a 1:1 transformation."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNEntry"; + leaf id { + type uint32; + description + "The id specifies the order in which the entries in the + cert-to-name list are searched. Entries with lower + numbers are searched first."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNID"; + } + + leaf fingerprint { + type x509c2n:tls-fingerprint; + mandatory true; + description + "Specifies a value with which the fingerprint of the + full certificate presented by the peer is compared. If + the fingerprint of the full certificate presented by the + peer does not match the fingerprint configured, then the + entry is skipped, and the search for a match continues."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNFingerprint"; + } + + leaf map-type { + type identityref { + base cert-to-name; + } + mandatory true; + description + "Specifies the algorithm used to map the certificate + presented by the peer to a name. + + Mappings that need additional configuration objects should + use the 'when' statement to make them conditional based on + the map-type."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNMapType"; + } + + leaf name { + when "../map-type = 'x509c2n:specified'"; + type string; + mandatory true; + description + "Directly specifies the NETCONF username when the + map-type is 'specified'."; + reference + "RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNData"; + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-x509-cert-to-name@2014-12-10.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-x509-cert-to-name@2014-12-10.yin new file mode 100644 index 00000000..f39e0267 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-x509-cert-to-name@2014-12-10.yin @@ -0,0 +1,314 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-x509-cert-to-name" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:x509c2n="urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"/> + <prefix value="x509c2n"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + </import> + <organization> + <text>IETF NETMOD (NETCONF Data Modeling Language) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netmod/&gt; +WG List: &lt;mailto:netmod@ietf.org&gt; + +WG Chair: Thomas Nadeau + &lt;mailto:tnadeau@lucidvision.com&gt; + +WG Chair: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt; + +Editor: Martin Bjorklund + &lt;mailto:mbj@tail-f.com&gt; + +Editor: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt;</text> + </contact> + <description> + <text>This module contains a collection of YANG definitions for +extracting a name from an X.509 certificate. +The algorithm used to extract a name from an X.509 certificate +was first defined in RFC 6353. + +Copyright (c) 2014 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 7407; see +the RFC itself for full legal notices.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model for + the Simple Network Management Protocol (SNMP)</text> + </reference> + <revision date="2014-12-10"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 7407: A YANG Data Model for SNMP Configuration</text> + </reference> + </revision> + <identity name="cert-to-name"> + <description> + <text>Base identity for algorithms to derive a name from a +certificate.</text> + </description> + </identity> + <identity name="specified"> + <base name="cert-to-name"/> + <description> + <text>Directly specifies the name to be used for the certificate. +The value of the leaf 'name' in the cert-to-name list is +used.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSpecified</text> + </reference> + </identity> + <identity name="san-rfc822-name"> + <base name="cert-to-name"/> + <description> + <text>Maps a subjectAltName's rfc822Name to a name. The local part +of the rfc822Name is passed unaltered, but the host-part of +the name must be passed in lowercase. For example, the +rfc822Name field FooBar@Example.COM is mapped to name +FooBar@example.com.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANRFC822Name</text> + </reference> + </identity> + <identity name="san-dns-name"> + <base name="cert-to-name"/> + <description> + <text>Maps a subjectAltName's dNSName to a name after first +converting it to all lowercase (RFC 5280 does not specify +converting to lowercase, so this involves an extra step). +This mapping results in a 1:1 correspondence between +subjectAltName dNSName values and the name values.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANDNSName</text> + </reference> + </identity> + <identity name="san-ip-address"> + <base name="cert-to-name"/> + <description> + <text>Maps a subjectAltName's iPAddress to a name by +transforming the binary-encoded address as follows: + + 1) for IPv4, the value is converted into a + decimal-dotted quad address (e.g., '192.0.2.1'). + + 2) for IPv6 addresses, the value is converted into a + 32-character, all-lowercase hexadecimal string + without any colon separators. + +This mapping results in a 1:1 correspondence between +subjectAltName iPAddress values and the name values.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANIpAddress</text> + </reference> + </identity> + <identity name="san-any"> + <base name="cert-to-name"/> + <description> + <text>Maps any of the following fields using the corresponding +mapping algorithms: + + +------------+-----------------+ + | Type | Algorithm | + |------------+-----------------| + | rfc822Name | san-rfc822-name | + | dNSName | san-dns-name | + | iPAddress | san-ip-address | + +------------+-----------------+ + +The first matching subjectAltName value found in the +certificate of the above types MUST be used when deriving +the name. The mapping algorithm specified in the +'Algorithm' column MUST be used to derive the name. + +This mapping results in a 1:1 correspondence between +subjectAltName values and name values. The three sub-mapping +algorithms produced by this combined algorithm cannot produce +conflicting results between themselves.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertSANAny</text> + </reference> + </identity> + <identity name="common-name"> + <base name="cert-to-name"/> + <description> + <text>Maps a certificate's CommonName to a name after converting +it to a UTF-8 encoding. The usage of CommonNames is +deprecated, and users are encouraged to use subjectAltName +mapping methods instead. This mapping results in a 1:1 +correspondence between certificate CommonName values and name +values.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertCommonName</text> + </reference> + </identity> + <typedef name="tls-fingerprint"> + <type name="yang:hex-string"> + <pattern value="([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){0,254}"/> + </type> + <description> + <text>A fingerprint value that can be used to uniquely reference +other data of potentially arbitrary length. + +A tls-fingerprint value is composed of a 1-octet hashing +algorithm identifier followed by the fingerprint value. The +first octet value identifying the hashing algorithm is taken +from the IANA 'TLS HashAlgorithm Registry' (RFC 5246). The +remaining octets are filled using the results of the hashing +algorithm.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.SnmpTLSFingerprint</text> + </reference> + </typedef> + <grouping name="cert-to-name"> + <description> + <text>Defines nodes for mapping certificates to names. Modules +that use this grouping should describe how the resulting +name is used.</text> + </description> + <list name="cert-to-name"> + <key value="id"/> + <description> + <text>This list defines how certificates are mapped to names. +The name is derived by considering each cert-to-name +list entry in order. The cert-to-name entry's fingerprint +determines whether the list entry is a match: + +1) If the cert-to-name list entry's fingerprint value + matches that of the presented certificate, then consider + the list entry a successful match. + +2) If the cert-to-name list entry's fingerprint value + matches that of a locally held copy of a trusted CA + certificate, and that CA certificate was part of the CA + certificate chain to the presented certificate, then + consider the list entry a successful match. + +Once a matching cert-to-name list entry has been found, the +map-type is used to determine how the name associated with +the certificate should be determined. See the map-type +leaf's description for details on determining the name value. +If it is impossible to determine a name from the cert-to-name +list entry's data combined with the data presented in the +certificate, then additional cert-to-name list entries MUST +be searched to look for another potential match. + +Security administrators are encouraged to make use of +certificates with subjectAltName fields that can be mapped to +names so that a single root CA certificate can allow all +child certificates' subjectAltName fields to map directly to +a name via a 1:1 transformation.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNEntry</text> + </reference> + <leaf name="id"> + <type name="uint32"/> + <description> + <text>The id specifies the order in which the entries in the +cert-to-name list are searched. Entries with lower +numbers are searched first.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNID</text> + </reference> + </leaf> + <leaf name="fingerprint"> + <type name="x509c2n:tls-fingerprint"/> + <mandatory value="true"/> + <description> + <text>Specifies a value with which the fingerprint of the +full certificate presented by the peer is compared. If +the fingerprint of the full certificate presented by the +peer does not match the fingerprint configured, then the +entry is skipped, and the search for a match continues.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNFingerprint</text> + </reference> + </leaf> + <leaf name="map-type"> + <type name="identityref"> + <base name="cert-to-name"/> + </type> + <mandatory value="true"/> + <description> + <text>Specifies the algorithm used to map the certificate +presented by the peer to a name. + +Mappings that need additional configuration objects should +use the 'when' statement to make them conditional based on +the map-type.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNMapType</text> + </reference> + </leaf> + <leaf name="name"> + <when condition="../map-type = 'x509c2n:specified'"/> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>Directly specifies the NETCONF username when the +map-type is 'specified'.</text> + </description> + <reference> + <text>RFC 6353: Transport Layer Security (TLS) Transport Model + for the Simple Network Management Protocol + (SNMP). + SNMP-TLS-TM-MIB.snmpTlstmCertToTSNData</text> + </reference> + </leaf> + </list> + </grouping> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-library@2017-08-17.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-library@2017-08-17.yang new file mode 100644 index 00000000..67974c11 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-library@2017-08-17.yang @@ -0,0 +1,492 @@ + + module ietf-yang-library { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library"; + prefix yanglib; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + + import ietf-datastores { + prefix ds; + reference + "I-D.ietf-revised-datastores: + Network Management Datastore Architecture."; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net>"; + description + "This module contains information about the YANG server + instance, including the modules and datastores the + server supports, and which modules are present in + which datastores. + + Copyright (c) 2017 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + revision 2017-08-17 { + description + "Updated revision."; + reference + "RFC XXXX: YANG Library."; + } + revision 2016-04-09 { + description + "Initial revision."; + reference + "RFC 7895: YANG Module Library."; + } + + typedef revision-identifier { + type string { + pattern "\\d{4}-\\d{2}-\\d{2}"; + } + description + "Represents a specific date in YYYY-MM-DD format."; + } + + grouping module-identification-leafs { + description + "Parameters for identifying YANG modules and submodules."; + leaf name { + type yang:yang-identifier; + mandatory true; + description + "The YANG module or submodule name."; + } + + leaf revision { + type union { + type revision-identifier; + type string { + length "0"; + } + } + mandatory true; + description + "The YANG module or submodule revision date. + A zero-length string is used if no revision statement + is present in the YANG module or submodule."; + } + } + + grouping schema-leaf { + description + "Common schema leaf parameter for modules and submodules."; + leaf schema { + type inet:uri; + description + "Contains a URL that represents the YANG schema + resource for this module or submodule. + This leaf will only be present if there is a URL + available for retrieval of the schema for this entry."; + } + } + + grouping implementation-parameters { + description + "Parameters for describing the implementation of a module."; + leaf-list feature { + type yang:yang-identifier; + description + "List of YANG feature names from this module that are + supported by the server, regardless whether they are defined + in the module or any included submodule."; + } + + list deviation { + key "name revision"; + description + "List of YANG deviation module names and revisions used by + this server to modify the conformance of the module + associated with this entry. Note that the same module can + be used for deviations for multiple modules, so the same + entry MAY appear within multiple 'module' entries. + + The deviation module MUST be present in the 'module' list, + with the same name and revision values. The + 'conformance-type' value will be 'implement' for the + deviation module."; + uses module-identification-leafs; + } + + leaf conformance-type { + type enumeration { + enum "implement" { + description + "Indicates that the server implements one or more + protocol-accessible objects defined in the YANG module + identified in this entry. This includes deviation + statements defined in the module. + + For YANG version 1.1 modules, there is at most one + module entry with conformance type 'implement' for a + particular module name, since YANG 1.1 requires that at + most one revision of a module is implemented. + + For YANG version 1 modules, there SHOULD NOT be more + than one module entry for a particular module name."; + } + enum "import" { + description + "Indicates that the server imports reusable definitions + from the specified revision of the module, but does not + implement any protocol accessible objects from this + revision. + + Multiple module entries for the same module name MAY + exist. This can occur if multiple modules import the + same module, but specify different revision-dates in the + import statements."; + } + } + mandatory true; + description + "Indicates the type of conformance the server is claiming + for the YANG module identified by this entry."; + } + } + + grouping yang-library-parameters { + description + "The YANG library data structure is represented as a grouping + so it can be reused in configuration or another monitoring + data structure."; + container modules { + description + "A container holding a list of modules. Note, modules being + listed here does not mean that they are supported by any + particular datastore."; + list module { + key "id"; + description + "Each entry represents one revision of one module + currently supported by the server."; + leaf id { + type string; + description + "A stable identifier, independent of any other part + of this module instance."; + } + + uses module-identification-leafs; + + uses schema-leaf; + + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace identifier for this module."; + } + + uses implementation-parameters; + + list submodule { + key "name revision"; + description + "Each entry represents one submodule within the + parent module."; + uses module-identification-leafs; + + uses schema-leaf; + } + } + } + + container module-sets { + description + "A container for a list of module-sets. Module-sets being + listed here does not mean that they are used by any + particular datastore."; + list module-set { + key "id"; + description + "An arbitrary module-set definition provided by the + server."; + leaf id { + type string; + description + "A system-generated value that uniquely represents the + referenced set of modules. Any change to the number + of modules referenced, or to the modules themselves, + generates a different value."; + } + + leaf-list module { + type leafref { + path "../../../modules/module/id"; + } + description + "A module-instance supported by the server, including its + features and deviations."; + } + } + } + + container datastores { + description + "A container for a list of datastores supported by the + server. Each datastore indicates which module-sets it + supports."; + list datastore { + key "name"; + description + "A datastore supported by this server."; + leaf name { + type identityref { + base ds:datastore; + } + description + "The identity of the datastore."; + } + + leaf module-set { + type leafref { + path "../../../module-sets/module-set/id"; + } + description + "A reference to a module-set supported by this + datastore"; + } + } + } + } + + grouping module-list { + status deprecated; + description + "The module data structure is represented as a grouping + so it can be reused in configuration or another monitoring + data structure."; + grouping common-leafs { + status deprecated; + description + "Common parameters for YANG modules and submodules."; + leaf name { + type yang:yang-identifier; + status deprecated; + description + "The YANG module or submodule name."; + } + + leaf revision { + type union { + type revision-identifier; + type string { + length "0"; + } + } + status deprecated; + description + "The YANG module or submodule revision date. + A zero-length string is used if no revision statement + is present in the YANG module or submodule."; + } + } + + list module { + key "name revision"; + status deprecated; + description + "Each entry represents one revision of one module + currently supported by the server."; + uses common-leafs { + status deprecated; + } + + uses schema-leaf { + status deprecated; + } + + leaf namespace { + type inet:uri; + mandatory true; + status deprecated; + description + "The XML namespace identifier for this module."; + } + + leaf-list feature { + type yang:yang-identifier; + status deprecated; + description + "List of YANG feature names from this module that are + supported by the server, regardless whether they are + defined in the module or any included submodule."; + } + + list deviation { + key "name revision"; + status deprecated; + description + "List of YANG deviation module names and revisions + used by this server to modify the conformance of + the module associated with this entry. Note that + the same module can be used for deviations for + multiple modules, so the same entry MAY appear + within multiple 'module' entries. + + The deviation module MUST be present in the 'module' + list, with the same name and revision values. + The 'conformance-type' value will be 'implement' for + the deviation module."; + uses common-leafs { + status deprecated; + } + } + + leaf conformance-type { + type enumeration { + enum "implement" { + description + "Indicates that the server implements one or more + protocol-accessible objects defined in the YANG module + identified in this entry. This includes deviation + statements defined in the module. + + For YANG version 1.1 modules, there is at most one + module entry with conformance type 'implement' for a + particular module name, since YANG 1.1 requires that + at most one revision of a module is implemented. + + For YANG version 1 modules, there SHOULD NOT be more + than one module entry for a particular module name."; + } + enum "import" { + description + "Indicates that the server imports reusable definitions + from the specified revision of the module, but does + not implement any protocol accessible objects from + this revision. + + Multiple module entries for the same module name MAY + exist. This can occur if multiple modules import the + same module, but specify different revision-dates in + the import statements."; + } + } + mandatory true; + status deprecated; + description + "Indicates the type of conformance the server is claiming + for the YANG module identified by this entry."; + } + + list submodule { + key "name revision"; + status deprecated; + description + "Each entry represents one submodule within the + parent module."; + uses common-leafs { + status deprecated; + } + + uses schema-leaf { + status deprecated; + } + } + } + } + + container yang-library { + config false; + description + "Container providing all the YANG meta information the + server possesses."; + uses yang-library-parameters; + + leaf checksum { + type string; + config false; + mandatory true; + description + "A server-generated checksum of the contents of the + 'yang-library' tree. The server MUST change the value of + this leaf if the information represented by the + 'yang-library' tree, except yang-library/checksum, has + changed."; + } + } + + container modules-state { + config false; + status deprecated; + description + "Contains YANG module monitoring information."; + leaf module-set-id { + type string; + mandatory true; + status deprecated; + description + "Contains a server-specific identifier representing + the current set of modules and submodules. The + server MUST change the value of this leaf if the + information represented by the 'module' list instances + has changed."; + } + + uses module-list { + status deprecated; + } + } + + notification yang-library-update { + description + "Generated when any YANG library information on the + server has changed."; + } + + notification yang-library-change { + status deprecated; + description + "Generated when the set of modules and submodules supported + by the server has changed."; + leaf module-set-id { + type leafref { + path "/yanglib:modules-state/yanglib:module-set-id"; + } + mandatory true; + status deprecated; + description + "Contains the module-set-id value representing the + set of modules and submodules supported at the server + at the time the notification is generated."; + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-library@2017-08-17.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-library@2017-08-17.yin new file mode 100644 index 00000000..95749bbb --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-library@2017-08-17.yin @@ -0,0 +1,514 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-yang-library" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:yanglib="urn:ietf:params:xml:ns:yang:ietf-yang-library" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types" + xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types" + xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> + <yang-version value="1.1"/> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-yang-library"/> + <prefix value="yanglib"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + <reference> + <text>RFC 6991: Common YANG Data Types.</text> + </reference> + </import> + <import module="ietf-inet-types"> + <prefix value="inet"/> + <reference> + <text>RFC 6991: Common YANG Data Types.</text> + </reference> + </import> + <import module="ietf-datastores"> + <prefix value="ds"/> + <reference> + <text>I-D.ietf-revised-datastores: +Network Management Datastore Architecture.</text> + </reference> + </import> + <organization> + <text>IETF NETCONF (Network Configuration) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt; +WG List: &lt;mailto:netconf@ietf.org&gt; + +Author: Andy Bierman + &lt;mailto:andy@yumaworks.com&gt; + +Author: Martin Bjorklund + &lt;mailto:mbj@tail-f.com&gt; + +Author: Kent Watsen + &lt;mailto:kwatsen@juniper.net&gt;</text> + </contact> + <description> + <text>This module contains information about the YANG server +instance, including the modules and datastores the +server supports, and which modules are present in +which datastores. + +Copyright (c) 2017 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC XXXX; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2017-08-17"> + <description> + <text>Updated revision.</text> + </description> + <reference> + <text>RFC XXXX: YANG Library.</text> + </reference> + </revision> + <revision date="2016-04-09"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 7895: YANG Module Library.</text> + </reference> + </revision> + <typedef name="revision-identifier"> + <type name="string"> + <pattern value="\d{4}-\d{2}-\d{2}"/> + </type> + <description> + <text>Represents a specific date in YYYY-MM-DD format.</text> + </description> + </typedef> + <grouping name="module-identification-leafs"> + <description> + <text>Parameters for identifying YANG modules and submodules.</text> + </description> + <leaf name="name"> + <type name="yang:yang-identifier"/> + <mandatory value="true"/> + <description> + <text>The YANG module or submodule name.</text> + </description> + </leaf> + <leaf name="revision"> + <type name="union"> + <type name="revision-identifier"/> + <type name="string"> + <length value="0"/> + </type> + </type> + <mandatory value="true"/> + <description> + <text>The YANG module or submodule revision date. +A zero-length string is used if no revision statement +is present in the YANG module or submodule.</text> + </description> + </leaf> + </grouping> + <grouping name="schema-leaf"> + <description> + <text>Common schema leaf parameter for modules and submodules.</text> + </description> + <leaf name="schema"> + <type name="inet:uri"/> + <description> + <text>Contains a URL that represents the YANG schema +resource for this module or submodule. +This leaf will only be present if there is a URL +available for retrieval of the schema for this entry.</text> + </description> + </leaf> + </grouping> + <grouping name="implementation-parameters"> + <description> + <text>Parameters for describing the implementation of a module.</text> + </description> + <leaf-list name="feature"> + <type name="yang:yang-identifier"/> + <description> + <text>List of YANG feature names from this module that are +supported by the server, regardless whether they are defined +in the module or any included submodule.</text> + </description> + </leaf-list> + <list name="deviation"> + <key value="name revision"/> + <description> + <text>List of YANG deviation module names and revisions used by +this server to modify the conformance of the module +associated with this entry. Note that the same module can +be used for deviations for multiple modules, so the same +entry MAY appear within multiple 'module' entries. + +The deviation module MUST be present in the 'module' list, +with the same name and revision values. The +'conformance-type' value will be 'implement' for the +deviation module.</text> + </description> + <uses name="module-identification-leafs"/> + </list> + <leaf name="conformance-type"> + <type name="enumeration"> + <enum name="implement"> + <description> + <text>Indicates that the server implements one or more +protocol-accessible objects defined in the YANG module +identified in this entry. This includes deviation +statements defined in the module. + +For YANG version 1.1 modules, there is at most one +module entry with conformance type 'implement' for a +particular module name, since YANG 1.1 requires that at +most one revision of a module is implemented. + +For YANG version 1 modules, there SHOULD NOT be more +than one module entry for a particular module name.</text> + </description> + </enum> + <enum name="import"> + <description> + <text>Indicates that the server imports reusable definitions +from the specified revision of the module, but does not +implement any protocol accessible objects from this +revision. + +Multiple module entries for the same module name MAY +exist. This can occur if multiple modules import the +same module, but specify different revision-dates in the +import statements.</text> + </description> + </enum> + </type> + <mandatory value="true"/> + <description> + <text>Indicates the type of conformance the server is claiming +for the YANG module identified by this entry.</text> + </description> + </leaf> + </grouping> + <grouping name="yang-library-parameters"> + <description> + <text>The YANG library data structure is represented as a grouping +so it can be reused in configuration or another monitoring +data structure.</text> + </description> + <container name="modules"> + <description> + <text>A container holding a list of modules. Note, modules being +listed here does not mean that they are supported by any +particular datastore.</text> + </description> + <list name="module"> + <key value="id"/> + <description> + <text>Each entry represents one revision of one module +currently supported by the server.</text> + </description> + <leaf name="id"> + <type name="string"/> + <description> + <text>A stable identifier, independent of any other part +of this module instance.</text> + </description> + </leaf> + <uses name="module-identification-leafs"/> + <uses name="schema-leaf"/> + <leaf name="namespace"> + <type name="inet:uri"/> + <mandatory value="true"/> + <description> + <text>The XML namespace identifier for this module.</text> + </description> + </leaf> + <uses name="implementation-parameters"/> + <list name="submodule"> + <key value="name revision"/> + <description> + <text>Each entry represents one submodule within the +parent module.</text> + </description> + <uses name="module-identification-leafs"/> + <uses name="schema-leaf"/> + </list> + </list> + </container> + <container name="module-sets"> + <description> + <text>A container for a list of module-sets. Module-sets being +listed here does not mean that they are used by any +particular datastore.</text> + </description> + <list name="module-set"> + <key value="id"/> + <description> + <text>An arbitrary module-set definition provided by the +server.</text> + </description> + <leaf name="id"> + <type name="string"/> + <description> + <text>A system-generated value that uniquely represents the +referenced set of modules. Any change to the number +of modules referenced, or to the modules themselves, +generates a different value.</text> + </description> + </leaf> + <leaf-list name="module"> + <type name="leafref"> + <path value="../../../modules/module/id"/> + </type> + <description> + <text>A module-instance supported by the server, including its +features and deviations.</text> + </description> + </leaf-list> + </list> + </container> + <container name="datastores"> + <description> + <text>A container for a list of datastores supported by the +server. Each datastore indicates which module-sets it +supports.</text> + </description> + <list name="datastore"> + <key value="name"/> + <description> + <text>A datastore supported by this server.</text> + </description> + <leaf name="name"> + <type name="identityref"> + <base name="ds:datastore"/> + </type> + <description> + <text>The identity of the datastore.</text> + </description> + </leaf> + <leaf name="module-set"> + <type name="leafref"> + <path value="../../../module-sets/module-set/id"/> + </type> + <description> + <text>A reference to a module-set supported by this +datastore</text> + </description> + </leaf> + </list> + </container> + </grouping> + <grouping name="module-list"> + <status value="deprecated"/> + <description> + <text>The module data structure is represented as a grouping +so it can be reused in configuration or another monitoring +data structure.</text> + </description> + <grouping name="common-leafs"> + <status value="deprecated"/> + <description> + <text>Common parameters for YANG modules and submodules.</text> + </description> + <leaf name="name"> + <type name="yang:yang-identifier"/> + <status value="deprecated"/> + <description> + <text>The YANG module or submodule name.</text> + </description> + </leaf> + <leaf name="revision"> + <type name="union"> + <type name="revision-identifier"/> + <type name="string"> + <length value="0"/> + </type> + </type> + <status value="deprecated"/> + <description> + <text>The YANG module or submodule revision date. +A zero-length string is used if no revision statement +is present in the YANG module or submodule.</text> + </description> + </leaf> + </grouping> + <list name="module"> + <key value="name revision"/> + <status value="deprecated"/> + <description> + <text>Each entry represents one revision of one module +currently supported by the server.</text> + </description> + <uses name="common-leafs"> + <status value="deprecated"/> + </uses> + <uses name="schema-leaf"> + <status value="deprecated"/> + </uses> + <leaf name="namespace"> + <type name="inet:uri"/> + <mandatory value="true"/> + <status value="deprecated"/> + <description> + <text>The XML namespace identifier for this module.</text> + </description> + </leaf> + <leaf-list name="feature"> + <type name="yang:yang-identifier"/> + <status value="deprecated"/> + <description> + <text>List of YANG feature names from this module that are +supported by the server, regardless whether they are +defined in the module or any included submodule.</text> + </description> + </leaf-list> + <list name="deviation"> + <key value="name revision"/> + <status value="deprecated"/> + <description> + <text>List of YANG deviation module names and revisions +used by this server to modify the conformance of +the module associated with this entry. Note that +the same module can be used for deviations for +multiple modules, so the same entry MAY appear +within multiple 'module' entries. + +The deviation module MUST be present in the 'module' +list, with the same name and revision values. +The 'conformance-type' value will be 'implement' for +the deviation module.</text> + </description> + <uses name="common-leafs"> + <status value="deprecated"/> + </uses> + </list> + <leaf name="conformance-type"> + <type name="enumeration"> + <enum name="implement"> + <description> + <text>Indicates that the server implements one or more +protocol-accessible objects defined in the YANG module +identified in this entry. This includes deviation +statements defined in the module. + +For YANG version 1.1 modules, there is at most one +module entry with conformance type 'implement' for a +particular module name, since YANG 1.1 requires that +at most one revision of a module is implemented. + +For YANG version 1 modules, there SHOULD NOT be more +than one module entry for a particular module name.</text> + </description> + </enum> + <enum name="import"> + <description> + <text>Indicates that the server imports reusable definitions +from the specified revision of the module, but does +not implement any protocol accessible objects from +this revision. + +Multiple module entries for the same module name MAY +exist. This can occur if multiple modules import the +same module, but specify different revision-dates in +the import statements.</text> + </description> + </enum> + </type> + <mandatory value="true"/> + <status value="deprecated"/> + <description> + <text>Indicates the type of conformance the server is claiming +for the YANG module identified by this entry.</text> + </description> + </leaf> + <list name="submodule"> + <key value="name revision"/> + <status value="deprecated"/> + <description> + <text>Each entry represents one submodule within the +parent module.</text> + </description> + <uses name="common-leafs"> + <status value="deprecated"/> + </uses> + <uses name="schema-leaf"> + <status value="deprecated"/> + </uses> + </list> + </list> + </grouping> + <container name="yang-library"> + <config value="false"/> + <description> + <text>Container providing all the YANG meta information the +server possesses.</text> + </description> + <uses name="yang-library-parameters"/> + <leaf name="checksum"> + <type name="string"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>A server-generated checksum of the contents of the +'yang-library' tree. The server MUST change the value of +this leaf if the information represented by the +'yang-library' tree, except yang-library/checksum, has +changed.</text> + </description> + </leaf> + </container> + <container name="modules-state"> + <config value="false"/> + <status value="deprecated"/> + <description> + <text>Contains YANG module monitoring information.</text> + </description> + <leaf name="module-set-id"> + <type name="string"/> + <mandatory value="true"/> + <status value="deprecated"/> + <description> + <text>Contains a server-specific identifier representing +the current set of modules and submodules. The +server MUST change the value of this leaf if the +information represented by the 'module' list instances +has changed.</text> + </description> + </leaf> + <uses name="module-list"> + <status value="deprecated"/> + </uses> + </container> + <notification name="yang-library-update"> + <description> + <text>Generated when any YANG library information on the +server has changed.</text> + </description> + </notification> + <notification name="yang-library-change"> + <status value="deprecated"/> + <description> + <text>Generated when the set of modules and submodules supported +by the server has changed.</text> + </description> + <leaf name="module-set-id"> + <type name="leafref"> + <path value="/yanglib:modules-state/yanglib:module-set-id"/> + </type> + <mandatory value="true"/> + <status value="deprecated"/> + <description> + <text>Contains the module-set-id value representing the +set of modules and submodules supported at the server +at the time the notification is generated.</text> + </description> + </leaf> + </notification> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-metadata@2016-08-05.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-metadata@2016-08-05.yang new file mode 100644 index 00000000..b0b0961f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-metadata@2016-08-05.yang @@ -0,0 +1,83 @@ + + module ietf-yang-metadata { + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata"; + prefix md; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + + WG List: <mailto:netmod@ietf.org> + + WG Chair: Lou Berger + <mailto:lberger@labn.net> + + WG Chair: Kent Watsen + <mailto:kwatsen@juniper.net> + + Editor: Ladislav Lhotka + <mailto:lhotka@nic.cz>"; + description + "This YANG module defines an 'extension' statement that allows + for defining metadata annotations. + + Copyright (c) 2016 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7952 + (http://www.rfc-editor.org/info/rfc7952); see the RFC itself + for full legal notices."; + + revision 2016-08-05 { + description + "Initial revision."; + reference + "RFC 7952: Defining and Using Metadata with YANG"; + } + + extension annotation { + argument name; + description + "This extension allows for defining metadata annotations in + YANG modules. The 'md:annotation' statement can appear only + at the top level of a YANG module or submodule, i.e., it + becomes a new alternative in the ABNF production rule for + 'body-stmts' (Section 14 in RFC 7950). + + The argument of the 'md:annotation' statement defines the name + of the annotation. Syntactically, it is a YANG identifier as + defined in Section 6.2 of RFC 7950. + + An annotation defined with this 'extension' statement inherits + the namespace and other context from the YANG module in which + it is defined. + + The data type of the annotation value is specified in the same + way as for a leaf data node using the 'type' statement. + + The semantics of the annotation and other documentation can be + specified using the following standard YANG substatements (all + are optional): 'description', 'if-feature', 'reference', + 'status', and 'units'. + + A server announces support for a particular annotation by + including the module in which the annotation is defined among + the advertised YANG modules, e.g., in a NETCONF <hello> + message or in the YANG library (RFC 7950). The annotation can + then be attached to any instance of a data node defined in any + YANG module that is advertised by the server. + + XML encoding and JSON encoding of annotations are defined in + RFC 7952."; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-metadata@2016-08-05.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-metadata@2016-08-05.yin new file mode 100644 index 00000000..6b87e821 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-metadata@2016-08-05.yin @@ -0,0 +1,89 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-yang-metadata" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:md="urn:ietf:params:xml:ns:yang:ietf-yang-metadata"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-yang-metadata"/> + <prefix value="md"/> + <organization> + <text>IETF NETMOD (NETCONF Data Modeling Language) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;https://datatracker.ietf.org/wg/netmod/&gt; + +WG List: &lt;mailto:netmod@ietf.org&gt; + +WG Chair: Lou Berger + &lt;mailto:lberger@labn.net&gt; + +WG Chair: Kent Watsen + &lt;mailto:kwatsen@juniper.net&gt; + +Editor: Ladislav Lhotka + &lt;mailto:lhotka@nic.cz&gt;</text> + </contact> + <description> + <text>This YANG module defines an 'extension' statement that allows +for defining metadata annotations. + +Copyright (c) 2016 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject to +the license terms contained in, the Simplified BSD License set +forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 7952 +(http://www.rfc-editor.org/info/rfc7952); see the RFC itself +for full legal notices.</text> + </description> + <revision date="2016-08-05"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 7952: Defining and Using Metadata with YANG</text> + </reference> + </revision> + <extension name="annotation"> + <argument name="name"/> + <description> + <text>This extension allows for defining metadata annotations in +YANG modules. The 'md:annotation' statement can appear only +at the top level of a YANG module or submodule, i.e., it +becomes a new alternative in the ABNF production rule for +'body-stmts' (Section 14 in RFC 7950). + +The argument of the 'md:annotation' statement defines the name +of the annotation. Syntactically, it is a YANG identifier as +defined in Section 6.2 of RFC 7950. + +An annotation defined with this 'extension' statement inherits +the namespace and other context from the YANG module in which +it is defined. + +The data type of the annotation value is specified in the same +way as for a leaf data node using the 'type' statement. + +The semantics of the annotation and other documentation can be +specified using the following standard YANG substatements (all +are optional): 'description', 'if-feature', 'reference', +'status', and 'units'. + +A server announces support for a particular annotation by +including the module in which the annotation is defined among +the advertised YANG modules, e.g., in a NETCONF &lt;hello&gt; +message or in the YANG library (RFC 7950). The annotation can +then be attached to any instance of a data node defined in any +YANG module that is advertised by the server. + +XML encoding and JSON encoding of annotations are defined in +RFC 7952.</text> + </description> + </extension> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-types@2013-07-15.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-types@2013-07-15.yang new file mode 100644 index 00000000..f09381fb --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-types@2013-07-15.yang @@ -0,0 +1,455 @@ + + module ietf-yang-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix yang; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef object-identifier { + type string { + pattern "(([0-1](\\.[1-3]?[0-9]))|(2\\.(0|([1-9]\\d*))))(\\.(0|([1-9]\\d*)))*"; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern "\\d*(\\.\\d*){1,127}"; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern "[a-zA-Z_][a-zA-Z0-9\\-_.]*"; + pattern ".|..|[^xX].*|.[^mM].*|..[^lL].*"; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + typedef date-and-time { + type string { + pattern "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})"; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef phys-address { + type string { + pattern "([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?"; + } + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern "[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}"; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + typedef hex-string { + type string { + pattern "([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?"; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])"; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +} + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-types@2013-07-15.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-types@2013-07-15.yin new file mode 100644 index 00000000..07db8feb --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/ietf-yang-types@2013-07-15.yin @@ -0,0 +1,479 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="ietf-yang-types" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"> + <namespace uri="urn:ietf:params:xml:ns:yang:ietf-yang-types"/> + <prefix value="yang"/> + <organization> + <text>IETF NETMOD (NETCONF Data Modeling Language) Working Group</text> + </organization> + <contact> + <text>WG Web: &lt;http://tools.ietf.org/wg/netmod/&gt; +WG List: &lt;mailto:netmod@ietf.org&gt; + +WG Chair: David Kessens + &lt;mailto:david.kessens@nsn.com&gt; + +WG Chair: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt; + +Editor: Juergen Schoenwaelder + &lt;mailto:j.schoenwaelder@jacobs-university.de&gt;</text> + </contact> + <description> + <text>This module contains a collection of generally useful derived +YANG data types. + +Copyright (c) 2013 IETF Trust and the persons identified as +authors of the code. All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, is permitted pursuant to, and subject +to the license terms contained in, the Simplified BSD License +set forth in Section 4.c of the IETF Trust's Legal Provisions +Relating to IETF Documents +(http://trustee.ietf.org/license-info). + +This version of this YANG module is part of RFC 6991; see +the RFC itself for full legal notices.</text> + </description> + <revision date="2013-07-15"> + <description> + <text>This revision adds the following new data types: +- yang-identifier +- hex-string +- uuid +- dotted-quad</text> + </description> + <reference> + <text>RFC 6991: Common YANG Data Types</text> + </reference> + </revision> + <revision date="2010-09-24"> + <description> + <text>Initial revision.</text> + </description> + <reference> + <text>RFC 6021: Common YANG Data Types</text> + </reference> + </revision> + <typedef name="counter32"> + <type name="uint32"/> + <description> + <text>The counter32 type represents a non-negative integer +that monotonically increases until it reaches a +maximum value of 2^32-1 (4294967295 decimal), when it +wraps around and starts increasing again from zero. + +Counters have no defined 'initial' value, and thus, a +single value of a counter has (in general) no information +content. Discontinuities in the monotonically increasing +value normally occur at re-initialization of the +management system, and at other times as specified in the +description of a schema node using this type. If such +other times can occur, for example, the creation of +a schema node of type counter32 at times other than +re-initialization, then a corresponding schema node +should be defined, with an appropriate type, to indicate +the last discontinuity. + +The counter32 type should not be used for configuration +schema nodes. A default statement SHOULD NOT be used in +combination with the type counter32. + +In the value set and its semantics, this type is equivalent +to the Counter32 type of the SMIv2.</text> + </description> + <reference> + <text>RFC 2578: Structure of Management Information Version 2 + (SMIv2)</text> + </reference> + </typedef> + <typedef name="zero-based-counter32"> + <type name="yang:counter32"/> + <default value="0"/> + <description> + <text>The zero-based-counter32 type represents a counter32 +that has the defined 'initial' value zero. + +A schema node of this type will be set to zero (0) on creation +and will thereafter increase monotonically until it reaches +a maximum value of 2^32-1 (4294967295 decimal), when it +wraps around and starts increasing again from zero. + +Provided that an application discovers a new schema node +of this type within the minimum time to wrap, it can use the +'initial' value as a delta. It is important for a management +station to be aware of this minimum time and the actual time +between polls, and to discard data if the actual time is too +long or there is no defined minimum time. + +In the value set and its semantics, this type is equivalent +to the ZeroBasedCounter32 textual convention of the SMIv2.</text> + </description> + <reference> + <text>RFC 4502: Remote Network Monitoring Management Information + Base Version 2</text> + </reference> + </typedef> + <typedef name="counter64"> + <type name="uint64"/> + <description> + <text>The counter64 type represents a non-negative integer +that monotonically increases until it reaches a +maximum value of 2^64-1 (18446744073709551615 decimal), +when it wraps around and starts increasing again from zero. + +Counters have no defined 'initial' value, and thus, a +single value of a counter has (in general) no information +content. Discontinuities in the monotonically increasing +value normally occur at re-initialization of the +management system, and at other times as specified in the +description of a schema node using this type. If such +other times can occur, for example, the creation of +a schema node of type counter64 at times other than +re-initialization, then a corresponding schema node +should be defined, with an appropriate type, to indicate +the last discontinuity. + +The counter64 type should not be used for configuration +schema nodes. A default statement SHOULD NOT be used in +combination with the type counter64. + +In the value set and its semantics, this type is equivalent +to the Counter64 type of the SMIv2.</text> + </description> + <reference> + <text>RFC 2578: Structure of Management Information Version 2 + (SMIv2)</text> + </reference> + </typedef> + <typedef name="zero-based-counter64"> + <type name="yang:counter64"/> + <default value="0"/> + <description> + <text>The zero-based-counter64 type represents a counter64 that +has the defined 'initial' value zero. + +A schema node of this type will be set to zero (0) on creation +and will thereafter increase monotonically until it reaches +a maximum value of 2^64-1 (18446744073709551615 decimal), +when it wraps around and starts increasing again from zero. + +Provided that an application discovers a new schema node +of this type within the minimum time to wrap, it can use the +'initial' value as a delta. It is important for a management +station to be aware of this minimum time and the actual time +between polls, and to discard data if the actual time is too +long or there is no defined minimum time. + +In the value set and its semantics, this type is equivalent +to the ZeroBasedCounter64 textual convention of the SMIv2.</text> + </description> + <reference> + <text>RFC 2856: Textual Conventions for Additional High Capacity + Data Types</text> + </reference> + </typedef> + <typedef name="gauge32"> + <type name="uint32"/> + <description> + <text>The gauge32 type represents a non-negative integer, which +may increase or decrease, but shall never exceed a maximum +value, nor fall below a minimum value. The maximum value +cannot be greater than 2^32-1 (4294967295 decimal), and +the minimum value cannot be smaller than 0. The value of +a gauge32 has its maximum value whenever the information +being modeled is greater than or equal to its maximum +value, and has its minimum value whenever the information +being modeled is smaller than or equal to its minimum value. +If the information being modeled subsequently decreases +below (increases above) the maximum (minimum) value, the +gauge32 also decreases (increases). + +In the value set and its semantics, this type is equivalent +to the Gauge32 type of the SMIv2.</text> + </description> + <reference> + <text>RFC 2578: Structure of Management Information Version 2 + (SMIv2)</text> + </reference> + </typedef> + <typedef name="gauge64"> + <type name="uint64"/> + <description> + <text>The gauge64 type represents a non-negative integer, which +may increase or decrease, but shall never exceed a maximum +value, nor fall below a minimum value. The maximum value +cannot be greater than 2^64-1 (18446744073709551615), and +the minimum value cannot be smaller than 0. The value of +a gauge64 has its maximum value whenever the information +being modeled is greater than or equal to its maximum +value, and has its minimum value whenever the information +being modeled is smaller than or equal to its minimum value. +If the information being modeled subsequently decreases +below (increases above) the maximum (minimum) value, the +gauge64 also decreases (increases). + +In the value set and its semantics, this type is equivalent +to the CounterBasedGauge64 SMIv2 textual convention defined +in RFC 2856</text> + </description> + <reference> + <text>RFC 2856: Textual Conventions for Additional High Capacity + Data Types</text> + </reference> + </typedef> + <typedef name="object-identifier"> + <type name="string"> + <pattern value="(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))(\.(0|([1-9]\d*)))*"/> + </type> + <description> + <text>The object-identifier type represents administratively +assigned names in a registration-hierarchical-name tree. + +Values of this type are denoted as a sequence of numerical +non-negative sub-identifier values. Each sub-identifier +value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers +are separated by single dots and without any intermediate +whitespace. + +The ASN.1 standard restricts the value space of the first +sub-identifier to 0, 1, or 2. Furthermore, the value space +of the second sub-identifier is restricted to the range +0 to 39 if the first sub-identifier is 0 or 1. Finally, +the ASN.1 standard requires that an object identifier +has always at least two sub-identifiers. The pattern +captures these restrictions. + +Although the number of sub-identifiers is not limited, +module designers should realize that there may be +implementations that stick with the SMIv2 limit of 128 +sub-identifiers. + +This type is a superset of the SMIv2 OBJECT IDENTIFIER type +since it is not restricted to 128 sub-identifiers. Hence, +this type SHOULD NOT be used to represent the SMIv2 OBJECT +IDENTIFIER type; the object-identifier-128 type SHOULD be +used instead.</text> + </description> + <reference> + <text>ISO9834-1: Information technology -- Open Systems +Interconnection -- Procedures for the operation of OSI +Registration Authorities: General procedures and top +arcs of the ASN.1 Object Identifier tree</text> + </reference> + </typedef> + <typedef name="object-identifier-128"> + <type name="object-identifier"> + <pattern value="\d*(\.\d*){1,127}"/> + </type> + <description> + <text>This type represents object-identifiers restricted to 128 +sub-identifiers. + +In the value set and its semantics, this type is equivalent +to the OBJECT IDENTIFIER type of the SMIv2.</text> + </description> + <reference> + <text>RFC 2578: Structure of Management Information Version 2 + (SMIv2)</text> + </reference> + </typedef> + <typedef name="yang-identifier"> + <type name="string"> + <length value="1..max"/> + <pattern value="[a-zA-Z_][a-zA-Z0-9\-_.]*"/> + <pattern value=".|..|[^xX].*|.[^mM].*|..[^lL].*"/> + </type> + <description> + <text>A YANG identifier string as defined by the 'identifier' +rule in Section 12 of RFC 6020. An identifier must +start with an alphabetic character or an underscore +followed by an arbitrary sequence of alphabetic or +numeric characters, underscores, hyphens, or dots. + +A YANG identifier MUST NOT start with any possible +combination of the lowercase or uppercase character +sequence 'xml'.</text> + </description> + <reference> + <text>RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)</text> + </reference> + </typedef> + <typedef name="date-and-time"> + <type name="string"> + <pattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-]\d{2}:\d{2})"/> + </type> + <description> + <text>The date-and-time type is a profile of the ISO 8601 +standard for representation of dates and times using the +Gregorian calendar. The profile is defined by the +date-time production in Section 5.6 of RFC 3339. + +The date-and-time type is compatible with the dateTime XML +schema type with the following notable exceptions: + +(a) The date-and-time type does not allow negative years. + +(b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + +(c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + +This type is not equivalent to the DateAndTime textual +convention of the SMIv2 since RFC 3339 uses a different +separator between full-date and full-time and provides +higher resolution of time-secfrac. + +The canonical format for date-and-time values with a known time +zone uses a numeric time zone offset that is calculated using +the device's configured known offset to UTC time. A change of +the device's offset to UTC time will cause date-and-time values +to change accordingly. Such changes might happen periodically +in case a server follows automatically daylight saving time +(DST) time zone offset changes. The canonical format for +date-and-time values with an unknown time zone (usually +referring to the notion of local time) uses the time-offset +-00:00.</text> + </description> + <reference> + <text>RFC 3339: Date and Time on the Internet: Timestamps +RFC 2579: Textual Conventions for SMIv2 +XSD-TYPES: XML Schema Part 2: Datatypes Second Edition</text> + </reference> + </typedef> + <typedef name="timeticks"> + <type name="uint32"/> + <description> + <text>The timeticks type represents a non-negative integer that +represents the time, modulo 2^32 (4294967296 decimal), in +hundredths of a second between two epochs. When a schema +node is defined that uses this type, the description of +the schema node identifies both of the reference epochs. + +In the value set and its semantics, this type is equivalent +to the TimeTicks type of the SMIv2.</text> + </description> + <reference> + <text>RFC 2578: Structure of Management Information Version 2 + (SMIv2)</text> + </reference> + </typedef> + <typedef name="timestamp"> + <type name="yang:timeticks"/> + <description> + <text>The timestamp type represents the value of an associated +timeticks schema node at which a specific occurrence +happened. The specific occurrence must be defined in the +description of any schema node defined using this type. When +the specific occurrence occurred prior to the last time the +associated timeticks attribute was zero, then the timestamp +value is zero. Note that this requires all timestamp values +to be reset to zero when the value of the associated timeticks +attribute reaches 497+ days and wraps around to zero. + +The associated timeticks schema node must be specified +in the description of any schema node using this type. + +In the value set and its semantics, this type is equivalent +to the TimeStamp textual convention of the SMIv2.</text> + </description> + <reference> + <text>RFC 2579: Textual Conventions for SMIv2</text> + </reference> + </typedef> + <typedef name="phys-address"> + <type name="string"> + <pattern value="([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?"/> + </type> + <description> + <text>Represents media- or physical-level addresses represented +as a sequence octets, each octet represented by two hexadecimal +numbers. Octets are separated by colons. The canonical +representation uses lowercase characters. + +In the value set and its semantics, this type is equivalent +to the PhysAddress textual convention of the SMIv2.</text> + </description> + <reference> + <text>RFC 2579: Textual Conventions for SMIv2</text> + </reference> + </typedef> + <typedef name="mac-address"> + <type name="string"> + <pattern value="[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}"/> + </type> + <description> + <text>The mac-address type represents an IEEE 802 MAC address. +The canonical representation uses lowercase characters. + +In the value set and its semantics, this type is equivalent +to the MacAddress textual convention of the SMIv2.</text> + </description> + <reference> + <text>IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture +RFC 2579: Textual Conventions for SMIv2</text> + </reference> + </typedef> + <typedef name="xpath1.0"> + <type name="string"/> + <description> + <text>This type represents an XPATH 1.0 expression. + +When a schema node is defined that uses this type, the +description of the schema node MUST specify the XPath +context in which the XPath expression is evaluated.</text> + </description> + <reference> + <text>XPATH: XML Path Language (XPath) Version 1.0</text> + </reference> + </typedef> + <typedef name="hex-string"> + <type name="string"> + <pattern value="([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?"/> + </type> + <description> + <text>A hexadecimal string with octets represented as hex digits +separated by colons. The canonical representation uses +lowercase characters.</text> + </description> + </typedef> + <typedef name="uuid"> + <type name="string"> + <pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/> + </type> + <description> + <text>A Universally Unique IDentifier in the string representation +defined in RFC 4122. The canonical representation uses +lowercase characters. + +The following is an example of a UUID in string representation: +f81d4fae-7dec-11d0-a765-00a0c91e6bf6 +</text> + </description> + <reference> + <text>RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace</text> + </reference> + </typedef> + <typedef name="dotted-quad"> + <type name="string"> + <pattern value="(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])"/> + </type> + <description> + <text>An unsigned 32-bit number expressed in the dotted-quad +notation, i.e., four octets written as decimal numbers +and separated with the '.' (full stop) character.</text> + </description> + </typedef> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/response.groovy new file mode 100644 index 00000000..2d42afd6 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/response.groovy @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +println "lock!" +return "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> "; \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/response.xml new file mode 100644 index 00000000..a2909ffe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/response.xml @@ -0,0 +1,3 @@ +> + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/system/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/system/response.xml new file mode 100644 index 00000000..46ba494f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/system/response.xml @@ -0,0 +1,7 @@ +> + + + aaaaa + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/turing-machine/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/turing-machine/response.xml new file mode 100644 index 00000000..4a659af3 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/lock/NA/turing-machine/response.xml @@ -0,0 +1,76 @@ +> + + + + + + + 4 + 1 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/nc-notifications@2008-07-14.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/nc-notifications@2008-07-14.yang new file mode 100644 index 00000000..bdbd000c --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/nc-notifications@2008-07-14.yang @@ -0,0 +1,96 @@ + + module nc-notifications { + namespace "urn:ietf:params:xml:ns:netmod:notification"; + prefix manageEvent; + + import ietf-yang-types { + prefix yang; + } + + import notifications { + prefix ncEvent; + } + + organization + "IETF NETCONF WG"; + contact + "netconf@ietf.org"; + description + "Conversion of the 'manageEvent' XSD in the NETCONF + Notifications RFC."; + reference + "RFC 5277"; + + revision 2008-07-14 { + description + "RFC 5277 version."; + } + + container netconf { + config false; + description + "Top-level element in the notification namespace"; + container streams { + description + "The list of event streams supported by the system. When + a query is issued, the returned set of streams is + determined based on user privileges."; + list stream { + key "name"; + min-elements 1; + description + "Stream name, description and other information."; + leaf name { + type ncEvent:streamNameType; + description + "The name of the event stream. If this is the default + NETCONF stream, this must have the value 'NETCONF'."; + } + + leaf description { + type string; + mandatory true; + description + "A description of the event stream, including such + information as the type of events that are sent over + this stream."; + } + + leaf replaySupport { + type boolean; + mandatory true; + description + "A description of the event stream, including such + information as the type of events that are sent over + this stream."; + } + + leaf replayLogCreationTime { + type yang:date-and-time; + description + "The timestamp of the creation of the log used to support + the replay function on this stream. Note that this might + be earlier then the earliest available notification in + the log. This object is updated if the log resets for + some reason. This object MUST be present if replay is + supported."; + } + } + } + } + + notification replayComplete { + description + "This notification is sent to signal the end of a replay + portion of a subscription."; + } + + notification notificationComplete { + description + "This notification is sent to signal the end of a notification + subscription. It is sent in the case that stopTime was + specified during the creation of the subscription.."; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/nc-notifications@2008-07-14.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/nc-notifications@2008-07-14.yin new file mode 100644 index 00000000..5f063a03 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/nc-notifications@2008-07-14.yin @@ -0,0 +1,105 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="nc-notifications" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:manageEvent="urn:ietf:params:xml:ns:netmod:notification" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types" + xmlns:ncEvent="urn:ietf:params:xml:ns:netconf:notification:1.0"> + <namespace uri="urn:ietf:params:xml:ns:netmod:notification"/> + <prefix value="manageEvent"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + </import> + <import module="notifications"> + <prefix value="ncEvent"/> + </import> + <organization> + <text>IETF NETCONF WG</text> + </organization> + <contact> + <text>netconf@ietf.org</text> + </contact> + <description> + <text>Conversion of the 'manageEvent' XSD in the NETCONF +Notifications RFC.</text> + </description> + <reference> + <text>RFC 5277</text> + </reference> + <revision date="2008-07-14"> + <description> + <text>RFC 5277 version.</text> + </description> + </revision> + <container name="netconf"> + <config value="false"/> + <description> + <text>Top-level element in the notification namespace</text> + </description> + <container name="streams"> + <description> + <text>The list of event streams supported by the system. When +a query is issued, the returned set of streams is +determined based on user privileges.</text> + </description> + <list name="stream"> + <key value="name"/> + <min-elements value="1"/> + <description> + <text>Stream name, description and other information.</text> + </description> + <leaf name="name"> + <type name="ncEvent:streamNameType"/> + <description> + <text>The name of the event stream. If this is the default +NETCONF stream, this must have the value 'NETCONF'.</text> + </description> + </leaf> + <leaf name="description"> + <type name="string"/> + <mandatory value="true"/> + <description> + <text>A description of the event stream, including such +information as the type of events that are sent over +this stream.</text> + </description> + </leaf> + <leaf name="replaySupport"> + <type name="boolean"/> + <mandatory value="true"/> + <description> + <text>A description of the event stream, including such +information as the type of events that are sent over +this stream.</text> + </description> + </leaf> + <leaf name="replayLogCreationTime"> + <type name="yang:date-and-time"/> + <description> + <text>The timestamp of the creation of the log used to support +the replay function on this stream. Note that this might +be earlier then the earliest available notification in +the log. This object is updated if the log resets for +some reason. This object MUST be present if replay is +supported.</text> + </description> + </leaf> + </list> + </container> + </container> + <notification name="replayComplete"> + <description> + <text>This notification is sent to signal the end of a replay +portion of a subscription.</text> + </description> + </notification> + <notification name="notificationComplete"> + <description> + <text>This notification is sent to signal the end of a notification +subscription. It is sent in the case that stopTime was +specified during the creation of the subscription..</text> + </description> + </notification> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/notifications@2008-07-14.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/notifications@2008-07-14.yang new file mode 100644 index 00000000..9dce5110 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/notifications@2008-07-14.yang @@ -0,0 +1,92 @@ + + module notifications { + namespace "urn:ietf:params:xml:ns:netconf:notification:1.0"; + prefix ncEvent; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETCONF WG"; + contact + "netconf@ops.ietf.org"; + description + "Conversion of the 'ncEvent' XSD in the + NETCONF Notifications RFC."; + reference + "RFC 5277."; + + revision 2008-07-14 { + description + "RFC 5277 version."; + } + + typedef streamNameType { + type string; + description + "The name of an event stream."; + } + + container notification { + config false; + description + "internal struct to start a notification"; + leaf eventTime { + type yang:date-and-time; + mandatory true; + } + } + + rpc create-subscription { + description + "The command to create a notification subscription. It + takes as argument the name of the notification stream + and filter. Both of those options limit the content of + the subscription. In addition, there are two time-related + parameters, startTime and stopTime, which can be used to + select the time interval of interest to the notification + replay feature."; + input { + leaf stream { + type streamNameType; + default "NETCONF"; + description + "An optional parameter that indicates which stream of events + is of interest. If not present, then events in the default + NETCONF stream will be sent."; + } + + anyxml filter { + description + "An optional parameter that indicates which subset of all + possible events is of interest. The format of this + parameter is the same as that of the filter parameter + in the NETCONF protocol operations. If not present, + all events not precluded by other parameters will + be sent."; + } + + leaf startTime { + type yang:date-and-time; + description + "A parameter used to trigger the replay feature and + indicates that the replay should start at the time + specified. If start time is not present, this is not a + replay subscription."; + } + + leaf stopTime { + type yang:date-and-time; + description + "An optional parameter used with the optional replay + feature to indicate the newest notifications of + interest. If stop time is not present, the notifications + will continue until the subscription is terminated. + Must be used with startTime."; + } + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/notifications@2008-07-14.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/notifications@2008-07-14.yin new file mode 100644 index 00000000..3633d0f1 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/notifications@2008-07-14.yin @@ -0,0 +1,99 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="notifications" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:ncEvent="urn:ietf:params:xml:ns:netconf:notification:1.0" + xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"> + <namespace uri="urn:ietf:params:xml:ns:netconf:notification:1.0"/> + <prefix value="ncEvent"/> + <import module="ietf-yang-types"> + <prefix value="yang"/> + </import> + <organization> + <text>IETF NETCONF WG</text> + </organization> + <contact> + <text>netconf@ops.ietf.org</text> + </contact> + <description> + <text>Conversion of the 'ncEvent' XSD in the +NETCONF Notifications RFC.</text> + </description> + <reference> + <text>RFC 5277.</text> + </reference> + <revision date="2008-07-14"> + <description> + <text>RFC 5277 version.</text> + </description> + </revision> + <typedef name="streamNameType"> + <type name="string"/> + <description> + <text>The name of an event stream.</text> + </description> + </typedef> + <container name="notification"> + <config value="false"/> + <description> + <text>internal struct to start a notification</text> + </description> + <leaf name="eventTime"> + <type name="yang:date-and-time"/> + <mandatory value="true"/> + </leaf> + </container> + <rpc name="create-subscription"> + <description> + <text>The command to create a notification subscription. It +takes as argument the name of the notification stream +and filter. Both of those options limit the content of +the subscription. In addition, there are two time-related +parameters, startTime and stopTime, which can be used to +select the time interval of interest to the notification +replay feature.</text> + </description> + <input> + <leaf name="stream"> + <type name="streamNameType"/> + <default value="NETCONF"/> + <description> + <text>An optional parameter that indicates which stream of events +is of interest. If not present, then events in the default +NETCONF stream will be sent.</text> + </description> + </leaf> + <anyxml name="filter"> + <description> + <text>An optional parameter that indicates which subset of all +possible events is of interest. The format of this +parameter is the same as that of the filter parameter +in the NETCONF protocol operations. If not present, +all events not precluded by other parameters will +be sent.</text> + </description> + </anyxml> + <leaf name="startTime"> + <type name="yang:date-and-time"/> + <description> + <text>A parameter used to trigger the replay feature and +indicates that the replay should start at the time +specified. If start time is not present, this is not a +replay subscription.</text> + </description> + </leaf> + <leaf name="stopTime"> + <type name="yang:date-and-time"/> + <description> + <text>An optional parameter used with the optional replay +feature to indicate the newest notifications of +interest. If stop time is not present, the notifications +will continue until the subscription is terminated. +Must be used with startTime.</text> + </description> + </leaf> + </input> + </rpc> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/rpc-reply.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/rpc-reply.xml new file mode 100644 index 00000000..c5ca49bd --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/rpc-reply.xml @@ -0,0 +1,76 @@ +> + + + + + + + 3 + 1 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/response.groovy new file mode 100644 index 00000000..b2be5fdb --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/response.groovy @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +println "run-until!" +return "\" xmlns=\"http://example.net/turing-machine\"> 12true"; diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/response.xml new file mode 100644 index 00000000..a2909ffe --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/response.xml @@ -0,0 +1,3 @@ +> + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/system/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/system/response.xml new file mode 100644 index 00000000..46ba494f --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/system/response.xml @@ -0,0 +1,7 @@ +> + + + aaaaa + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/turing-machine/response.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/turing-machine/response.xml new file mode 100644 index 00000000..4a659af3 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/run-until/NA/turing-machine/response.xml @@ -0,0 +1,76 @@ +> + + + + + + + 4 + 1 + + + 0 + 0 + + + + + + left + + + 3 + 1 + + + + + + 3 + left + 0 + + + 2 + 1 + + + + + + 1 + 1 + + + + + + 0 + 1 + + + + + + 2 + left + + + 1 + + + + + + + 4 + + + 3 + + + + + + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/schema-reply-template.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/schema-reply-template.xml new file mode 100644 index 00000000..b063f8ee --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/schema-reply-template.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/schema-reply.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/schema-reply.xml new file mode 100644 index 00000000..8d2c318a --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/schema-reply.xml @@ -0,0 +1,270 @@ + + +module turing-machine { + namespace "http://example.net/turing-machine"; + prefix tm; + + description + "Data model for the Turing Machine."; + + revision 2013-12-27 { + description + "Initial revision."; + } + + typedef tape-symbol { + type string { + length "0..1"; + } + description + "Type of symbols appearing in tape cells. + + A blank is represented as an empty string where necessary."; + } + + typedef cell-index { + type int64; + description + "Type for indexing tape cells."; + } + + typedef state-index { + type uint16; + description + "Type for indexing states of the control unit."; + } + + typedef head-dir { + type enumeration { + enum "left"; + enum "right"; + } + default "right"; + description + "Possible directions for moving the read/write head, one cell + to the left or right (default)."; + } + + grouping tape-cells { + description + "The tape of the Turing Machine is represented as a sparse + array."; + list cell { + key "coord"; + description + "List of non-blank cells."; + leaf coord { + type cell-index; + description + "Coordinate (index) of the tape cell."; + } + + leaf symbol { + type tape-symbol { + length "1"; + } + description + "Symbol appearing in the tape cell. + + Blank (empty string) is not allowed here because the + 'cell' list only contains non-blank cells."; + } + } + } + + container turing-machine { + description + "State data and configuration of a Turing Machine."; + leaf state { + type state-index; + config false; + mandatory true; + description + "Current state of the control unit. + + The initial state is 0."; + } + + leaf head-position { + type cell-index; + config false; + mandatory true; + description + "Position of tape read/write head."; + } + + container tape { + config false; + description + "The contents of the tape."; + uses tape-cells; + } + + container transition-function { + description + "The Turing Machine is configured by specifying the + transition function."; + list delta { + key "label"; + unique "input/state input/symbol"; + description + "The list of transition rules."; + leaf label { + type string; + description + "An arbitrary label of the transition rule."; + } + + container input { + description + "Input parameters (arguments) of the transition rule."; + leaf state { + type state-index; + mandatory true; + description + "Current state of the control unit."; + } + + leaf symbol { + type tape-symbol; + mandatory true; + description + "Symbol read from the tape cell."; + } + } + + container output { + description + "Output values of the transition rule."; + leaf state { + type state-index; + description + "New state of the control unit. If this leaf is not + present, the state doesn't change."; + } + + leaf symbol { + type tape-symbol; + description + "Symbol to be written to the tape cell. If this leaf is + not present, the symbol doesn't change."; + } + + leaf head-move { + type head-dir; + description + "Move the head one cell to the left or right"; + } + } + } + } + } + + rpc initialize { + description + "Initialize the Turing Machine as follows: + + 1. Put the control unit into the initial state (0). + + 2. Move the read/write head to the tape cell with coordinate + zero. + + 3. Write the string from the 'tape-content' input parameter to + the tape, character by character, starting at cell 0. The + tape is othewise empty."; + input { + leaf tape-content { + type string; + default ""; + description + "The string with which the tape shall be initialized. The + leftmost symbol will be at tape coordinate 0."; + } + } + } + + rpc run { + description + "Start the Turing Machine operation."; + } + + rpc run-until { + description + "Start the Turing Machine operation and let it run until it is halted + or ALL the defined breakpoint conditions are satisfied."; + input { + leaf state { + type state-index; + description + "What state the control unit has to be at for the execution to be paused."; + } + + leaf head-position { + type cell-index; + description + "Position of tape read/write head for which the breakpoint applies."; + } + + container tape { + description + "What content the tape has to have for the breakpoint to apply."; + uses tape-cells; + } + } + + output { + leaf step-count { + type uint64; + description + "The number of steps executed since the last 'run-until' call."; + } + + leaf halted { + type boolean; + description + "'True' if the Turing machine is halted, 'false' if it is only paused."; + } + } + } + + notification halted { + description + "The Turing Machine has halted. This means that there is no + transition rule for the current state and tape symbol."; + leaf state { + type state-index; + mandatory true; + description + "The state of the control unit in which the machine has + halted."; + } + } + + notification paused { + description + "The Turing machine has reached a breakpoint and was paused."; + leaf state { + type state-index; + mandatory true; + description + "State of the control unit in which the machine was paused."; + } + + leaf head-position { + type cell-index; + mandatory true; + description + "Position of tape read/write head when the machine was paused."; + } + + container tape { + description + "Content of the tape when the machine was paused."; + uses tape-cells; + } + } +} + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/schema.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/schema.xml new file mode 100644 index 00000000..82b2c5d4 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/schema.xml @@ -0,0 +1,359 @@ + + + + + + + RCAPoCModel + 2017-04-27 + yang + urn:opendaylight:params:xml:ns:yang:oripWnc + NETCONF + + + RCAPoCModel + 2017-04-27 + yin + urn:opendaylight:params:xml:ns:yang:oripWnc + NETCONF + + + ietf-yang-metadata + 2016-08-05 + yang + urn:ietf:params:xml:ns:yang:ietf-yang-metadata + NETCONF + + + ietf-yang-metadata + 2016-08-05 + yin + urn:ietf:params:xml:ns:yang:ietf-yang-metadata + NETCONF + + + yang + 2017-02-20 + yang + urn:ietf:params:xml:ns:yang:1 + NETCONF + + + yang + 2017-02-20 + yin + urn:ietf:params:xml:ns:yang:1 + NETCONF + + + ietf-inet-types + 2013-07-15 + yang + urn:ietf:params:xml:ns:yang:ietf-inet-types + NETCONF + + + ietf-inet-types + 2013-07-15 + yin + urn:ietf:params:xml:ns:yang:ietf-inet-types + NETCONF + + + ietf-yang-types + 2013-07-15 + yang + urn:ietf:params:xml:ns:yang:ietf-yang-types + NETCONF + + + ietf-yang-types + 2013-07-15 + yin + urn:ietf:params:xml:ns:yang:ietf-yang-types + NETCONF + + + ietf-datastores + 2017-08-17 + yang + urn:ietf:params:xml:ns:yang:ietf-datastores + NETCONF + + + ietf-datastores + 2017-08-17 + yin + urn:ietf:params:xml:ns:yang:ietf-datastores + NETCONF + + + ietf-yang-library + 2017-08-17 + yang + urn:ietf:params:xml:ns:yang:ietf-yang-library + NETCONF + + + ietf-yang-library + 2017-08-17 + yin + urn:ietf:params:xml:ns:yang:ietf-yang-library + NETCONF + + + ietf-netconf-acm + 2012-02-22 + yang + urn:ietf:params:xml:ns:yang:ietf-netconf-acm + NETCONF + + + ietf-netconf-acm + 2012-02-22 + yin + urn:ietf:params:xml:ns:yang:ietf-netconf-acm + NETCONF + + + ietf-netconf + 2011-06-01 + yang + urn:ietf:params:xml:ns:netconf:base:1.0 + NETCONF + + + ietf-netconf + 2011-06-01 + yin + urn:ietf:params:xml:ns:netconf:base:1.0 + NETCONF + + + ietf-netconf-notifications + 2012-02-06 + yang + urn:ietf:params:xml:ns:yang:ietf-netconf-notifications + NETCONF + + + ietf-netconf-notifications + 2012-02-06 + yin + urn:ietf:params:xml:ns:yang:ietf-netconf-notifications + NETCONF + + + notifications + 2008-07-14 + yang + urn:ietf:params:xml:ns:netconf:notification:1.0 + NETCONF + + + notifications + 2008-07-14 + yin + urn:ietf:params:xml:ns:netconf:notification:1.0 + NETCONF + + + nc-notifications + 2008-07-14 + yang + urn:ietf:params:xml:ns:netmod:notification + NETCONF + + + nc-notifications + 2008-07-14 + yin + urn:ietf:params:xml:ns:netmod:notification + NETCONF + + + turing-machine + 2013-12-27 + yang + http://example.net/turing-machine + NETCONF + + + turing-machine + 2013-12-27 + yin + http://example.net/turing-machine + NETCONF + + + ietf-interfaces + 2014-05-08 + yang + urn:ietf:params:xml:ns:yang:ietf-interfaces + NETCONF + + + ietf-interfaces + 2014-05-08 + yin + urn:ietf:params:xml:ns:yang:ietf-interfaces + NETCONF + + + iana-if-type + 2014-05-08 + yang + urn:ietf:params:xml:ns:yang:iana-if-type + NETCONF + + + iana-if-type + 2014-05-08 + yin + urn:ietf:params:xml:ns:yang:iana-if-type + NETCONF + + + ietf-ip + 2014-06-16 + yang + urn:ietf:params:xml:ns:yang:ietf-ip + NETCONF + + + ietf-ip + 2014-06-16 + yin + urn:ietf:params:xml:ns:yang:ietf-ip + NETCONF + + + ietf-x509-cert-to-name + 2014-12-10 + yang + urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name + NETCONF + + + ietf-x509-cert-to-name + 2014-12-10 + yin + urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name + NETCONF + + + ietf-keystore + 2016-10-31 + yang + urn:ietf:params:xml:ns:yang:ietf-keystore + NETCONF + + + ietf-keystore + 2016-10-31 + yin + urn:ietf:params:xml:ns:yang:ietf-keystore + NETCONF + + + ietf-ssh-server + 2016-11-02 + yang + urn:ietf:params:xml:ns:yang:ietf-ssh-server + NETCONF + + + ietf-ssh-server + 2016-11-02 + yin + urn:ietf:params:xml:ns:yang:ietf-ssh-server + NETCONF + + + ietf-tls-server + 2016-11-02 + yang + urn:ietf:params:xml:ns:yang:ietf-tls-server + NETCONF + + + ietf-tls-server + 2016-11-02 + yin + urn:ietf:params:xml:ns:yang:ietf-tls-server + NETCONF + + + ietf-netconf-server + 2016-11-02 + yang + urn:ietf:params:xml:ns:yang:ietf-netconf-server + NETCONF + + + ietf-netconf-server + 2016-11-02 + yin + urn:ietf:params:xml:ns:yang:ietf-netconf-server + NETCONF + + + iana-crypt-hash + 2014-08-06 + yang + urn:ietf:params:xml:ns:yang:iana-crypt-hash + NETCONF + + + iana-crypt-hash + 2014-08-06 + yin + urn:ietf:params:xml:ns:yang:iana-crypt-hash + NETCONF + + + ietf-system + 2014-08-06 + yang + urn:ietf:params:xml:ns:yang:ietf-system + NETCONF + + + ietf-system + 2014-08-06 + yin + urn:ietf:params:xml:ns:yang:ietf-system + NETCONF + + + ietf-netconf-monitoring + 2010-10-04 + yang + urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring + NETCONF + + + ietf-netconf-monitoring + 2010-10-04 + yin + urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring + NETCONF + + + ietf-netconf-with-defaults + 2011-06-01 + yang + urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults + NETCONF + + + ietf-netconf-with-defaults + 2011-06-01 + yin + urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults + NETCONF + + + + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/schema2.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/schema2.xml new file mode 100644 index 00000000..ae0f4f6d --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/schema2.xml @@ -0,0 +1,17 @@ + + + + + + + bar + 2008-06-01 + yang + http://example.com/bar + NETCONF + + + + + +]]>]]> \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/schema3.xml b/vnfs/TestVNF/netconftemplates/netconftemplates/schema3.xml new file mode 100644 index 00000000..b288276a --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/schema3.xml @@ -0,0 +1,197 @@ + + +module toaster { + + namespace "http://netconfcentral.org/ns/toaster"; + + prefix "toast"; + + organization + "Netconf Central"; + + contact + "Andy Bierman "; + + description + "YANG version of the TOASTER-MIB."; + + + revision 2009-11-20 { + description "Toaster module in progress."; + } + + identity toast-type { + description + "Base for all bread types supported by the toaster. + New bread types not listed here nay be added in the + future."; + } + + identity white-bread { + description + "White bread."; + base toast:toast-type; + } + + identity wheat-bread { + description + "Wheat bread."; + base toast-type; + } + + identity wonder-bread { + description + "Wonder bread."; + base toast-type; + } + + identity frozen-waffle { + description + "Frozen waffle."; + base toast-type; + } + + identity frozen-bagel { + description + "Frozen bagel."; + base toast-type; + } + + identity hash-brown { + description + "Hash browned potatos."; + base toast-type; + } + + typedef DisplayString { + description + "YANG version of the SMIv2 DisplayString TEXTUAL-CONVENTION."; + reference "RFC 2579, section 2."; + type string { + length "0 .. 255"; + } + } + + container toaster { + presence + "Indicates the toaster service is available"; + + description + "Top-level container for all toaster database objects."; + + leaf toasterManufacturer { + type DisplayString; + config false; + mandatory true; + description + "The name of the toaster's manufacturer. For instance, + Microsoft Toaster."; + } + + leaf toasterModelNumber { + type DisplayString; + config false; + mandatory true; + description + "The name of the toaster's model. For instance, + Radiant Automatic."; + } + + leaf toasterStatus { + type enumeration { + enum up { + value 1; + description + "The toaster knob position is up. + No toast is being made now."; + } + enum down { + value 2; + description + "The toaster knob position is down. + Toast is being made now."; + + } + } + config false; + mandatory true; + description + "This variable indicates the current state of + the toaster."; + } + } + + rpc make-toast { + description + "Make some toast. + The toastDone notification will be sent when + the toast is finished. + An 'in-use' error will be returned if toast + is already being made. + A 'resource-denied' error will be returned + if the toaster service is disabled."; + input { + leaf toasterDoneness { + type uint32 { + range "1 .. 10"; + } + default 5; + description + "This variable controls how well-done is the + ensuing toast. It should be on a scale of 1 to 10. + Toast made at 10 generally is considered unfit + for human consumption; toast made at 1 is warmed + lightly."; + } + leaf toasterToastType { + type identityref { + base toast:toast-type; + } + default toast:wheat-bread; + description + "This variable informs the toaster of the type of + material that is being toasted. The toaster + uses this information, combined with + toasterDoneness, to compute for how + long the material must be toasted to achieve + the required doneness."; + } + } + } + + rpc cancel-toast { + description + "Stop making toast, if any is being made. + A 'resource-denied' error will be returned + if the toaster service is disabled."; + } + + notification toastDone { + description + "Indicates that the toast in progress has completed."; + + leaf toastStatus { + description + "Indicates the final toast status"; + type enumeration { + enum done { + description + "The toast is done."; + } + enum cancelled { + description + "The toast was cancelled."; + } + enum error { + description + "The toaster service was disabled or + the toaster is broken."; + } + } + } + } +} + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/send-event-schema.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/send-event-schema.yang new file mode 100644 index 00000000..ffc5b6d2 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/send-event-schema.yang @@ -0,0 +1,19 @@ + + + rpc send-event { + description + "The <send-event> operation takes in a content in JSON format and sends the entire content to the specified target address."; + + container config { + leaf target-name { + type string; + description "name of the target to which the content is to be sent"; + } + } + leaf content { + type string; + description "JSON string to be sent"; + } + } + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/send-event/NA/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/send-event/NA/response.groovy new file mode 100644 index 00000000..dbd1c0aa --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/send-event/NA/response.groovy @@ -0,0 +1,94 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +import com.ericsson.testvnf.server.models.RpcData; +import groovy.sql.Sql; +import groovy.util.XmlParser +import java.util.logging.Logger; +Logger logger = Logger.getLogger("") + +println "send-event!" +def RpcData data = binding.getVariable("RpcData") +result = "ignore" +try{ + def operationsData = new XmlParser().parseText(data.getOperationTagContent()) + println "operations data::::" + operationsData + + def targetName + if (!operationsData.config.'target-name'.isEmpty()){ + targetName = operationsData.config.'target-name'.text() + println "target-name ::::" + operationsData.config.'target-name'.text() + + logger.info("in the groovy file. going to open a database session.") + def db = [url: "jdbc:mariadb://localhost:3306/netconf_db?useSSL=false", + user: "root", password: "root", driver: 'org.mariadb.jdbc.Driver'] + // def db = [url: "jdbc:mariadb://mariadb:3306/netconf_db?useSSL=false", + // user: "root", password: "root", driver: 'org.mariadb.jdbc.Driver'] + def sql = Sql.newInstance(db.url, db.user, db.password, db.driver) + println "DB connection ready" + logger.info("DB connection ready") + def metadata = sql.connection.getMetaData() + def tables = metadata.getTables(null, null, "AddressTable", null) + def targetURL = "" + if (!tables.next()) { + logger.info("table not found"); + println "table not found" + sql.execute("CREATE TABLE AddressTable (Name varchar(255), HTTPAddress varchar(255), PRIMARY KEY (Name))") + }else{ + def query = "select HTTPAddress from AddressTable where Name=\"".concat(targetName).concat("\"") + println "query" + query + logger.info(query) + sql.eachRow(query, { res -> + println "sending JSON data to "+res.HTTPAddress + targetURL = res.HTTPAddress + }) + } + println "targetURL:"+targetURL + logger.info(targetURL) + if(targetURL!="") { + def post = new URL(targetURL).openConnection(); + def message = operationsData.content.text() + post.setRequestMethod("POST") + post.setDoOutput(true) + post.setRequestProperty("Content-Type", "application/json") + post.getOutputStream().write(message.getBytes("UTF-8")); + def postRC = post.getResponseCode(); + println(postRC); + if(postRC.equals(200)) { + println(post.getInputStream().getText()); + result = "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> "; + } + }else { + println "No url found in database.." + logger.info("no url found in database") + result = "\\\" xmlns=\\\"urn:ietf:params:xml:ns:netconf:base:1.0\\\"> applicationNo url found in database" + } + } else{ + logger.info("targetName not found"); + println("targetName not found") + result = "\\\" xmlns=\\\"urn:ietf:params:xml:ns:netconf:base:1.0\\\"> applicationNo target name in request" + } +} +catch (Exception e) +{ + e.printStackTrace(); +} + +return result; diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/send-models-schema.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/send-models-schema.yang new file mode 100644 index 00000000..cb13b613 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/send-models-schema.yang @@ -0,0 +1,19 @@ + + + rpc send-models { + description + "The <send-models> operation takes in a content in JSON format and sends the entire content to the specified target address."; + + container config { + leaf target-name { + type string; + description "name of the target to which all the events are to be sent"; + } + } + leaf content { + type string; + description "JSON string to be sent, which contains all the events to be sent"; + } + } + + \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/send-models/NA/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/send-models/NA/response.groovy new file mode 100644 index 00000000..d45fea4e --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/send-models/NA/response.groovy @@ -0,0 +1,133 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +import com.ericsson.testvnf.server.models.RpcData; + +import java.util.concurrent.TimeUnit; +import groovy.sql.Sql; +import groovy.util.XmlParser +import java.util.logging.Logger; +import groovy.json.JsonSlurper +import groovy.json.JsonOutput + +Logger logger = Logger.getLogger("") + +println "send-models!" +def RpcData data = binding.getVariable("RpcData") +Object connectionResetMap = binding.getVariable("connectionResetMap") +println "connectionResetMap:" + connectionResetMap.get(data.getTargetName()) +result = "ignore" +try{ + def operationsData = new XmlParser().parseText(data.getOperationTagContent()) + println "operations data::::" + operationsData + + def targetName + if (!operationsData.config.'target-name'.isEmpty()){ + targetName = operationsData.config.'target-name'.text() + println "target-name ::::" + operationsData.config.'target-name'.text() + + logger.info("in the groovy file. going to open a database session.") + def db = [url: "jdbc:mariadb://localhost:3306/netconf_db?useSSL=false", + user: "root", password: "root", driver: 'org.mariadb.jdbc.Driver'] + // def db = [url: "jdbc:mariadb://mariadb:3306/netconf_db?useSSL=false", + // user: "root", password: "root", driver: 'org.mariadb.jdbc.Driver'] + def sql = Sql.newInstance(db.url, db.user, db.password, db.driver) + println "DB connection ready" + logger.info("DB connection ready") + def metadata = sql.connection.getMetaData() + def tables = metadata.getTables(null, null, "AddressTable", null) + def targetURL = "" + if (!tables.next()) { + logger.info("table not found"); + println "table not found" + sql.execute("CREATE TABLE AddressTable (Name varchar(255), HTTPAddress varchar(255), PRIMARY KEY (Name))") + }else{ + def query = "select HTTPAddress from AddressTable where Name=\"".concat(targetName).concat("\"") + println "query" + query + logger.info(query) + sql.eachRow(query, { res -> + println "sending JSON data to "+res.HTTPAddress + targetURL = res.HTTPAddress + }) + } + println "targetURL:"+targetURL + logger.info(targetURL) + if(targetURL!="") { + def url = url = new URL(targetURL) + + def message = operationsData.content.text() + def jsonSlurper = new JsonSlurper() + Object jsonData = jsonSlurper.parseText(message) + for (i=0; i\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> "; + } else{ + println "Final event not accepted. Respnse code "+ postRC+ " received." + } + break + } + + def eventMessage = JsonOutput.toJson(jsonData[i]) + println "sending event " + i + ":" + eventMessage + post.getOutputStream().write(eventMessage.getBytes("UTF-8")); + def postRC = post.getResponseCode(); + println(postRC); + if(postRC.equals(200)) { + println(post.getInputStream().getText()); + result = "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> "; + } else{ + println "Event not accepted. Response code "+ postRC+ " received." + } + if(i==jsonData.size()-1){ + i=-1 + } + + println "sleeping for "+Long.valueOf(data.getTimeDelayForSendingEvents())+" milliseconds.." + sleep(Long.valueOf(data.getTimeDelayForSendingEvents())) + + } + }else { + println "No url found in database.." + logger.info("no url found in database") + result = "\\\" xmlns=\\\"urn:ietf:params:xml:ns:netconf:base:1.0\\\"> applicationNo url found in database" + } + } else{ + logger.info("targetName not found"); + println("targetName not found") + result = "\\\" xmlns=\\\"urn:ietf:params:xml:ns:netconf:base:1.0\\\"> applicationNo target name in request" + } +} +catch (Exception e) +{ + e.printStackTrace(); +} +return result; \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/server-config.properties b/vnfs/TestVNF/netconftemplates/netconftemplates/server-config.properties new file mode 100644 index 00000000..a88f5f71 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/server-config.properties @@ -0,0 +1,2 @@ +host = 0.0.0.0 +port = 2052 \ No newline at end of file diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/turing-machine@2013-12-27.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/turing-machine@2013-12-27.yang new file mode 100644 index 00000000..2a5a94f7 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/turing-machine@2013-12-27.yang @@ -0,0 +1,267 @@ + + module turing-machine { + namespace "http://example.net/turing-machine"; + prefix tm; + + description + "Data model for the Turing Machine."; + + revision 2013-12-27 { + description + "Initial revision."; + } + + typedef tape-symbol { + type string { + length "0..1"; + } + description + "Type of symbols appearing in tape cells. + + A blank is represented as an empty string where necessary."; + } + + typedef cell-index { + type int64; + description + "Type for indexing tape cells."; + } + + typedef state-index { + type uint16; + description + "Type for indexing states of the control unit."; + } + + typedef head-dir { + type enumeration { + enum "left"; + enum "right"; + } + default "right"; + description + "Possible directions for moving the read/write head, one cell + to the left or right (default)."; + } + + grouping tape-cells { + description + "The tape of the Turing Machine is represented as a sparse + array."; + list cell { + key "coord"; + description + "List of non-blank cells."; + leaf coord { + type cell-index; + description + "Coordinate (index) of the tape cell."; + } + + leaf symbol { + type tape-symbol { + length "1"; + } + description + "Symbol appearing in the tape cell. + + Blank (empty string) is not allowed here because the + 'cell' list only contains non-blank cells."; + } + } + } + + container turing-machine { + description + "State data and configuration of a Turing Machine."; + leaf state { + type state-index; + config false; + mandatory true; + description + "Current state of the control unit. + + The initial state is 0."; + } + + leaf head-position { + type cell-index; + config false; + mandatory true; + description + "Position of tape read/write head."; + } + + container tape { + config false; + description + "The contents of the tape."; + uses tape-cells; + } + + container transition-function { + description + "The Turing Machine is configured by specifying the + transition function."; + list delta { + key "label"; + unique "input/state input/symbol"; + description + "The list of transition rules."; + leaf label { + type string; + description + "An arbitrary label of the transition rule."; + } + + container input { + description + "Input parameters (arguments) of the transition rule."; + leaf state { + type state-index; + mandatory true; + description + "Current state of the control unit."; + } + + leaf symbol { + type tape-symbol; + mandatory true; + description + "Symbol read from the tape cell."; + } + } + + container output { + description + "Output values of the transition rule."; + leaf state { + type state-index; + description + "New state of the control unit. If this leaf is not + present, the state doesn't change."; + } + + leaf symbol { + type tape-symbol; + description + "Symbol to be written to the tape cell. If this leaf is + not present, the symbol doesn't change."; + } + + leaf head-move { + type head-dir; + description + "Move the head one cell to the left or right"; + } + } + } + } + } + + rpc initialize { + description + "Initialize the Turing Machine as follows: + + 1. Put the control unit into the initial state (0). + + 2. Move the read/write head to the tape cell with coordinate + zero. + + 3. Write the string from the 'tape-content' input parameter to + the tape, character by character, starting at cell 0. The + tape is othewise empty."; + input { + leaf tape-content { + type string; + default ""; + description + "The string with which the tape shall be initialized. The + leftmost symbol will be at tape coordinate 0."; + } + } + } + + rpc run { + description + "Start the Turing Machine operation."; + } + + rpc run-until { + description + "Start the Turing Machine operation and let it run until it is halted + or ALL the defined breakpoint conditions are satisfied."; + input { + leaf state { + type state-index; + description + "What state the control unit has to be at for the execution to be paused."; + } + + leaf head-position { + type cell-index; + description + "Position of tape read/write head for which the breakpoint applies."; + } + + container tape { + description + "What content the tape has to have for the breakpoint to apply."; + uses tape-cells; + } + } + + output { + leaf step-count { + type uint64; + description + "The number of steps executed since the last 'run-until' call."; + } + + leaf halted { + type boolean; + description + "'True' if the Turing machine is halted, 'false' if it is only paused."; + } + } + } + + notification halted { + description + "The Turing Machine has halted. This means that there is no + transition rule for the current state and tape symbol."; + leaf state { + type state-index; + mandatory true; + description + "The state of the control unit in which the machine has + halted."; + } + } + + notification paused { + description + "The Turing machine has reached a breakpoint and was paused."; + leaf state { + type state-index; + mandatory true; + description + "State of the control unit in which the machine was paused."; + } + + leaf head-position { + type cell-index; + mandatory true; + description + "Position of tape read/write head when the machine was paused."; + } + + container tape { + description + "Content of the tape when the machine was paused."; + uses tape-cells; + } + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/turing-machine@2013-12-27.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/turing-machine@2013-12-27.yin new file mode 100644 index 00000000..7654999c --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/turing-machine@2013-12-27.yin @@ -0,0 +1,281 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="turing-machine" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:tm="http://example.net/turing-machine"> + <namespace uri="http://example.net/turing-machine"/> + <prefix value="tm"/> + <description> + <text>Data model for the Turing Machine.</text> + </description> + <revision date="2013-12-27"> + <description> + <text>Initial revision.</text> + </description> + </revision> + <typedef name="tape-symbol"> + <type name="string"> + <length value="0..1"/> + </type> + <description> + <text>Type of symbols appearing in tape cells. + +A blank is represented as an empty string where necessary.</text> + </description> + </typedef> + <typedef name="cell-index"> + <type name="int64"/> + <description> + <text>Type for indexing tape cells.</text> + </description> + </typedef> + <typedef name="state-index"> + <type name="uint16"/> + <description> + <text>Type for indexing states of the control unit.</text> + </description> + </typedef> + <typedef name="head-dir"> + <type name="enumeration"> + <enum name="left"/> + <enum name="right"/> + </type> + <default value="right"/> + <description> + <text>Possible directions for moving the read/write head, one cell +to the left or right (default).</text> + </description> + </typedef> + <grouping name="tape-cells"> + <description> + <text>The tape of the Turing Machine is represented as a sparse +array.</text> + </description> + <list name="cell"> + <key value="coord"/> + <description> + <text>List of non-blank cells.</text> + </description> + <leaf name="coord"> + <type name="cell-index"/> + <description> + <text>Coordinate (index) of the tape cell.</text> + </description> + </leaf> + <leaf name="symbol"> + <type name="tape-symbol"> + <length value="1"/> + </type> + <description> + <text>Symbol appearing in the tape cell. + +Blank (empty string) is not allowed here because the +'cell' list only contains non-blank cells.</text> + </description> + </leaf> + </list> + </grouping> + <container name="turing-machine"> + <description> + <text>State data and configuration of a Turing Machine.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>Current state of the control unit. + +The initial state is 0.</text> + </description> + </leaf> + <leaf name="head-position"> + <type name="cell-index"/> + <config value="false"/> + <mandatory value="true"/> + <description> + <text>Position of tape read/write head.</text> + </description> + </leaf> + <container name="tape"> + <config value="false"/> + <description> + <text>The contents of the tape.</text> + </description> + <uses name="tape-cells"/> + </container> + <container name="transition-function"> + <description> + <text>The Turing Machine is configured by specifying the +transition function.</text> + </description> + <list name="delta"> + <key value="label"/> + <unique tag="input/state input/symbol"/> + <description> + <text>The list of transition rules.</text> + </description> + <leaf name="label"> + <type name="string"/> + <description> + <text>An arbitrary label of the transition rule.</text> + </description> + </leaf> + <container name="input"> + <description> + <text>Input parameters (arguments) of the transition rule.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <mandatory value="true"/> + <description> + <text>Current state of the control unit.</text> + </description> + </leaf> + <leaf name="symbol"> + <type name="tape-symbol"/> + <mandatory value="true"/> + <description> + <text>Symbol read from the tape cell.</text> + </description> + </leaf> + </container> + <container name="output"> + <description> + <text>Output values of the transition rule.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <description> + <text>New state of the control unit. If this leaf is not +present, the state doesn't change.</text> + </description> + </leaf> + <leaf name="symbol"> + <type name="tape-symbol"/> + <description> + <text>Symbol to be written to the tape cell. If this leaf is +not present, the symbol doesn't change.</text> + </description> + </leaf> + <leaf name="head-move"> + <type name="head-dir"/> + <description> + <text>Move the head one cell to the left or right</text> + </description> + </leaf> + </container> + </list> + </container> + </container> + <rpc name="initialize"> + <description> + <text>Initialize the Turing Machine as follows: + +1. Put the control unit into the initial state (0). + +2. Move the read/write head to the tape cell with coordinate + zero. + +3. Write the string from the 'tape-content' input parameter to + the tape, character by character, starting at cell 0. The + tape is othewise empty.</text> + </description> + <input> + <leaf name="tape-content"> + <type name="string"/> + <default value=""/> + <description> + <text>The string with which the tape shall be initialized. The +leftmost symbol will be at tape coordinate 0.</text> + </description> + </leaf> + </input> + </rpc> + <rpc name="run"> + <description> + <text>Start the Turing Machine operation.</text> + </description> + </rpc> + <rpc name="run-until"> + <description> + <text>Start the Turing Machine operation and let it run until it is halted +or ALL the defined breakpoint conditions are satisfied.</text> + </description> + <input> + <leaf name="state"> + <type name="state-index"/> + <description> + <text>What state the control unit has to be at for the execution to be paused.</text> + </description> + </leaf> + <leaf name="head-position"> + <type name="cell-index"/> + <description> + <text>Position of tape read/write head for which the breakpoint applies.</text> + </description> + </leaf> + <container name="tape"> + <description> + <text>What content the tape has to have for the breakpoint to apply.</text> + </description> + <uses name="tape-cells"/> + </container> + </input> + <output> + <leaf name="step-count"> + <type name="uint64"/> + <description> + <text>The number of steps executed since the last 'run-until' call.</text> + </description> + </leaf> + <leaf name="halted"> + <type name="boolean"/> + <description> + <text>'True' if the Turing machine is halted, 'false' if it is only paused.</text> + </description> + </leaf> + </output> + </rpc> + <notification name="halted"> + <description> + <text>The Turing Machine has halted. This means that there is no +transition rule for the current state and tape symbol.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <mandatory value="true"/> + <description> + <text>The state of the control unit in which the machine has +halted.</text> + </description> + </leaf> + </notification> + <notification name="paused"> + <description> + <text>The Turing machine has reached a breakpoint and was paused.</text> + </description> + <leaf name="state"> + <type name="state-index"/> + <mandatory value="true"/> + <description> + <text>State of the control unit in which the machine was paused.</text> + </description> + </leaf> + <leaf name="head-position"> + <type name="cell-index"/> + <mandatory value="true"/> + <description> + <text>Position of tape read/write head when the machine was paused.</text> + </description> + </leaf> + <container name="tape"> + <description> + <text>Content of the tape when the machine was paused.</text> + </description> + <uses name="tape-cells"/> + </container> + </notification> +</module> + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/validate/candidate/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/validate/candidate/response.groovy new file mode 100644 index 00000000..2529739c --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/validate/candidate/response.groovy @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +println "validate-candidate datastore!" +return "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> "; diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/validate/running/response.groovy b/vnfs/TestVNF/netconftemplates/netconftemplates/validate/running/response.groovy new file mode 100644 index 00000000..d9b82e07 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/validate/running/response.groovy @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +println "validate-running datastore!" +return "\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"> "; diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/yang@2017-02-20.yang b/vnfs/TestVNF/netconftemplates/netconftemplates/yang@2017-02-20.yang new file mode 100644 index 00000000..0d3bec9c --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/yang@2017-02-20.yang @@ -0,0 +1,78 @@ + + module yang { + namespace "urn:ietf:params:xml:ns:yang:1"; + prefix yang; + + import ietf-yang-metadata { + prefix md; + revision-date 2016-08-05; + } + + organization + "libyang"; + contact + "Web: <https://github.com/CESNET/libyang/> + Author: Radek Krejci <rkrejci@cesnet.cz>"; + description + "This is a kind of fake model with no data, typedefs or anything + else. libyang uses this module to implement various YANG attributes + defined in RFC 6020."; + + revision 2017-02-20 { + description + "Added metadata for NETCONF's edit-config manipulation with ordered + lists and leaf-lists."; + reference + "RFC 7950: The YANG 1.1 Data Modeling Language"; + } + revision 2016-02-11 { + description + "Initial revision"; + reference + "RFC 6020: YANG - A Data Modeling Language for + the Network Configuration Protocol (NETCONF)"; + } + + md:annotation "insert" { + type enumeration { + enum "first"; + enum "last"; + enum "before"; + enum "after"; + } + description + "In user ordered leaf-list, the attribute can be used to control + where in the leaf-list the entry is inserted. It can be used during + the NETCONF <edit-config> \"create\" operations to insert a new list or + leaf-list entry, or during \"merge\" or \"replace\" operations to insert + a new list or leaf-list entry or move an existing one. + + If the value is \"before\" or \"after\", the \"value\"/\"key\" attribute + MUST also be used to specify an existing entry in the list or leaf-list. + + If no \"insert\" attribute is present in the \"create\" operation, it + defaults to \"last\"."; + reference + "RFC7950 section 7.8.6. and section 7.7.9."; + } + md:annotation "value" { + type string; + description + "In user ordered leaf-list, the attribute must be used if the attribute + insert is used and specifies before/after which existing instance the + new instance should be inserted."; + reference + "RFC7950 section 7.7.9."; + } + md:annotation "key" { + type string; + description + "In user ordered list, the attribute must be used if the attribute + insert is used and specifies before/after which existing instance the + new instance should be inserted."; + reference + "RFC7950 section 7.8.6."; + } +} + + diff --git a/vnfs/TestVNF/netconftemplates/netconftemplates/yang@2017-02-20.yin b/vnfs/TestVNF/netconftemplates/netconftemplates/yang@2017-02-20.yin new file mode 100644 index 00000000..7a4d5846 --- /dev/null +++ b/vnfs/TestVNF/netconftemplates/netconftemplates/yang@2017-02-20.yin @@ -0,0 +1,91 @@ + + <?xml version="1.0" encoding="UTF-8"?> +<module name="yang" + xmlns="urn:ietf:params:xml:ns:yang:yin:1" + xmlns:yang="urn:ietf:params:xml:ns:yang:1" + xmlns:md="urn:ietf:params:xml:ns:yang:ietf-yang-metadata"> + <namespace uri="urn:ietf:params:xml:ns:yang:1"/> + <prefix value="yang"/> + <import module="ietf-yang-metadata"> + <prefix value="md"/> + <revision-date date="2016-08-05"/> + </import> + <organization> + <text>libyang</text> + </organization> + <contact> + <text>Web: &lt;https://github.com/CESNET/libyang/&gt; +Author: Radek Krejci &lt;rkrejci@cesnet.cz&gt;</text> + </contact> + <description> + <text>This is a kind of fake model with no data, typedefs or anything +else. libyang uses this module to implement various YANG attributes +defined in RFC 6020.</text> + </description> + <revision date="2017-02-20"> + <description> + <text>Added metadata for NETCONF's edit-config manipulation with ordered +lists and leaf-lists.</text> + </description> + <reference> + <text>RFC 7950: The YANG 1.1 Data Modeling Language</text> + </reference> + </revision> + <revision date="2016-02-11"> + <description> + <text>Initial revision</text> + </description> + <reference> + <text>RFC 6020: YANG - A Data Modeling Language for +the Network Configuration Protocol (NETCONF)</text> + </reference> + </revision> + <md:annotation name="insert"> + <type name="enumeration"> + <enum name="first"/> + <enum name="last"/> + <enum name="before"/> + <enum name="after"/> + </type> + <description> + <text>In user ordered leaf-list, the attribute can be used to control +where in the leaf-list the entry is inserted. It can be used during +the NETCONF &lt;edit-config&gt; &quot;create&quot; operations to insert a new list or +leaf-list entry, or during &quot;merge&quot; or &quot;replace&quot; operations to insert +a new list or leaf-list entry or move an existing one. + +If the value is &quot;before&quot; or &quot;after&quot;, the &quot;value&quot;/&quot;key&quot; attribute +MUST also be used to specify an existing entry in the list or leaf-list. + +If no &quot;insert&quot; attribute is present in the &quot;create&quot; operation, it +defaults to &quot;last&quot;.</text> + </description> + <reference> + <text>RFC7950 section 7.8.6. and section 7.7.9.</text> + </reference> + </md:annotation> + <md:annotation name="value"> + <type name="string"/> + <description> + <text>In user ordered leaf-list, the attribute must be used if the attribute +insert is used and specifies before/after which existing instance the +new instance should be inserted.</text> + </description> + <reference> + <text>RFC7950 section 7.7.9.</text> + </reference> + </md:annotation> + <md:annotation name="key"> + <type name="string"/> + <description> + <text>In user ordered list, the attribute must be used if the attribute +insert is used and specifies before/after which existing instance the +new instance should be inserted.</text> + </description> + <reference> + <text>RFC7950 section 7.8.6.</text> + </reference> + </md:annotation> +</module> + + -- cgit 1.2.3-korg