module ietf-netconf-time {
yang-version 1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-netconf-time";
prefix nct;
import ietf-netconf {
prefix nc;
}
import ietf-yang-types {
prefix yang;
}
import ietf-netconf-monitoring {
prefix ncm;
}
organization "IETF";
contact
"Editor: Tal Mizrahi
<dew@tx.technion.ac.il>
Editor: Yoram Moses
<moses@ee.technion.ac.il>";
description
"This module defines a capability-based extension to the
Network Configuration Protocol (NETCONF) that allows
time-triggered configuration and management operations.
This extension allows NETCONF clients to invoke configuration
updates according to scheduled times and allows NETCONF
servers to attach timestamps to the data they send to NETCONF
clients.
Copyright (c) 2016 IETF Trust and the persons identified as
the 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).";
revision "2016-01-26" {
description "Initial version.";
reference
"RFC 7758:
Time Capability in NETCONF";
}
typedef time-interval {
type string {
pattern '\d{2}:\d{2}:\d{2}(\.\d+)?';
}
description
"Defines a time interval, up to 24 hours.
The format is specified as HH:mm:ss.f,
consisting of two digits for hours,
two digits for minutes, two digits
for seconds, and zero or more digits
representing second fractions.";
}
grouping scheduling-tolerance-parameters {
description
"Contains the parameters of the scheduling tolerance.";
leaf sched-max-future {
type time-interval;
default '00:00:15.0';
description
"When the scheduled time is in the future, i.e., greater
than the present time, this leaf defines the maximal
difference between the scheduled time
and the present time that the server is willing to
accept. If the difference exceeds this number, the
server responds with an error.";
}
leaf sched-max-past {
type time-interval;
default '00:00:15.0';
description
"When the scheduled time is in the past, i.e., less
than the present time, this leaf defines the maximal
difference between the present time
and the scheduled time that the server is willing to
accept. If the difference exceeds this number, the
server responds with an error.";
}
} // grouping scheduling-tolerance-parameters
augment /nc:get-config/nc:input {
description
"Adds the time element to <get-config>.";
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include the
execution-time.";
}
}
augment /nc:get-config/nc:output {
description
"Adds the time element to <get-config>.";
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
augment /nc:get/nc:input {
description
"Adds the time element to <get>.";
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include the
execution-time.";
}
}
augment /nc:get/nc:output {
description
"Adds the time element to <get>.";
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
augment /nc:copy-config/nc:input {
description
"Adds the time element to <copy-config>.";
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include the
execution-time.";
}
}
augment /nc:copy-config/nc:output {
description
"Adds the time element to <copy-config>.";
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
augment /nc:edit-config/nc:input {
description
"Adds the time element to <edit-config>.";
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include the
execution-time.";
}
}
augment /nc:edit-config/nc:output {
description
"Adds the time element to <edit-config>.";
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
augment /nc:delete-config/nc:input {
description
"Adds the time element to <delete-config>.";
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include the
execution-time.";
}
}
augment /nc:delete-config/nc:output {
description
"Adds the time element to <delete-config>.";
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
augment /nc:lock/nc:input {
description
"Adds the time element to <lock>.";
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include the
execution-time.";
}
}
augment /nc:lock/nc:output {
description
"Adds the time element to <lock>.";
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
augment /nc:unlock/nc:input {
description
"Adds the time element to <unlock>.";
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include the
execution-time.";
}
}
augment /nc:unlock/nc:output {
description
"Adds the time element to <unlock>.";
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
augment /nc:commit/nc:input {
description
"Adds the time element to <commit>.";
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include the
execution-time.";
}
}
augment /nc:commit/nc:output {
description
"Adds the time element to <commit>.";
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
augment /ncm:netconf-state {
description
"The scheduling tolerance of the server.";
container scheduling-tolerance {
description
"The scheduling tolerance when the time capability
is enabled.";
uses scheduling-tolerance-parameters;
} // container scheduling-tolerance
}
rpc cancel-schedule {
description
"Cancels a scheduled message.";
reference
"RFC 7758:
Time Capability in NETCONF";
input {
leaf cancelled-message-id {
type string;
description
"The ID of the message to be cancelled.";
}
leaf get-time {
type empty;
description
"Indicates that the rpc-reply should include
the execution-time.";
}
}
output {
leaf execution-time {
type yang:date-and-time;
description
"The time at which the RPC was executed.";
}
}
} // rpc cancel-schedule
notification netconf-scheduled-message {
description
"Indicates that a scheduled message was received.";
reference
"RFC 7758:
Time Capability in NETCONF";
leaf schedule-id {
type string;
description
"The ID of the scheduled message.";
}
leaf scheduled-time {
type yang:date-and-time;
description
"The time at which the RPC is scheduled to be performed.";
}
} // notification netconf-scheduled-message
} // module ietf-netconf-time