This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
netconf.go
1424 lines (1130 loc) · 55.2 KB
/
netconf.go
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// NETCONF Protocol Data Types and Protocol Operations.
//
// Copyright (c) 2011 IETF Trust and the persons identified as
// the document authors. 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).
//
// This version of this YANG module is part of RFC 6241; see
// the RFC itself for full legal notices.
package netconf
import (
"fmt"
"github.com/CiscoDevNet/ydk-go/ydk"
"github.com/CiscoDevNet/ydk-go/ydk/types"
"github.com/CiscoDevNet/ydk-go/ydk/types/yfilter"
"github.com/CiscoDevNet/ydk-go/ydk/models/ietf"
"reflect"
)
func init() {
ydk.YLogDebug(fmt.Sprintf("Registering top level entities for package netconf"))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 get-config}", reflect.TypeOf(GetConfig{}))
ydk.RegisterEntity("ietf-netconf:get-config", reflect.TypeOf(GetConfig{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 edit-config}", reflect.TypeOf(EditConfig{}))
ydk.RegisterEntity("ietf-netconf:edit-config", reflect.TypeOf(EditConfig{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 copy-config}", reflect.TypeOf(CopyConfig{}))
ydk.RegisterEntity("ietf-netconf:copy-config", reflect.TypeOf(CopyConfig{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 delete-config}", reflect.TypeOf(DeleteConfig{}))
ydk.RegisterEntity("ietf-netconf:delete-config", reflect.TypeOf(DeleteConfig{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 lock}", reflect.TypeOf(Lock{}))
ydk.RegisterEntity("ietf-netconf:lock", reflect.TypeOf(Lock{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 unlock}", reflect.TypeOf(Unlock{}))
ydk.RegisterEntity("ietf-netconf:unlock", reflect.TypeOf(Unlock{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 get}", reflect.TypeOf(Get{}))
ydk.RegisterEntity("ietf-netconf:get", reflect.TypeOf(Get{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 close-session}", reflect.TypeOf(CloseSession{}))
ydk.RegisterEntity("ietf-netconf:close-session", reflect.TypeOf(CloseSession{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 kill-session}", reflect.TypeOf(KillSession{}))
ydk.RegisterEntity("ietf-netconf:kill-session", reflect.TypeOf(KillSession{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 commit}", reflect.TypeOf(Commit{}))
ydk.RegisterEntity("ietf-netconf:commit", reflect.TypeOf(Commit{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 discard-changes}", reflect.TypeOf(DiscardChanges{}))
ydk.RegisterEntity("ietf-netconf:discard-changes", reflect.TypeOf(DiscardChanges{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 cancel-commit}", reflect.TypeOf(CancelCommit{}))
ydk.RegisterEntity("ietf-netconf:cancel-commit", reflect.TypeOf(CancelCommit{}))
ydk.RegisterEntity("{urn:ietf:params:xml:ns:netconf:base:1.0 validate}", reflect.TypeOf(Validate{}))
ydk.RegisterEntity("ietf-netconf:validate", reflect.TypeOf(Validate{}))
}
// ErrorSeverityType represents NETCONF Error Severity
type ErrorSeverityType string
const (
// Error severity
ErrorSeverityType_error_ ErrorSeverityType = "error"
// Warning severity
ErrorSeverityType_warning ErrorSeverityType = "warning"
)
// ErrorTagType represents NETCONF Error Tag
type ErrorTagType string
const (
// The request requires a resource that
// already is in use.
ErrorTagType_in_use ErrorTagType = "in-use"
// The request specifies an unacceptable value for one
// or more parameters.
ErrorTagType_invalid_value ErrorTagType = "invalid-value"
// The request or response (that would be generated) is
// too large for the implementation to handle.
ErrorTagType_too_big ErrorTagType = "too-big"
// An expected attribute is missing.
ErrorTagType_missing_attribute ErrorTagType = "missing-attribute"
// An attribute value is not correct; e.g., wrong type,
// out of range, pattern mismatch.
ErrorTagType_bad_attribute ErrorTagType = "bad-attribute"
// An unexpected attribute is present.
ErrorTagType_unknown_attribute ErrorTagType = "unknown-attribute"
// An expected element is missing.
ErrorTagType_missing_element ErrorTagType = "missing-element"
// An element value is not correct; e.g., wrong type,
// out of range, pattern mismatch.
ErrorTagType_bad_element ErrorTagType = "bad-element"
// An unexpected element is present.
ErrorTagType_unknown_element ErrorTagType = "unknown-element"
// An unexpected namespace is present.
ErrorTagType_unknown_namespace ErrorTagType = "unknown-namespace"
// Access to the requested protocol operation or
// data model is denied because authorization failed.
ErrorTagType_access_denied ErrorTagType = "access-denied"
// Access to the requested lock is denied because the
// lock is currently held by another entity.
ErrorTagType_lock_denied ErrorTagType = "lock-denied"
// Request could not be completed because of
// insufficient resources.
ErrorTagType_resource_denied ErrorTagType = "resource-denied"
// Request to roll back some configuration change (via
// rollback-on-error or <discard-changes> operations)
// was not completed for some reason.
ErrorTagType_rollback_failed ErrorTagType = "rollback-failed"
// Request could not be completed because the relevant
// data model content already exists. For example,
// a 'create' operation was attempted on data that
// already exists.
ErrorTagType_data_exists ErrorTagType = "data-exists"
// Request could not be completed because the relevant
// data model content does not exist. For example,
// a 'delete' operation was attempted on
// data that does not exist.
ErrorTagType_data_missing ErrorTagType = "data-missing"
// Request could not be completed because the requested
// operation is not supported by this implementation.
ErrorTagType_operation_not_supported ErrorTagType = "operation-not-supported"
// Request could not be completed because the requested
// operation failed for some reason not covered by
// any other error condition.
ErrorTagType_operation_failed ErrorTagType = "operation-failed"
// This error-tag is obsolete, and SHOULD NOT be sent
// by servers conforming to this document.
ErrorTagType_partial_operation ErrorTagType = "partial-operation"
// A message could not be handled because it failed to
// be parsed correctly. For example, the message is not
// well-formed XML or it uses an invalid character set.
ErrorTagType_malformed_message ErrorTagType = "malformed-message"
)
// EditOperationType represents NETCONF 'operation' attribute values
type EditOperationType string
const (
// The configuration data identified by the
// element containing this attribute is merged
// with the configuration at the corresponding
// level in the configuration datastore identified
// by the target parameter.
EditOperationType_merge EditOperationType = "merge"
// The configuration data identified by the element
// containing this attribute replaces any related
// configuration in the configuration datastore
// identified by the target parameter. If no such
// configuration data exists in the configuration
// datastore, it is created. Unlike a
// <copy-config> operation, which replaces the
// entire target configuration, only the configuration
// actually present in the config parameter is affected.
EditOperationType_replace EditOperationType = "replace"
// The configuration data identified by the element
// containing this attribute is added to the
// configuration if and only if the configuration
// data does not already exist in the configuration
// datastore. If the configuration data exists, an
// <rpc-error> element is returned with an
// <error-tag> value of 'data-exists'.
EditOperationType_create EditOperationType = "create"
// The configuration data identified by the element
// containing this attribute is deleted from the
// configuration if and only if the configuration
// data currently exists in the configuration
// datastore. If the configuration data does not
// exist, an <rpc-error> element is returned with
// an <error-tag> value of 'data-missing'.
EditOperationType_delete_ EditOperationType = "delete"
// The configuration data identified by the element
// containing this attribute is deleted from the
// configuration if the configuration
// data currently exists in the configuration
// datastore. If the configuration data does not
// exist, the 'remove' operation is silently ignored
// by the server.
EditOperationType_remove EditOperationType = "remove"
)
// GetConfig
// Retrieve all or part of a specified configuration.
type GetConfig struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
Input GetConfig_Input
Output GetConfig_Output
}
func (getConfig *GetConfig) GetEntityData() *types.CommonEntityData {
getConfig.EntityData.YFilter = getConfig.YFilter
getConfig.EntityData.YangName = "get-config"
getConfig.EntityData.BundleName = "ietf"
getConfig.EntityData.ParentYangName = "ietf-netconf"
getConfig.EntityData.SegmentPath = "ietf-netconf:get-config"
getConfig.EntityData.AbsolutePath = getConfig.EntityData.SegmentPath
getConfig.EntityData.CapabilitiesTable = ietf.GetCapabilities()
getConfig.EntityData.NamespaceTable = ietf.GetNamespaces()
getConfig.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
getConfig.EntityData.Children = types.NewOrderedMap()
getConfig.EntityData.Children.Append("input", types.YChild{"Input", &getConfig.Input})
getConfig.EntityData.Children.Append("output", types.YChild{"Output", &getConfig.Output})
getConfig.EntityData.Leafs = types.NewOrderedMap()
getConfig.EntityData.YListKeys = []string {}
return &(getConfig.EntityData)
}
// GetConfig_Input
type GetConfig_Input struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Subtree or XPath filter to use. The type is string.
Filter interface{}
// The explicit defaults processing mode requested. The type is
// WithDefaultsMode.
WithDefaults interface{}
// Particular configuration to retrieve.
Source GetConfig_Input_Source
}
func (input *GetConfig_Input) GetEntityData() *types.CommonEntityData {
input.EntityData.YFilter = input.YFilter
input.EntityData.YangName = "input"
input.EntityData.BundleName = "ietf"
input.EntityData.ParentYangName = "get-config"
input.EntityData.SegmentPath = "input"
input.EntityData.AbsolutePath = "ietf-netconf:get-config/" + input.EntityData.SegmentPath
input.EntityData.CapabilitiesTable = ietf.GetCapabilities()
input.EntityData.NamespaceTable = ietf.GetNamespaces()
input.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
input.EntityData.Children = types.NewOrderedMap()
input.EntityData.Children.Append("source", types.YChild{"Source", &input.Source})
input.EntityData.Leafs = types.NewOrderedMap()
input.EntityData.Leafs.Append("filter", types.YLeaf{"Filter", input.Filter})
input.EntityData.Leafs.Append("with-defaults", types.YLeaf{"WithDefaults", input.WithDefaults})
input.EntityData.YListKeys = []string {}
return &(input.EntityData)
}
// GetConfig_Input_Source
// Particular configuration to retrieve.
type GetConfig_Input_Source struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The candidate configuration is the config source. The type is interface{}.
Candidate interface{}
// The running configuration is the config source. The type is interface{}.
Running interface{}
// The startup configuration is the config source. This is
// optional-to-implement on the server because not all servers will support
// filtering for this datastore. The type is interface{}.
Startup interface{}
}
func (source *GetConfig_Input_Source) GetEntityData() *types.CommonEntityData {
source.EntityData.YFilter = source.YFilter
source.EntityData.YangName = "source"
source.EntityData.BundleName = "ietf"
source.EntityData.ParentYangName = "input"
source.EntityData.SegmentPath = "source"
source.EntityData.AbsolutePath = "ietf-netconf:get-config/input/" + source.EntityData.SegmentPath
source.EntityData.CapabilitiesTable = ietf.GetCapabilities()
source.EntityData.NamespaceTable = ietf.GetNamespaces()
source.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
source.EntityData.Children = types.NewOrderedMap()
source.EntityData.Leafs = types.NewOrderedMap()
source.EntityData.Leafs.Append("candidate", types.YLeaf{"Candidate", source.Candidate})
source.EntityData.Leafs.Append("running", types.YLeaf{"Running", source.Running})
source.EntityData.Leafs.Append("startup", types.YLeaf{"Startup", source.Startup})
source.EntityData.YListKeys = []string {}
return &(source.EntityData)
}
// GetConfig_Output
type GetConfig_Output struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Copy of the source datastore subset that matched the filter criteria (if
// any). An empty data container indicates that the request did not produce
// any results. The type is string.
Data interface{}
}
func (output *GetConfig_Output) GetEntityData() *types.CommonEntityData {
output.EntityData.YFilter = output.YFilter
output.EntityData.YangName = "output"
output.EntityData.BundleName = "ietf"
output.EntityData.ParentYangName = "get-config"
output.EntityData.SegmentPath = "output"
output.EntityData.AbsolutePath = "ietf-netconf:get-config/" + output.EntityData.SegmentPath
output.EntityData.CapabilitiesTable = ietf.GetCapabilities()
output.EntityData.NamespaceTable = ietf.GetNamespaces()
output.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
output.EntityData.Children = types.NewOrderedMap()
output.EntityData.Leafs = types.NewOrderedMap()
output.EntityData.Leafs.Append("data", types.YLeaf{"Data", output.Data})
output.EntityData.YListKeys = []string {}
return &(output.EntityData)
}
// EditConfig
// The <edit-config> operation loads all or part of a specified
// configuration to the specified target configuration.
type EditConfig struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
Input EditConfig_Input
}
func (editConfig *EditConfig) GetEntityData() *types.CommonEntityData {
editConfig.EntityData.YFilter = editConfig.YFilter
editConfig.EntityData.YangName = "edit-config"
editConfig.EntityData.BundleName = "ietf"
editConfig.EntityData.ParentYangName = "ietf-netconf"
editConfig.EntityData.SegmentPath = "ietf-netconf:edit-config"
editConfig.EntityData.AbsolutePath = editConfig.EntityData.SegmentPath
editConfig.EntityData.CapabilitiesTable = ietf.GetCapabilities()
editConfig.EntityData.NamespaceTable = ietf.GetNamespaces()
editConfig.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
editConfig.EntityData.Children = types.NewOrderedMap()
editConfig.EntityData.Children.Append("input", types.YChild{"Input", &editConfig.Input})
editConfig.EntityData.Leafs = types.NewOrderedMap()
editConfig.EntityData.YListKeys = []string {}
return &(editConfig.EntityData)
}
// EditConfig_Input
type EditConfig_Input struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The default operation to use. The type is DefaultOperation. The default
// value is merge.
DefaultOperation interface{}
// The test option to use. The type is TestOption. The default value is
// test-then-set.
TestOption interface{}
// The error option to use. The type is ErrorOption. The default value is
// stop-on-error.
ErrorOption interface{}
// Inline Config content. The type is string.
Config interface{}
// URL-based config content. The type is string.
Url interface{}
// Particular configuration to edit.
Target EditConfig_Input_Target
}
func (input *EditConfig_Input) GetEntityData() *types.CommonEntityData {
input.EntityData.YFilter = input.YFilter
input.EntityData.YangName = "input"
input.EntityData.BundleName = "ietf"
input.EntityData.ParentYangName = "edit-config"
input.EntityData.SegmentPath = "input"
input.EntityData.AbsolutePath = "ietf-netconf:edit-config/" + input.EntityData.SegmentPath
input.EntityData.CapabilitiesTable = ietf.GetCapabilities()
input.EntityData.NamespaceTable = ietf.GetNamespaces()
input.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
input.EntityData.Children = types.NewOrderedMap()
input.EntityData.Children.Append("target", types.YChild{"Target", &input.Target})
input.EntityData.Leafs = types.NewOrderedMap()
input.EntityData.Leafs.Append("default-operation", types.YLeaf{"DefaultOperation", input.DefaultOperation})
input.EntityData.Leafs.Append("test-option", types.YLeaf{"TestOption", input.TestOption})
input.EntityData.Leafs.Append("error-option", types.YLeaf{"ErrorOption", input.ErrorOption})
input.EntityData.Leafs.Append("config", types.YLeaf{"Config", input.Config})
input.EntityData.Leafs.Append("url", types.YLeaf{"Url", input.Url})
input.EntityData.YListKeys = []string {}
return &(input.EntityData)
}
// EditConfig_Input_Target
// Particular configuration to edit.
type EditConfig_Input_Target struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The candidate configuration is the config target. The type is interface{}.
Candidate interface{}
// The running configuration is the config source. The type is interface{}.
Running interface{}
}
func (target *EditConfig_Input_Target) GetEntityData() *types.CommonEntityData {
target.EntityData.YFilter = target.YFilter
target.EntityData.YangName = "target"
target.EntityData.BundleName = "ietf"
target.EntityData.ParentYangName = "input"
target.EntityData.SegmentPath = "target"
target.EntityData.AbsolutePath = "ietf-netconf:edit-config/input/" + target.EntityData.SegmentPath
target.EntityData.CapabilitiesTable = ietf.GetCapabilities()
target.EntityData.NamespaceTable = ietf.GetNamespaces()
target.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
target.EntityData.Children = types.NewOrderedMap()
target.EntityData.Leafs = types.NewOrderedMap()
target.EntityData.Leafs.Append("candidate", types.YLeaf{"Candidate", target.Candidate})
target.EntityData.Leafs.Append("running", types.YLeaf{"Running", target.Running})
target.EntityData.YListKeys = []string {}
return &(target.EntityData)
}
// EditConfig_Input_DefaultOperation represents The default operation to use.
type EditConfig_Input_DefaultOperation string
const (
// The default operation is merge.
EditConfig_Input_DefaultOperation_merge EditConfig_Input_DefaultOperation = "merge"
// The default operation is replace.
EditConfig_Input_DefaultOperation_replace EditConfig_Input_DefaultOperation = "replace"
// There is no default operation.
EditConfig_Input_DefaultOperation_none EditConfig_Input_DefaultOperation = "none"
)
// EditConfig_Input_ErrorOption represents The error option to use.
type EditConfig_Input_ErrorOption string
const (
// The server will stop on errors.
EditConfig_Input_ErrorOption_stop_on_error EditConfig_Input_ErrorOption = "stop-on-error"
// The server may continue on errors.
EditConfig_Input_ErrorOption_continue_on_error EditConfig_Input_ErrorOption = "continue-on-error"
// The server will roll back on errors.
// This value can only be used if the 'rollback-on-error'
// feature is supported.
EditConfig_Input_ErrorOption_rollback_on_error EditConfig_Input_ErrorOption = "rollback-on-error"
)
// EditConfig_Input_TestOption represents The test option to use.
type EditConfig_Input_TestOption string
const (
// The server will test and then set if no errors.
EditConfig_Input_TestOption_test_then_set EditConfig_Input_TestOption = "test-then-set"
// The server will set without a test first.
EditConfig_Input_TestOption_set EditConfig_Input_TestOption = "set"
// The server will only test and not set, even
// if there are no errors.
EditConfig_Input_TestOption_test_only EditConfig_Input_TestOption = "test-only"
)
// CopyConfig
// Create or replace an entire configuration datastore with the
// contents of another complete configuration datastore.
type CopyConfig struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
Input CopyConfig_Input
}
func (copyConfig *CopyConfig) GetEntityData() *types.CommonEntityData {
copyConfig.EntityData.YFilter = copyConfig.YFilter
copyConfig.EntityData.YangName = "copy-config"
copyConfig.EntityData.BundleName = "ietf"
copyConfig.EntityData.ParentYangName = "ietf-netconf"
copyConfig.EntityData.SegmentPath = "ietf-netconf:copy-config"
copyConfig.EntityData.AbsolutePath = copyConfig.EntityData.SegmentPath
copyConfig.EntityData.CapabilitiesTable = ietf.GetCapabilities()
copyConfig.EntityData.NamespaceTable = ietf.GetNamespaces()
copyConfig.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
copyConfig.EntityData.Children = types.NewOrderedMap()
copyConfig.EntityData.Children.Append("input", types.YChild{"Input", ©Config.Input})
copyConfig.EntityData.Leafs = types.NewOrderedMap()
copyConfig.EntityData.YListKeys = []string {}
return &(copyConfig.EntityData)
}
// CopyConfig_Input
type CopyConfig_Input struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The explicit defaults processing mode requested. The type is
// WithDefaultsMode.
WithDefaults interface{}
// Particular configuration to copy to.
Target CopyConfig_Input_Target
// Particular configuration to copy from.
Source CopyConfig_Input_Source
}
func (input *CopyConfig_Input) GetEntityData() *types.CommonEntityData {
input.EntityData.YFilter = input.YFilter
input.EntityData.YangName = "input"
input.EntityData.BundleName = "ietf"
input.EntityData.ParentYangName = "copy-config"
input.EntityData.SegmentPath = "input"
input.EntityData.AbsolutePath = "ietf-netconf:copy-config/" + input.EntityData.SegmentPath
input.EntityData.CapabilitiesTable = ietf.GetCapabilities()
input.EntityData.NamespaceTable = ietf.GetNamespaces()
input.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
input.EntityData.Children = types.NewOrderedMap()
input.EntityData.Children.Append("target", types.YChild{"Target", &input.Target})
input.EntityData.Children.Append("source", types.YChild{"Source", &input.Source})
input.EntityData.Leafs = types.NewOrderedMap()
input.EntityData.Leafs.Append("with-defaults", types.YLeaf{"WithDefaults", input.WithDefaults})
input.EntityData.YListKeys = []string {}
return &(input.EntityData)
}
// CopyConfig_Input_Target
// Particular configuration to copy to.
type CopyConfig_Input_Target struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The candidate configuration is the config target. The type is interface{}.
Candidate interface{}
// The running configuration is the config target. This is
// optional-to-implement on the server. The type is interface{}.
Running interface{}
// The startup configuration is the config target. The type is interface{}.
Startup interface{}
// The URL-based configuration is the config target. The type is string.
Url interface{}
}
func (target *CopyConfig_Input_Target) GetEntityData() *types.CommonEntityData {
target.EntityData.YFilter = target.YFilter
target.EntityData.YangName = "target"
target.EntityData.BundleName = "ietf"
target.EntityData.ParentYangName = "input"
target.EntityData.SegmentPath = "target"
target.EntityData.AbsolutePath = "ietf-netconf:copy-config/input/" + target.EntityData.SegmentPath
target.EntityData.CapabilitiesTable = ietf.GetCapabilities()
target.EntityData.NamespaceTable = ietf.GetNamespaces()
target.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
target.EntityData.Children = types.NewOrderedMap()
target.EntityData.Leafs = types.NewOrderedMap()
target.EntityData.Leafs.Append("candidate", types.YLeaf{"Candidate", target.Candidate})
target.EntityData.Leafs.Append("running", types.YLeaf{"Running", target.Running})
target.EntityData.Leafs.Append("startup", types.YLeaf{"Startup", target.Startup})
target.EntityData.Leafs.Append("url", types.YLeaf{"Url", target.Url})
target.EntityData.YListKeys = []string {}
return &(target.EntityData)
}
// CopyConfig_Input_Source
// Particular configuration to copy from.
type CopyConfig_Input_Source struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The candidate configuration is the config source. The type is interface{}.
Candidate interface{}
// The running configuration is the config source. The type is interface{}.
Running interface{}
// The startup configuration is the config source. The type is interface{}.
Startup interface{}
// The URL-based configuration is the config source. The type is string.
Url interface{}
// Inline Config content: <config> element. Represents an entire
// configuration datastore, not a subset of the running datastore. The type is
// string.
Config interface{}
}
func (source *CopyConfig_Input_Source) GetEntityData() *types.CommonEntityData {
source.EntityData.YFilter = source.YFilter
source.EntityData.YangName = "source"
source.EntityData.BundleName = "ietf"
source.EntityData.ParentYangName = "input"
source.EntityData.SegmentPath = "source"
source.EntityData.AbsolutePath = "ietf-netconf:copy-config/input/" + source.EntityData.SegmentPath
source.EntityData.CapabilitiesTable = ietf.GetCapabilities()
source.EntityData.NamespaceTable = ietf.GetNamespaces()
source.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
source.EntityData.Children = types.NewOrderedMap()
source.EntityData.Leafs = types.NewOrderedMap()
source.EntityData.Leafs.Append("candidate", types.YLeaf{"Candidate", source.Candidate})
source.EntityData.Leafs.Append("running", types.YLeaf{"Running", source.Running})
source.EntityData.Leafs.Append("startup", types.YLeaf{"Startup", source.Startup})
source.EntityData.Leafs.Append("url", types.YLeaf{"Url", source.Url})
source.EntityData.Leafs.Append("config", types.YLeaf{"Config", source.Config})
source.EntityData.YListKeys = []string {}
return &(source.EntityData)
}
// DeleteConfig
// Delete a configuration datastore.
type DeleteConfig struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
Input DeleteConfig_Input
}
func (deleteConfig *DeleteConfig) GetEntityData() *types.CommonEntityData {
deleteConfig.EntityData.YFilter = deleteConfig.YFilter
deleteConfig.EntityData.YangName = "delete-config"
deleteConfig.EntityData.BundleName = "ietf"
deleteConfig.EntityData.ParentYangName = "ietf-netconf"
deleteConfig.EntityData.SegmentPath = "ietf-netconf:delete-config"
deleteConfig.EntityData.AbsolutePath = deleteConfig.EntityData.SegmentPath
deleteConfig.EntityData.CapabilitiesTable = ietf.GetCapabilities()
deleteConfig.EntityData.NamespaceTable = ietf.GetNamespaces()
deleteConfig.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
deleteConfig.EntityData.Children = types.NewOrderedMap()
deleteConfig.EntityData.Children.Append("input", types.YChild{"Input", &deleteConfig.Input})
deleteConfig.EntityData.Leafs = types.NewOrderedMap()
deleteConfig.EntityData.YListKeys = []string {}
return &(deleteConfig.EntityData)
}
// DeleteConfig_Input
type DeleteConfig_Input struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Particular configuration to delete.
Target DeleteConfig_Input_Target
}
func (input *DeleteConfig_Input) GetEntityData() *types.CommonEntityData {
input.EntityData.YFilter = input.YFilter
input.EntityData.YangName = "input"
input.EntityData.BundleName = "ietf"
input.EntityData.ParentYangName = "delete-config"
input.EntityData.SegmentPath = "input"
input.EntityData.AbsolutePath = "ietf-netconf:delete-config/" + input.EntityData.SegmentPath
input.EntityData.CapabilitiesTable = ietf.GetCapabilities()
input.EntityData.NamespaceTable = ietf.GetNamespaces()
input.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
input.EntityData.Children = types.NewOrderedMap()
input.EntityData.Children.Append("target", types.YChild{"Target", &input.Target})
input.EntityData.Leafs = types.NewOrderedMap()
input.EntityData.YListKeys = []string {}
return &(input.EntityData)
}
// DeleteConfig_Input_Target
// Particular configuration to delete.
type DeleteConfig_Input_Target struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The startup configuration is the config target. The type is interface{}.
Startup interface{}
// The URL-based configuration is the config target. The type is string.
Url interface{}
}
func (target *DeleteConfig_Input_Target) GetEntityData() *types.CommonEntityData {
target.EntityData.YFilter = target.YFilter
target.EntityData.YangName = "target"
target.EntityData.BundleName = "ietf"
target.EntityData.ParentYangName = "input"
target.EntityData.SegmentPath = "target"
target.EntityData.AbsolutePath = "ietf-netconf:delete-config/input/" + target.EntityData.SegmentPath
target.EntityData.CapabilitiesTable = ietf.GetCapabilities()
target.EntityData.NamespaceTable = ietf.GetNamespaces()
target.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
target.EntityData.Children = types.NewOrderedMap()
target.EntityData.Leafs = types.NewOrderedMap()
target.EntityData.Leafs.Append("startup", types.YLeaf{"Startup", target.Startup})
target.EntityData.Leafs.Append("url", types.YLeaf{"Url", target.Url})
target.EntityData.YListKeys = []string {}
return &(target.EntityData)
}
// Lock
// The lock operation allows the client to lock the configuration
// system of a device.
type Lock struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
Input Lock_Input
}
func (lock *Lock) GetEntityData() *types.CommonEntityData {
lock.EntityData.YFilter = lock.YFilter
lock.EntityData.YangName = "lock"
lock.EntityData.BundleName = "ietf"
lock.EntityData.ParentYangName = "ietf-netconf"
lock.EntityData.SegmentPath = "ietf-netconf:lock"
lock.EntityData.AbsolutePath = lock.EntityData.SegmentPath
lock.EntityData.CapabilitiesTable = ietf.GetCapabilities()
lock.EntityData.NamespaceTable = ietf.GetNamespaces()
lock.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
lock.EntityData.Children = types.NewOrderedMap()
lock.EntityData.Children.Append("input", types.YChild{"Input", &lock.Input})
lock.EntityData.Leafs = types.NewOrderedMap()
lock.EntityData.YListKeys = []string {}
return &(lock.EntityData)
}
// Lock_Input
type Lock_Input struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Particular configuration to lock.
Target Lock_Input_Target
}
func (input *Lock_Input) GetEntityData() *types.CommonEntityData {
input.EntityData.YFilter = input.YFilter
input.EntityData.YangName = "input"
input.EntityData.BundleName = "ietf"
input.EntityData.ParentYangName = "lock"
input.EntityData.SegmentPath = "input"
input.EntityData.AbsolutePath = "ietf-netconf:lock/" + input.EntityData.SegmentPath
input.EntityData.CapabilitiesTable = ietf.GetCapabilities()
input.EntityData.NamespaceTable = ietf.GetNamespaces()
input.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
input.EntityData.Children = types.NewOrderedMap()
input.EntityData.Children.Append("target", types.YChild{"Target", &input.Target})
input.EntityData.Leafs = types.NewOrderedMap()
input.EntityData.YListKeys = []string {}
return &(input.EntityData)
}
// Lock_Input_Target
// Particular configuration to lock.
type Lock_Input_Target struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The candidate configuration is the config target. The type is interface{}.
Candidate interface{}
// The running configuration is the config target. The type is interface{}.
Running interface{}
// The startup configuration is the config target. The type is interface{}.
Startup interface{}
}
func (target *Lock_Input_Target) GetEntityData() *types.CommonEntityData {
target.EntityData.YFilter = target.YFilter
target.EntityData.YangName = "target"
target.EntityData.BundleName = "ietf"
target.EntityData.ParentYangName = "input"
target.EntityData.SegmentPath = "target"
target.EntityData.AbsolutePath = "ietf-netconf:lock/input/" + target.EntityData.SegmentPath
target.EntityData.CapabilitiesTable = ietf.GetCapabilities()
target.EntityData.NamespaceTable = ietf.GetNamespaces()
target.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
target.EntityData.Children = types.NewOrderedMap()
target.EntityData.Leafs = types.NewOrderedMap()
target.EntityData.Leafs.Append("candidate", types.YLeaf{"Candidate", target.Candidate})
target.EntityData.Leafs.Append("running", types.YLeaf{"Running", target.Running})
target.EntityData.Leafs.Append("startup", types.YLeaf{"Startup", target.Startup})
target.EntityData.YListKeys = []string {}
return &(target.EntityData)
}
// Unlock
// The unlock operation is used to release a configuration lock,
// previously obtained with the 'lock' operation.
type Unlock struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
Input Unlock_Input
}
func (unlock *Unlock) GetEntityData() *types.CommonEntityData {
unlock.EntityData.YFilter = unlock.YFilter
unlock.EntityData.YangName = "unlock"
unlock.EntityData.BundleName = "ietf"
unlock.EntityData.ParentYangName = "ietf-netconf"
unlock.EntityData.SegmentPath = "ietf-netconf:unlock"
unlock.EntityData.AbsolutePath = unlock.EntityData.SegmentPath
unlock.EntityData.CapabilitiesTable = ietf.GetCapabilities()
unlock.EntityData.NamespaceTable = ietf.GetNamespaces()
unlock.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
unlock.EntityData.Children = types.NewOrderedMap()
unlock.EntityData.Children.Append("input", types.YChild{"Input", &unlock.Input})
unlock.EntityData.Leafs = types.NewOrderedMap()
unlock.EntityData.YListKeys = []string {}
return &(unlock.EntityData)
}
// Unlock_Input
type Unlock_Input struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Particular configuration to unlock.
Target Unlock_Input_Target
}
func (input *Unlock_Input) GetEntityData() *types.CommonEntityData {
input.EntityData.YFilter = input.YFilter
input.EntityData.YangName = "input"
input.EntityData.BundleName = "ietf"
input.EntityData.ParentYangName = "unlock"
input.EntityData.SegmentPath = "input"
input.EntityData.AbsolutePath = "ietf-netconf:unlock/" + input.EntityData.SegmentPath
input.EntityData.CapabilitiesTable = ietf.GetCapabilities()
input.EntityData.NamespaceTable = ietf.GetNamespaces()
input.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
input.EntityData.Children = types.NewOrderedMap()
input.EntityData.Children.Append("target", types.YChild{"Target", &input.Target})
input.EntityData.Leafs = types.NewOrderedMap()
input.EntityData.YListKeys = []string {}
return &(input.EntityData)
}
// Unlock_Input_Target
// Particular configuration to unlock.
type Unlock_Input_Target struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// The candidate configuration is the config target. The type is interface{}.
Candidate interface{}
// The running configuration is the config target. The type is interface{}.
Running interface{}
// The startup configuration is the config target. The type is interface{}.
Startup interface{}
}
func (target *Unlock_Input_Target) GetEntityData() *types.CommonEntityData {
target.EntityData.YFilter = target.YFilter
target.EntityData.YangName = "target"
target.EntityData.BundleName = "ietf"
target.EntityData.ParentYangName = "input"
target.EntityData.SegmentPath = "target"
target.EntityData.AbsolutePath = "ietf-netconf:unlock/input/" + target.EntityData.SegmentPath
target.EntityData.CapabilitiesTable = ietf.GetCapabilities()
target.EntityData.NamespaceTable = ietf.GetNamespaces()
target.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
target.EntityData.Children = types.NewOrderedMap()
target.EntityData.Leafs = types.NewOrderedMap()
target.EntityData.Leafs.Append("candidate", types.YLeaf{"Candidate", target.Candidate})
target.EntityData.Leafs.Append("running", types.YLeaf{"Running", target.Running})
target.EntityData.Leafs.Append("startup", types.YLeaf{"Startup", target.Startup})
target.EntityData.YListKeys = []string {}
return &(target.EntityData)
}
// Get
// Retrieve running configuration and device state information.
type Get struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
Input Get_Input
Output Get_Output
}
func (get *Get) GetEntityData() *types.CommonEntityData {
get.EntityData.YFilter = get.YFilter
get.EntityData.YangName = "get"
get.EntityData.BundleName = "ietf"
get.EntityData.ParentYangName = "ietf-netconf"
get.EntityData.SegmentPath = "ietf-netconf:get"
get.EntityData.AbsolutePath = get.EntityData.SegmentPath
get.EntityData.CapabilitiesTable = ietf.GetCapabilities()
get.EntityData.NamespaceTable = ietf.GetNamespaces()
get.EntityData.BundleYangModelsLocation = ietf.GetModelsPath()
get.EntityData.Children = types.NewOrderedMap()
get.EntityData.Children.Append("input", types.YChild{"Input", &get.Input})
get.EntityData.Children.Append("output", types.YChild{"Output", &get.Output})
get.EntityData.Leafs = types.NewOrderedMap()
get.EntityData.YListKeys = []string {}
return &(get.EntityData)
}
// Get_Input
type Get_Input struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// This parameter specifies the portion of the system configuration and state
// data to retrieve. The type is string.
Filter interface{}