< draft-bryskin-netconf-automation-yang-01.txt   draft-bryskin-netconf-automation-yang-02.txt >
Network Working Group I. Bryskin Network Working Group I. Bryskin
Internet-Draft Huawei Technologies Internet-Draft Huawei Technologies
Intended status: Informational X. Liu Intended status: Informational X. Liu
Expires: September 1, 2018 Jabil Expires: December 30, 2018 Volta Networks
A. Clemm A. Clemm
Huawei Huawei
H. Birkholz H. Birkholz
Fraunhofer SIT Fraunhofer SIT
T. Zhou T. Zhou
Huawei Huawei
February 28, 2018 June 28, 2018
Generalized Network Control Automation YANG Model Generalized Network Control Automation YANG Model
draft-bryskin-netconf-automation-yang-01 draft-bryskin-netconf-automation-yang-02
Abstract Abstract
This document describes a YANG data model for the Generalized Network This document describes a YANG data model for the Generalized Network
Control Automation (GNCA), aimed to define an abstract and uniform Control Automation (GNCA), aimed to define an abstract and uniform
semantics for NETCONF/YANG scripts in the form of Event-Condition- semantics for NETCONF/YANG scripts in the form of Event-Condition-
Action (ECA) containers. Action (ECA) containers.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 1, 2018. This Internet-Draft will expire on December 30, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
skipping to change at page 2, line 25 skipping to change at page 2, line 25
3. GNCA concepts and constructs . . . . . . . . . . . . . . . . 4 3. GNCA concepts and constructs . . . . . . . . . . . . . . . . 4
3.1. Policy Variable (PV) . . . . . . . . . . . . . . . . . . 4 3.1. Policy Variable (PV) . . . . . . . . . . . . . . . . . . 4
3.2. ECA Event . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2. ECA Event . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3. ECA Condition . . . . . . . . . . . . . . . . . . . . . . 7 3.3. ECA Condition . . . . . . . . . . . . . . . . . . . . . . 7
3.4. ECA Action . . . . . . . . . . . . . . . . . . . . . . . 9 3.4. ECA Action . . . . . . . . . . . . . . . . . . . . . . . 9
3.5. ECA . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.5. ECA . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4. Where ECA scripts are executed? . . . . . . . . . . . . . . . 12 4. Where ECA scripts are executed? . . . . . . . . . . . . . . . 12
5. ECA script example . . . . . . . . . . . . . . . . . . . . . 13 5. ECA script example . . . . . . . . . . . . . . . . . . . . . 13
6. Complete Model Tree Structure . . . . . . . . . . . . . . . . 15 6. Complete Model Tree Structure . . . . . . . . . . . . . . . . 15
7. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 21 7. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 21
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 36 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40
9. Security Considerations . . . . . . . . . . . . . . . . . . . 36 9. Security Considerations . . . . . . . . . . . . . . . . . . . 40
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 36 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 40
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 36 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 41
11.1. Normative References . . . . . . . . . . . . . . . . . . 36 11.1. Normative References . . . . . . . . . . . . . . . . . . 41
11.2. Informative References . . . . . . . . . . . . . . . . . 37 11.2. Informative References . . . . . . . . . . . . . . . . . 41
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 41
1. Introduction 1. Introduction
NETCONF/YANG has proved to be very successful in facilitating NETCONF/YANG has proved to be very successful in facilitating
interactive network control paradigm, in which a network control interactive network control paradigm, in which a network control
application (controller) requests the network server to perform application (controller) requests the network server to perform
certain (re-)configurations, then, retrieves network states of certain (re-)configurations, then, retrieves network states of
interest, then asks for more (re-)configurations and so forth. This interest, then asks for more (re-)configurations and so forth. This
said, there are multiple use cases that require stringing network said, there are multiple use cases that require stringing network
configuration requests together with conditioning their order of configuration requests together with conditioning their order of
skipping to change at page 6, line 34 skipping to change at page 6, line 34
Network_Failure_Is_Detected event is defined that carries to a Network_Failure_Is_Detected event is defined that carries to a
subscriber the detected failure type (failureType), ID (failureID) subscriber the detected failure type (failureType), ID (failureID)
and the affected by the failure TE link state (teLInk). In the and the affected by the failure TE link state (teLInk). In the
context of the associated with the Networ_Failure_Is_Detected event context of the associated with the Networ_Failure_Is_Detected event
ECA failureType, failureID and teLink are implicit local dynamic PVs ECA failureType, failureID and teLink are implicit local dynamic PVs
that could be used in the embodied Condition and Action containers that could be used in the embodied Condition and Action containers
along with explicitly defined global and ECA local (static and/or along with explicitly defined global and ECA local (static and/or
dynamic) PVs. dynamic) PVs.
One way to think of NETWONF/YANG Event Notification is as Remote One way to think of NETWONF/YANG Event Notification is as Remote
Procedure Call-back, i.e. server->client directed RPC When a Procedure Call-back, i.e. server->client directed RPC. When a
subscribable NETWONF/YANG Event and associated with it ECA is pushed subscribable NETWONF/YANG Event and associated with it ECA is pushed
to the server within an ECA script, the server is expected to to the server within an ECA script, the server is expected to
interpret this as follows: take the contents of the event interpret this as follows: take the contents of the event
notification and execute the logic defined by the associated notification and execute the logic defined by the associated
Condition-Action chain (as I (client) would do on receipt of the Condition-Action chain (as I (client) would do on receipt of the
notification) in order to decide how to react to the event. Recall notification) in order to decide how to react to the event. Recall
that the whole purpose of ECA scripts is to reduce as much as that the whole purpose of ECA scripts is to reduce as much as
possible the client-server communication. possible the client-server communication.
A client may define an event of interest by making use of YANG PUSH
smart filter/subscription. Specifically, the client may configure an
ECA event according to the GNCA model specifying the event's name, as
well as the name of corresponding PUSH subscrition. In this case the
server is expected to:
o Register the event recording its name and using the referred PUSH
subsription trigger as definition of the event firing trigger;
o Auto-configure the event's ECA input in the form of local PVs
using the PUSH subscription's filters;
o At the moment of event firing intercept the notifications that
would be nornally sent to the PUSH subscription's clint(s); copy
the data store states pointed by the PUSH subscription's filters
into the auto-configured ECA's local PVs and execute the ECA's
condition-action chain.
All events (specified in at least one ECA pushed to the server) are All events (specified in at least one ECA pushed to the server) are
required to be constantly monitored by the server. One way to think required to be constantly monitored by the server. One way to think
of this is that the server subscribes to its own publications with of this is that the server subscribes to its own publications with
respect to all events that are associated with at least one ECA. respect to all events that are associated with at least one ECA.
3.3. ECA Condition 3.3. ECA Condition
ECA Condition is evaluated to TRUE or FALSE logical expression. ECA Condition is evaluated to TRUE or FALSE logical expression.
There are two ways how an ECA Condition could be specified: There are two ways how an ECA Condition could be specified:
skipping to change at page 10, line 24 skipping to change at page 10, line 24
the notification message to be sent to the client may contain not the notification message to be sent to the client may contain not
only elements of the data store (as, for example, YANG PUSH or only elements of the data store (as, for example, YANG PUSH or
smart filter notifications do), but also the contents of global smart filter notifications do), but also the contents of global
and local PVs, which store results of arbitrary operations and local PVs, which store results of arbitrary operations
performed on the data store contents (possibly over arbitrary performed on the data store contents (possibly over arbitrary
period of time) to determine, for example, history/evolution of period of time) to determine, for example, history/evolution of
data store changes, median values, ranges and rates of the data store changes, median values, ranges and rates of the
changes, results of configured function calls and expressions, changes, results of configured function calls and expressions,
etc. - in short, any data the client may find interesting about etc. - in short, any data the client may find interesting about
the associated event with all the logic to compute said data the associated event with all the logic to compute said data
delegated to the server. delegated to the server. Importantly, ECA notifications are the
only ECA actions that directly interact with and hence need to be
unambiguously understood by the client. Furthermore, the same
ECA may originate numerous single or repetitive semantically
different notifications within the same or separate event
firings. In order to facilitate for the client the correlation
of events and ECA notifications received from the server, the
GNCA model requires each notification to carry mandatory
information, such as event and (event scope unique) notification
names.
Multiple ECA Condition/Action pairs could be combined into a macro- Multiple ECA Condition/Action pairs could be combined into a macro-
action. action.
Multiple ECA (macro-)Actions could be triggered by a single ECA Multiple ECA (macro-)Actions could be triggered by a single ECA
event. event.
Any given ECA Condition or Action may appear in more than one ECAs. Any given ECA Condition or Action may appear in more than one ECAs.
The model structure for the ECA Action is shown below: The model structure for the ECA Action is shown below:
skipping to change at page 16, line 6 skipping to change at page 16, line 6
Note: RPC "PathDependsOnLink" is used in the example for simplicity. Note: RPC "PathDependsOnLink" is used in the example for simplicity.
The RPC could be easily replaced by a scripted named action similar The RPC could be easily replaced by a scripted named action similar
to PopulateTunnelListes . to PopulateTunnelListes .
6. Complete Model Tree Structure 6. Complete Model Tree Structure
The complete tree structure of the YANG model defined in this The complete tree structure of the YANG model defined in this
document is as follows: document is as follows:
module: ietf-gnca module: ietf-gnca
+--rw gnca +--rw gnca
+--rw policy-variables +--rw policy-variables
| +--rw policy-variable* [name] | +--rw policy-variable* [name]
| +--rw name string | +--rw name string
| +--rw (type-choice)? | +--rw (type-choice)?
| | +--:(common) | | +--:(common)
| | | +--rw type? identityref | | | +--rw type? identityref
| | +--:(xpath) | | +--:(xpath)
| | +--rw xpath? string | | +--rw xpath? string
| +--rw value? <anydata> | +--rw value? <anydata>
+--rw conditions +--rw events
| +--rw condition* [name] | +--rw event* [name]
| +--rw name string | +--rw name string
| +--rw (expression-choice)? | +--rw policy-variable?
| +--:(logical-operation) | | -> /gnca/policy-variables/policy-variable/name
| | +--rw logical-operation-type? identityref | +--rw local-policy-variable?
| | +--rw comparison-operation* [name] | | -> /gnca/ecas/eca/policy-variable/name
| | | +--rw name string | +--rw (type-choice)?
| | | +--rw comparision-type? identityref | +--:(stream)
| | | +--rw arg1 | | +--rw stream
| | | | +--rw policy-argument | | +--rw name? string
| | | | +--rw type? | | +--rw filter* string
identityref | | +--rw remote-publisher!
| | | | +--rw (argument-choice)? | | +--rw address? inet:ip-address-no-zone
| | | | +--:(policy-constant) | | +--rw port? inet:port-number
| | | | | +--rw constant? | | +--rw transport? sn:transport
string | +--:(timer)
| | | | +--:(policy-variable) | +--rw time-schedule!
| | | | | +--rw policy-variable? | +--rw start? yang:date-and-time
| +--rw repeat-interval? string
+--rw conditions
| +--rw condition* [name]
| +--rw name string
| +--rw (expression-choice)?
| +--:(logical-operation)
| | +--rw logical-operation-type? identityref
| | +--rw comparison-operation* [name]
| | | +--rw name string
| | | +--rw comparision-type? identityref
| | | +--rw arg1
| | | | +--rw policy-argument
| | | | +--rw type?
| | | | | identityref
| | | | +--rw (argument-choice)?
| | | | +--:(policy-constant)
| | | | | +--rw constant? string
| | | | +--:(policy-variable)
| | | | | +--rw policy-variable?
leafref leafref
| | | | +--:(local-policy-variable) | | | | +--:(local-policy-variable)
| | | | | +--rw local-policy-variable? | | | | | +--rw local-policy-variable?
leafref leafref
| | | | +--:(xpath) | | | | +--:(xpath)
| | | | +--rw xpath? | | | | +--rw xpath? string
string | | | +--rw arg2
| | | +--rw arg2 | | | +--rw policy-argument
| | | +--rw policy-argument | | | +--rw type?
| | | +--rw type? | | | | identityref
identityref | | | +--rw (argument-choice)?
| | | +--rw (argument-choice)? | | | +--:(policy-constant)
| | | +--:(policy-constant) | | | | +--rw constant? string
| | | | +--rw constant? | | | +--:(policy-variable)
string | | | | +--rw policy-variable?
| | | +--:(policy-variable)
| | | | +--rw policy-variable?
leafref leafref
| | | +--:(local-policy-variable) | | | +--:(local-policy-variable)
| | | | +--rw local-policy-variable? | | | | +--rw local-policy-variable?
leafref leafref
| | | +--:(xpath) | | | +--:(xpath)
| | | +--rw xpath? | | | +--rw xpath? string
string | | +--rw sub-condition* [name]
| | +--rw sub-condition* [name] | | +--rw name -> /gnca/conditions/condition/name
| | +--rw name -> /gnca/conditions/condition | +--:(xpath)
/name | +--rw condition-xpath? string
| +--:(xpath) +--rw actions
| +--rw condition-xpath? string | +--rw action* [name]
+--rw actions | +--rw name string
| +--rw action* [name] | +--rw action-element* [name]
| +--rw name string | | +--rw name string
| +--rw action-element* [name] | | +--rw action-type? identityref
| | +--rw name string | | +--rw (action-operation)?
| | +--rw action-type? identityref | | +--:(action)
| | +--rw (action-operation)? | | | +--rw action-name?
| | +--:(action) | | | -> /gnca/actions/action/name
| | | +--rw action-name? | | +--:(content-moving)
| | | -> /gnca/actions/action/name | | | +--rw content-moving
| | +--:(content-moving) | | | +--rw content-moving-type? identityref
| | | +--rw content-moving | | | +--rw src
| | | +--rw content-moving-type? identityref | | | | +--rw policy-argument
| | | +--rw src | | | | +--rw type?
| | | | +--rw policy-argument | | | | | identityref
| | | | +--rw type? | | | | +--rw (argument-choice)?
| | | | | identityref | | | | +--:(policy-constant)
| | | | +--rw (argument-choice)? | | | | | +--rw constant?
| | | | +--:(policy-constant) | | | | | string
| | | | | +--rw constant? | | | | +--:(policy-variable)
| | | | | string | | | | | +--rw policy-variable?
| | | | +--:(policy-variable)
| | | | | +--rw policy-variable?
leafref leafref
| | | | +--:(local-policy-variable) | | | | +--:(local-policy-variable)
| | | | | +--rw local-policy-variable? | | | | | +--rw local-policy-variable?
leafref leafref
| | | | +--:(xpath) | | | | +--:(xpath)
| | | | +--rw xpath? | | | | +--rw xpath?
| | | | string | | | | string
| | | +--rw dst | | | +--rw dst
| | | +--rw policy-argument | | | +--rw policy-argument
| | | +--rw type? | | | +--rw type?
| | | | identityref | | | | identityref
| | | +--rw (argument-choice)? | | | +--rw (argument-choice)?
| | | +--:(policy-constant) | | | +--:(policy-constant)
| | | | +--rw constant? | | | | +--rw constant?
| | | | string | | | | string
| | | +--:(policy-variable) | | | +--:(policy-variable)
| | | | +--rw policy-variable? | | | | +--rw policy-variable?
leafref leafref
| | | +--:(local-policy-variable) | | | +--:(local-policy-variable)
| | | | +--rw local-policy-variable? | | | | +--rw local-policy-variable?
leafref leafref
| | | +--:(xpath) | | | +--:(xpath)
| | | +--rw xpath? | | | +--rw xpath?
| | | string | | | string
| | +--:(function-call) | | +--:(function-call)
| | | +--rw function-call | | | +--rw function-call
| | | +--rw function-type? identityref | | | +--rw function-type? identityref
| | | +--rw src | | | +--rw src
| | | | +--rw policy-argument | | | | +--rw policy-argument
| | | | +--rw type? | | | | +--rw type?
| | | | | identityref | | | | | identityref
| | | | +--rw (argument-choice)? | | | | +--rw (argument-choice)?
| | | | +--:(policy-constant) | | | | +--:(policy-constant)
| | | | | +--rw constant? | | | | | +--rw constant?
| | | | | string | | | | | string
| | | | +--:(policy-variable) | | | | +--:(policy-variable)
| | | | | +--rw policy-variable? | | | | | +--rw policy-variable?
leafref leafref
| | | | +--:(local-policy-variable) | | | | +--:(local-policy-variable)
| | | | | +--rw local-policy-variable? | | | | | +--rw local-policy-variable?
leafref leafref
| | | | +--:(xpath) | | | | +--:(xpath)
| | | | +--rw xpath? | | | | +--rw xpath?
| | | | string | | | | string
| | | +--rw dst | | | +--rw dst
| | | +--rw policy-argument | | | +--rw policy-argument
| | | +--rw type? | | | +--rw type?
| | | | identityref | | | | identityref
| | | +--rw (argument-choice)? | | | +--rw (argument-choice)?
| | | +--:(policy-constant) | | | +--:(policy-constant)
| | | | +--rw constant? | | | | +--rw constant?
| | | | string | | | | string
| | | +--:(policy-variable) | | | +--:(policy-variable)
| | | | +--rw policy-variable? | | | | +--rw policy-variable?
leafref leafref
| | | +--:(local-policy-variable) | | | +--:(local-policy-variable)
| | | | +--rw local-policy-variable? | | | | +--rw local-policy-variable?
leafref leafref
| | | +--:(xpath) | | | +--:(xpath)
| | | +--rw xpath? | | | +--rw xpath?
| | | string | | | string
| | +--:(rpc-operation) | | +--:(rpc-operation)
| | | +--rw rpc-operation | | | +--rw rpc-operation
| | | +--rw name? string | | | +--rw name? string
| | | +--rw nc-action-xpath? string | | | +--rw nc-action-xpath? string
| | | +--rw policy-variable* [name] | | | +--rw policy-variable* [name]
| | | +--rw name string | | | +--rw name string
| | | +--rw policy-argument | | | +--rw policy-argument
| | | +--rw type? | | | +--rw type?
| | | | identityref | | | | identityref
| | | +--rw (argument-choice)? | | | +--rw (argument-choice)?
| | | +--:(policy-constant) | | | +--:(policy-constant)
| | | | +--rw constant? | | | | +--rw constant?
| | | | string | | | | string
| | | +--:(policy-variable) | | | +--:(policy-variable)
| | | | +--rw policy-variable? | | | | +--rw policy-variable?
leafref leafref
| | | +--:(local-policy-variable) | | | +--:(local-policy-variable)
| | | | +--rw local-policy-variable? | | | | +--rw local-policy-variable?
leafref leafref
| | | +--:(xpath) | | | +--:(xpath)
| | | +--rw xpath? | | | +--rw xpath?
| | | string | | | string
| | +--:(notify-operation) | | +--:(notify-operation)
| | +--rw notify-operation | | +--rw notify-operation
| | +--rw name? string | | +--rw name? string
| | +--rw policy-variable* [name] | | +--rw policy-variable* [name]
| | +--rw name string | | +--rw name string
| | +--rw policy-argument | | +--rw policy-argument
| | +--rw type? | | +--rw type?
| | | identityref | | | identityref
| | +--rw (argument-choice)? | | +--rw (argument-choice)?
| | +--:(policy-constant) | | +--:(policy-constant)
| | | +--rw constant? | | | +--rw constant?
| | | string | | | string
| | +--:(policy-variable) | | +--:(policy-variable)
| | | +--rw policy-variable? | | | +--rw policy-variable?
leafref leafref
| | +--:(local-policy-variable) | | +--:(local-policy-variable)
| | | +--rw local-policy-variable? | | | +--rw local-policy-variable?
leafref leafref
| | +--:(xpath) | | +--:(xpath)
| | +--rw xpath? | | +--rw xpath?
| | string | | string
| +--rw time-schedule | +--rw time-schedule!
| +--rw start? yang:date-and-time | +--rw start? yang:date-and-time
| +--rw repeat-interval? string | +--rw repeat-interval? string
+--rw ecas +--rw ecas
| +--rw eca* [name] | +--rw eca* [name]
| +--rw name string | +--rw name string
| +--rw event-name string | +--rw event-name string
| +--rw policy-variable* [name] | +--rw policy-variable* [name]
| | +--rw name string | | +--rw name string
| | +--rw (type-choice)? | | +--rw (type-choice)?
| | | +--:(common) | | | +--:(common)
| | | | +--rw type? identityref | | | | +--rw type? identityref
| | | +--:(xpath) | | | +--:(xpath)
| | | +--rw xpath? string | | | +--rw xpath? string
| | +--rw value? <anydata> | | +--rw value? <anydata>
| | +--rw is-static? boolean | | +--rw is-static? boolean
| +--rw condition-action* [name] | +--rw condition-action* [name]
| | +--rw name string | | +--rw name string
| | +--rw condition? -> /gnca/conditions/condition/name | | +--rw condition? -> /gnca/conditions/condition/name
| | +--rw action? -> /gnca/actions/action/name | | +--rw action? -> /gnca/actions/action/name
| +--rw cleanup-condition-action* [name] | +--rw cleanup-condition-action* [name]
| | +--rw name string | | +--rw name string
| | +--rw condition? -> /gnca/conditions/condition/name | | +--rw condition? -> /gnca/conditions/condition/name
| | +--rw action? -> /gnca/actions/action/name | | +--rw action? -> /gnca/actions/action/name
| +---x start | +---x start
| +---x stop | +---x stop
| +---x pause | +---x pause
| +---x resume | +---x resume
| +---x next-action | +---x next-action
| +--ro execution* [id] | +--ro execution* [id]
| +--ro id uint32 | +--ro id uint32
| +--ro oper-status? enumeration | +--ro oper-status? oper-status
| +--ro start-time? | +--ro start-time?
| | yang:date-and-time | | yang:date-and-time
| +--ro stop-time? | +--ro stop-time?
| | yang:date-and-time | | yang:date-and-time
| +--ro next-scheduled-time? | +--ro next-scheduled-time?
| | yang:date-and-time | | yang:date-and-time
| +--ro last-condition-action? | +--ro last-condition-action?
| | -> ../../condition-action/name | | -> ../../condition-action/name
| +--ro last-condition? | +--ro last-condition?
| | -> ../../condition-action/condition | | -> ../../condition-action/condition
| +--ro last-action? | +--ro last-action?
| | -> ../../condition-action/action | | -> ../../condition-action/action
| +--ro last-cleanup-condition-action? | +--ro last-cleanup-condition-action?
| -> ../../cleanup-condition-action/name | -> ../../cleanup-condition-action/name
+--rw eca-scripts +--rw eca-scripts
| +--rw eca-script* [script-name] | +--rw eca-script* [script-name]
| +--rw script-name string | +--rw script-name string
| +--rw eca* [eca-name] | +--rw eca* [eca-name]
| +--rw eca-name -> /gnca/ecas/eca/name | +--rw eca-name -> /gnca/ecas/eca/name
+--rw running-script? +--rw running-script?
-> /gnca/eca-scripts/eca-script/script-name -> /gnca/eca-scripts/eca-script/script-name
notifications:
+---n eca-execution
+--ro oper-status oper-status
+--ro name string
+--ro policy-variable* [name]
+--ro name string
+--ro policy-argument
| +--ro type? identityref
| +--ro (argument-choice)?
| +--:(policy-constant)
| | +--ro constant? string
| +--:(policy-variable)
| | +--ro policy-variable? leafref
| +--:(local-policy-variable)
| | +--ro local-policy-variable?
| | -> /gnca/ecas/eca/policy-variable/name
| +--:(xpath)
| +--ro xpath? string
+--ro value? <anydata>
7. YANG Module 7. YANG Module
<CODE BEGINS> file "ietf-gnca@2018-02-28.yang" <CODE BEGINS> file "ietf-gnca@2018-06-22.yang"
module ietf-gnca { module ietf-gnca {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-gnca"; namespace "urn:ietf:params:xml:ns:yang:ietf-gnca";
prefix "gnca"; prefix "gnca";
import ietf-yang-types { import ietf-yang-types {
prefix "yang"; prefix "yang";
} }
import ietf-inet-types {
prefix "inet";
}
import ietf-subscribed-notifications {
prefix "sn";
}
organization organization
"IETF Network Configuration (NETCONF) Working Group"; "IETF Network Configuration (NETCONF) Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/netconf/> "WG Web: <http://tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org> WG List: <mailto:netconf@ietf.org>
Editor: Igor Bryskin Editor: Igor Bryskin
<mailto:Igor.Bryskin@huawei.com> <mailto:Igor.Bryskin@huawei.com>
Editor: Xufeng Liu Editor: Xufeng Liu
<mailto:Xufeng_Liu@jabil.com> <mailto:xufeng.liu.ietf@gmail.com>
Editor: Alexander Clemm Editor: Alexander Clemm
<mailto:ludwig@clemm.org>"; <mailto:ludwig@clemm.org>";
description description
"Event Condition Action (ECA) model."; "Event Condition Action (ECA) model.";
revision 2018-02-28 { revision 2018-06-22 {
description "Initial revision"; description "Initial revision";
reference "RFC XXXX"; reference "RFC XXXX";
} }
/* /*
* Typedefs * Typedefs
*/ */
identity argument-type { identity argument-type {
description description
"Possible values are: "Possible values are:
skipping to change at page 22, line 40 skipping to change at page 23, line 38
action, content-move, function-call, rpc, notify."; action, content-move, function-call, rpc, notify.";
} }
identity policy-variable-type { identity policy-variable-type {
description description
"Possible values are: "Possible values are:
boolean, int32, int64, uint32, uint64, string, etc."; boolean, int32, int64, uint32, uint64, string, etc.";
} }
/* /*
* Typedefs
*/
typedef oper-status {
type enumeration {
enum completed {
description "Completed with no error.";
}
enum running {
description "Currently with no error.";
}
enum sleeping {
description "Sleeping because of time schedule.";
}
enum paused {
description "Paused by the operator.";
}
enum stoped {
description "Stopped by the operator.";
}
enum failed {
description "Failed with errors.";
}
enum error-handling {
description
"Asking the operator to handle an error.";
}
}
description
"The operational status of an ECA execution.";
}
/*
* Groupings * Groupings
*/ */
grouping policy-variable-attributes { grouping policy-variable-attributes {
description description
"Defining the policy variable attributes, including name, type "Defining the policy variable attributes, including name, type
and value. These attributes are used as part of the Policy and value. These attributes are used as part of the Policy
Variable (PV) definition."; Variable (PV) definition.";
leaf name { leaf name {
type string; type string;
description description
skipping to change at page 27, line 38 skipping to change at page 29, line 19
"A string name used as the list key to form a list "A string name used as the list key to form a list
of policy arguments."; of policy arguments.";
} }
uses policy-argument; uses policy-argument;
} }
} }
} // notify-operation } // notify-operation
} }
} // action-element-attributes } // action-element-attributes
grouping time-schedule-container {
description
"Grouping to define a container of a time schedule.";
container time-schedule {
presence
"Presence indicates that the timer is enabled.";
description
"Specifying the time schedule to execute an ECA Action, or
trigger an event.";
leaf start {
type yang:date-and-time;
description
"The start time of the ECA Action, or the specified event.
If not specified, the ECA Action is executed
immediately when it is called, or the event is triggered
immediately.";
}
leaf repeat-interval {
type string {
pattern
'(R\d*/)?P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?T(\d+H)?'
+ '(\d+M)?(\d+S)?';
}
description
"The repeat interval to execute this ECA Action, or to
trigger the event.
The repeat interval is a string in ISO 8601 format,
representing a delay duration or a repeated delay
duration.
If not specified, the ECA Action or the evetn trigger
is executed without delay and without repetition.";
}
} // time-schedule
}
/* /*
* Data nodes * Data nodes
*/ */
container gnca { container gnca {
description description
"Top level container for Generalized Network Control Automation "Top level container for Generalized Network Control Automation
(GNCA)."; (GNCA).";
// policy-variables // policy-variables
container policy-variables { container policy-variables {
skipping to change at page 28, line 11 skipping to change at page 30, line 28
"Container of global Policy Variables (PVs)."; "Container of global Policy Variables (PVs).";
list policy-variable { list policy-variable {
key name; key name;
description description
"A list of global Policy Variables (PVs), with a string "A list of global Policy Variables (PVs), with a string
name as the entry key."; name as the entry key.";
uses policy-variable-attributes; uses policy-variable-attributes;
} }
} // policy-variables } // policy-variables
container events {
description
"Container of ECA events.";
list event {
key name;
description
"A list of events used as the triggers of ECAs.";
leaf name {
type string;
description
"The name of the event.";
}
leaf policy-variable {
type leafref {
path "/gnca/policy-variables/"
+ "policy-variable/name";
}
description
"Optional association to a global policy variable, which
is shared by all ECA scripts.";
}
leaf local-policy-variable {
type leafref {
path "/gnca/ecas/eca/policy-variable/name";
}
description
"Optional associateion to a local policy variable, which
is kept within an ECA instance, and appears/
disappears with start/stop of the ECA execution.";
}
choice type-choice {
description
"The type of an event, including subscribed stream.";
case stream {
container stream {
description
"The information of the subscribed stream.";
leaf name {
type string;
description
"The name of a stream subscribed and reported in
the model
ietf-subscribed-notifications.";
}
leaf-list filter {
type string;
description
"A list of filters to be applied to the subscribed
stream.";
}
container remote-publisher {
presence
"The presence indicates the publisher is remote.
Otherwise, the publisher is the local system.";
description
"If the subscribed stream is from a remote server,
this container specifies the information of the
remote server.";
leaf address {
type inet:ip-address-no-zone;
description
"IP address of the remote publisher.";
}
leaf port {
type inet:port-number;
description
"The port number on the publisher for a
subscription request RPC.";
}
leaf transport {
type sn:transport;
description
"The transport used between this system and
remote publisher.";
}
}
}
}
case timer {
uses time-schedule-container {
description
"Specifying the time schedule to trigger the event.
If not specified, the event is not triggered.";
}
}
}
}
}
container conditions { container conditions {
description description
"Container of ECA Conditions."; "Container of ECA Conditions.";
list condition { list condition {
key name; key name;
description description
"A list of ECA Conditions."; "A list of ECA Conditions.";
leaf name { leaf name {
type string; type string;
description description
skipping to change at page 30, line 40 skipping to change at page 34, line 49
"A list of elements contained in an ECA Action. "; "A list of elements contained in an ECA Action. ";
leaf name { leaf name {
type string; type string;
description description
"A string name to uniquely identify the action element "A string name to uniquely identify the action element
within the scope of an ECA action."; within the scope of an ECA action.";
} }
uses action-element-attributes; uses action-element-attributes;
} }
container time-schedule { uses time-schedule-container {
description description
"Specifying the time schedule to execute this ECA "Specifying the time schedule to execute this ECA
Action. Action.
If not specified, the ECA Action is executed immediately If not specified, the ECA Action is executed immediately
when it is called."; when it is called.";
leaf start { }
type yang:date-and-time;
description
"The start time of the ECA Action.
If not specified, the ECA Action is executed
immediately when it is called.";
}
leaf repeat-interval {
type string {
pattern
'(R\d*/)?P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?T(\d+H)?'
+ '(\d+M)?(\d+S)?';
}
description
"The repeat interval to execute this ECA Action.
The repeat interval is a string in ISO 8601 format,
representing a delay duration or a repeated delay
duration.
If not specified, the ECA Action is executed without
delay and without repetition.";
}
} // time-schedule
} }
} // actions } // actions
container ecas { container ecas {
description description
"Container of ECAs."; "Container of ECAs.";
list eca { list eca {
key name; key name;
description description
"A lis of ECAs"; "A lis of ECAs";
skipping to change at page 34, line 4 skipping to change at page 37, line 40
"Resume the execution of this ECA to complete the next "Resume the execution of this ECA to complete the next
action."; action.";
} }
list execution { list execution {
key id; key id;
config false; config false;
description description
"A list of executions that this ECA has completed, "A list of executions that this ECA has completed,
are currently running, and will start in the scheduled are currently running, and will start in the scheduled
future."; future.";
leaf id { leaf id {
type uint32; type uint32;
description description
"The ID to uniquely identify an execution of the ECA."; "The ID to uniquely identify an execution of the ECA.";
} }
leaf oper-status { leaf oper-status {
type enumeration { type oper-status;
enum completed {
description "Completed with no error.";
}
enum running {
description "Currently with no error.";
}
enum sleeping {
description "Sleeping because of time schedule.";
}
enum paused {
description "Paused by the operator.";
}
enum stoped {
description "Stopped by the operator.";
}
enum failed {
description "Failed with errors.";
}
enum error-handling {
description
"Asking the operator to handle an error.";
}
}
description description
"The running status of the execution."; "The running status of the execution.";
} }
leaf start-time { leaf start-time {
type yang:date-and-time; type yang:date-and-time;
description description
"The time when the ECA started."; "The time when the ECA started.";
} }
leaf stop-time { leaf stop-time {
type yang:date-and-time; type yang:date-and-time;
skipping to change at page 36, line 27 skipping to change at page 39, line 39
} // eca-scripts } // eca-scripts
leaf running-script { leaf running-script {
type leafref { type leafref {
path "/gnca/eca-scripts/eca-script/script-name"; path "/gnca/eca-scripts/eca-script/script-name";
} }
description description
"The reference to the ECA script that is currently running."; "The reference to the ECA script that is currently running.";
} }
} }
/*
* NOTIFICATIONS
*/
notification eca-execution {
description
"This notification is to send the result of an ECA execution
that is specified to use notify-operation.";
leaf oper-status {
type oper-status;
mandatory true;
description
"The running status of the execution.";
}
leaf name {
type string;
mandatory true;
description
"Name of the subscribed YANG notification.";
}
list policy-variable {
key name;
description
"A list of policy arguments carried in the notification
message.";
leaf name {
type string;
description
"A string name used as the list key to form a list
of policy arguments.";
}
uses policy-argument;
anydata value {
description
"The value of the policy variable, in a format that is
determined by the policy type.";
}
}
}
} }
<CODE ENDS> <CODE ENDS>
8. IANA Considerations 8. IANA Considerations
TBD. TBD.
9. Security Considerations 9. Security Considerations
TBD. TBD.
skipping to change at page 37, line 14 skipping to change at page 41, line 18
[I-D.clemm-netconf-push-smart-filters-ps] [I-D.clemm-netconf-push-smart-filters-ps]
Clemm, A., Voit, E., Liu, X., Bryskin, I., Zhou, T., Clemm, A., Voit, E., Liu, X., Bryskin, I., Zhou, T.,
Zheng, G., and H. Birkholz, "Smart filters for Push Zheng, G., and H. Birkholz, "Smart filters for Push
Updates - Problem Statement", draft-clemm-netconf-push- Updates - Problem Statement", draft-clemm-netconf-push-
smart-filters-ps-00 (work in progress), October 2017. smart-filters-ps-00 (work in progress), October 2017.
[I-D.ietf-teas-yang-te-topo] [I-D.ietf-teas-yang-te-topo]
Liu, X., Bryskin, I., Beeram, V., Saad, T., Shah, H., and Liu, X., Bryskin, I., Beeram, V., Saad, T., Shah, H., and
O. Dios, "YANG Data Model for Traffic Engineering (TE) O. Dios, "YANG Data Model for Traffic Engineering (TE)
Topologies", draft-ietf-teas-yang-te-topo-14 (work in Topologies", draft-ietf-teas-yang-te-topo-16 (work in
progress), February 2018. progress), June 2018.
11.2. Informative References 11.2. Informative References
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[I-D.ietf-netconf-subscribed-notifications] [I-D.ietf-netconf-subscribed-notifications]
Voit, E., Clemm, A., Prieto, A., Nilsen-Nygaard, E., and Voit, E., Clemm, A., Prieto, A., Nilsen-Nygaard, E., and
A. Tripathy, "Custom Subscription to Event Streams", A. Tripathy, "Customized Subscriptions to a Publisher's
draft-ietf-netconf-subscribed-notifications-09 (work in Event Streams", draft-ietf-netconf-subscribed-
progress), January 2018. notifications-12 (work in progress), April 2018.
[I-D.ietf-netconf-yang-push] [I-D.ietf-netconf-yang-push]
Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen- Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen-
Nygaard, E., Bierman, A., and B. Lengyel, "YANG Datastore Nygaard, E., Bierman, A., and B. Lengyel, "YANG Datastore
Subscription", draft-ietf-netconf-yang-push-14 (work in Subscription", draft-ietf-netconf-yang-push-16 (work in
progress), February 2018. progress), May 2018.
Authors' Addresses Authors' Addresses
Igor Bryskin Igor Bryskin
Huawei Technologies Huawei Technologies
EMail: Igor.Bryskin@huawei.com EMail: Igor.Bryskin@huawei.com
Xufeng Liu Xufeng Liu
Jabil Volta Networks
EMail: Xufeng_Liu@jabil.com
EMail: xufeng.liu.ietf@gmail.com
Alexander Clemm Alexander Clemm
Huawei Huawei
EMail: ludwig@clemm.org EMail: ludwig@clemm.org
Henk Birkholz Henk Birkholz
Fraunhofer SIT Fraunhofer SIT
EMail: henk.birkholz@sit.fraunhofer.de EMail: henk.birkholz@sit.fraunhofer.de
Tianran Zhou Tianran Zhou
Huawei Huawei
EMail: zhoutianran@huawei.com EMail: zhoutianran@huawei.com
 End of changes. 45 change blocks. 
299 lines changed or deleted 521 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/