-
Notifications
You must be signed in to change notification settings - Fork 0
/
ietf-http-client.yang
199 lines (176 loc) · 5.61 KB
/
ietf-http-client.yang
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
module ietf-http-client {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-http-client";
prefix httpc;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-netconf-acm {
prefix nacm;
reference
"RFC 8341: Network Configuration Access Control Model";
}
import ietf-tls-client {
prefix tlsc;
reference
"RFC FFFF: YANG Groupings for TLS Clients and TLS Servers";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: https://datatracker.ietf.org/wg/netconf
WG List: NETCONF WG list <mailto:[email protected]>
Author: Kent Watsen <mailto:[email protected]>";
description
"This module defines reusable groupings for HTTP clients that
can be used as a basis for specific HTTP client instances.
Copyright (c) 2024 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 Revised
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC GGGG
(https://www.rfc-editor.org/info/rfcGGGG); see the RFC
itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
revision YYYY-MM-DD {
description
"Initial version";
reference
"RFC GGGG: YANG Groupings for HTTP Clients and HTTP Servers";
}
// Features
feature tls-supported {
description
"Indicates that the server supports configuring
HTTP client certificates.";
reference
"RFC 9110: HTTP Semantics";
}
feature "http-11-supported" {
description
"Indicates that the server supports configuring
clients to use the HTTP/1.1 protocol.";
reference
"RFC 9112: HTTP/1.1";
}
feature "http-2-supported" {
description
"Indicates that the server supports configuring
clients to use the HTTP/2 protocol.";
reference
"RFC 9113: HTTP/2";
}
feature "http-3-supported" {
if-feature "tls-supported";
description
"Indicates that the server supports configuring
clients to use the HTTP/3 protocol.";
reference
"RFC 9114: HTTP/3";
}
feature proxy-connect {
description
"Indicates that the server supports configuring HTTP
clients to connect to a remote HTTP server via a
proxy, per Section 9.3.6 of RFC 9110.";
reference
"RFC 9110: HTTP Semantics";
}
// Groupings
grouping http-client-common-grouping {
description
"A grouping for the 'http-client-grouping' and
its descendant node 'proxy-connect' to use.";
leaf uri {
nacm:default-deny-all;
type inet:uri;
mandatory true;
description
"The URI the client uses.
As described by RFC 3986, URIs encode:
- scheme: e.g., https
- userinfo: e.g., user@pass
- host: e.g., example.com
- port: e.g., 443
- path: e.g., /foo/bar
- query: e.g., ?query
- fragment: e.g., #fragment
";
reference
"RFC 3986 URI Generic Syntax";
}
leaf protocol-versions {
type union {
type enumeration {
enum any {
description
"Indicates the client is willing to use any version";
}
}
type bits {
bit "http-11" {
if-feature "http-11-supported";
description
"Indicates the client is willing to use HTTP/1.1.";
}
bit "http-2" {
if-feature "http-2-supported";
description
"Indicates the client is willing to use HTTP/2.";
}
bit "http-3" {
if-feature "http-3-supported";
description
"Indicates the client is willing to use HTTP/3.";
}
}
}
default "any";
description
"HTTP protocol versions the client supports.";
}
container tls-client-parameters {
if-feature "tls-supported";
description
"TLS client parameters.";
uses tlsc:tls-client-grouping {
refine server-authentication {
presence
"Indicates that TLS-client parameters have been
configured. This statement is present so the
mandatory descendant nodes do not imply that
this node must be configured.";
}
}
}
}
grouping http-client-grouping {
description
"A reusable grouping for configuring an HTTP client.";
uses http-client-common-grouping;
container proxy-connect {
if-feature proxy-connect;
presence
"Indicates that the HTTP-client connects through a proxy.
This statement is present so the mandatory descendant
nodes do not imply that this node must be configured.";
uses http-client-common-grouping;
description
"Configures the proxy server the HTTP-client is to
connect through, per Section 9.3.6 of RFC 9110.";
reference
"RFC 9110: HTTP Semantics";
}
} // grouping http-client-grouping
}