module ietf-netconf-am { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-am"; prefix "nam"; import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } import ietf-netconf { prefix nc; } import ietf-netconf-acm { prefix nacm; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: WG List: WG Chair: Mehmet Ersue WG Chair: Mahesh Jethanandani Editor: Mahesh Jethanandani "; description "This module defines an accounting record for NETCONF operations performed on the server. If these operations are authorized using rules defined by NACM [RFC6536], then that information is also captured by this module. 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 ( This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision "2017-07-16" { description "Initial version"; reference "RFC XXXX: NETCONF and RESTCONF Accounting"; } /* * Data definition statements. */ container nam { nacm:default-deny-all; description "Parameters for NETCONF Accounting Model."; leaf enable-nam { type boolean; default true; description "Enable or disable generation of NETCONF accounting records. If 'true', accounting records will be generated. If set to 'false' no accounting records will be generated."; } list accounting-record { key "session-id message-id"; config false; description "A list of accounting records generated by the server"; leaf session-id { type nc:session-id-type; description "If this operation happened over NETCONF, this field captures the NETCONF session-id. In case of RESTCONF this field can be left blank."; } leaf message-id { type uint32; description "Id that is assigned to each RPC within a given NETCONF session. Should be blank in case of RESTCONF."; } leaf date-time { type yang:date-and-time; mandatory true; description "The date and time when the operation was requested."; } leaf src-ip { type inet:ip-address; mandatory true; description "The source IP address where the request was made from."; } leaf group { type nacm:group-name-type; mandatory true; description "The name of the group that the user who requested the operation belongs to."; } leaf user { type nacm:user-name-type; description "The user within the group that is requesting this operation."; } leaf rule { type string { length "1..max"; } description "The name assigned to the rule that was used to authorize the action, if authorization was enabled."; } leaf data-node { type nacm:node-instance-identifier; mandatory true; description "Data Node Instance Identifier associated with the data node that the request is being made on. Instance identifiers start with the top-level data node, and a complete identifier is required for this value."; } anydata value { description "An optional field, it contains the value of any of the attribute that form the record. It could be as simple as the filter value 'http' specified that the user requested as part of the authorization request such as in this example: http or it could be value being set for a ssh port in this example: 2022 "; } leaf action { type nacm:access-operations-type; mandatory true; description "The type of NETCONF operation being requested."; } leaf status { type nacm:action-type; description "Action taken by the server when the above mentioned rule matched, if authorization was enable."; } } } }