blob: de7ed24d75fb2333f601f710089ff2ba9dd42ae0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
module adelie-services {
yang-version 1.1;
namespace 'http://netconf.adelielinux.org/ns/service';
prefix svcs;
import ietf-yang-types {
prefix yang;
}
organization "Adélie Software in the Public Benefit, Inc.";
contact
" Adélie Software in the Public Benefit, Inc.
Postal: Adélie Software
P.O. Box 701386
Tulsa, OK 74170
United States
Email: <mailto:netconf&lists.adelielinux.org>";
description
"This module contains a collection of YANG definitions for
managing network services on a device containing a NETCONF
server. This includes protocol operations for starting and
stopping services.
Copyright (c) 2020 Adélie Software 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 NCSA License set forth
in the LICENSE file contained in the NETCONF APK repository
(https://code.foxkit.us/adelie/netconfapk/blob/current/LICENSE).
This version of this YANG module is part of the NETCONF APK
1.0 distribution; see the distributon for full legal notices.";
revision 2020-09-22 {
description
"Initial revision.";
reference
"Service Management Requirements for NETCONF APK
(https://da.gd/ncservice)";
}
typedef service-status {
type enumeration {
enum stopped {
description
"The service is not presently running.";
}
enum starting {
description
"The service is in the process of starting.";
}
enum running {
description
"The service is presently running.";
}
enum stopping {
description
"The service is in the process of stopping.";
}
enum crashed {
description
"The service was running, but stopped unexpectedly.";
}
}
description
"The status of a service.";
}
container services {
description
"Service configuration.";
list service {
key "name";
description
"The list of services on the device.";
leaf name {
type string;
description
"The name of the service.
Changing the name of the service may have surprising
consequences. It is not recommended.";
}
leaf description {
type string;
config false;
description
"A textual description of the service.
Depending on the service manager in use on the device,
this node may be empty or contain only the name of the
service.";
}
leaf enabled {
type boolean;
mandatory true;
description
"This leaf contains the desired state of the service.
When this leaf is true, the service will be started
automatically by the device during system bootup.";
}
leaf status {
type service-status;
config false;
mandatory true;
description
"The current status of the service.";
}
leaf start-time {
type yang:date-and-time;
config false;
when "./status = 'running'";
description
"The time that this service entered the running state.";
}
}
}
}
|