-
Notifications
You must be signed in to change notification settings - Fork 3
/
ap_manager_bindings.py
1448 lines (1172 loc) · 89.6 KB
/
ap_manager_bindings.py
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
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListType
from pyangbind.lib.yangtypes import YANGDynClass
from pyangbind.lib.yangtypes import ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitarray
import six
# PY3 support of some PY2 keywords (needs improved)
if six.PY3:
import builtins as __builtin__
long = int
unicode = str
elif six.PY2:
import __builtin__
class yc_config_openconfig_ap_manager__provision_aps_provision_ap_config(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-ap-manager - based on the path /provision-aps/provision-ap/config. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: Config container for assigning hostnames to APs.
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_extmethods', '__mac','__hostname','__country_code',)
_yang_name = 'config'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__mac = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=True)
self.__hostname = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=True)
self.__country_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[A-Z]{2}'}), is_leaf=True, yang_name="country-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=True)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'provision-aps', u'provision-ap', u'config']
def _get_mac(self):
"""
Getter method for mac, mapped from YANG variable /provision_aps/provision_ap/config/mac (oc-yang:mac-address)
YANG Description: MAC address of the AP primary Ethernet interface. If AP
has multiple Ethernet interfaces, this would be the MAC printed
on the unit label and referenced within the management system.
Vendors MUST reject attempts to configure this leaf.
"""
return self.__mac
def _set_mac(self, v, load=False):
"""
Setter method for mac, mapped from YANG variable /provision_aps/provision_ap/config/mac (oc-yang:mac-address)
If this variable is read-only (config: false) in the
source YANG file, then _set_mac is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_mac() directly.
YANG Description: MAC address of the AP primary Ethernet interface. If AP
has multiple Ethernet interfaces, this would be the MAC printed
on the unit label and referenced within the management system.
Vendors MUST reject attempts to configure this leaf.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """mac must be of a type compatible with oc-yang:mac-address""",
'defined-type': "oc-yang:mac-address",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=True)""",
})
self.__mac = t
if hasattr(self, '_set'):
self._set()
def _unset_mac(self):
self.__mac = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=True)
def _get_hostname(self):
"""
Getter method for hostname, mapped from YANG variable /provision_aps/provision_ap/config/hostname (oc-inet:domain-name)
YANG Description: Hostname of the Access Point.
"""
return self.__hostname
def _set_hostname(self, v, load=False):
"""
Setter method for hostname, mapped from YANG variable /provision_aps/provision_ap/config/hostname (oc-inet:domain-name)
If this variable is read-only (config: false) in the
source YANG file, then _set_hostname is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_hostname() directly.
YANG Description: Hostname of the Access Point.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """hostname must be of a type compatible with oc-inet:domain-name""",
'defined-type': "oc-inet:domain-name",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=True)""",
})
self.__hostname = t
if hasattr(self, '_set'):
self._set()
def _unset_hostname(self):
self.__hostname = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=True)
def _get_country_code(self):
"""
Getter method for country_code, mapped from YANG variable /provision_aps/provision_ap/config/country_code (string)
YANG Description: Country code where the AP operates in ISO 3166-1 alpha-2
format.
"""
return self.__country_code
def _set_country_code(self, v, load=False):
"""
Setter method for country_code, mapped from YANG variable /provision_aps/provision_ap/config/country_code (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_country_code is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_country_code() directly.
YANG Description: Country code where the AP operates in ISO 3166-1 alpha-2
format.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[A-Z]{2}'}), is_leaf=True, yang_name="country-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """country_code must be of a type compatible with string""",
'defined-type': "string",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[A-Z]{2}'}), is_leaf=True, yang_name="country-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=True)""",
})
self.__country_code = t
if hasattr(self, '_set'):
self._set()
def _unset_country_code(self):
self.__country_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[A-Z]{2}'}), is_leaf=True, yang_name="country-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=True)
mac = __builtin__.property(_get_mac, _set_mac)
hostname = __builtin__.property(_get_hostname, _set_hostname)
country_code = __builtin__.property(_get_country_code, _set_country_code)
_pyangbind_elements = {'mac': mac, 'hostname': hostname, 'country_code': country_code, }
class yc_state_openconfig_ap_manager__provision_aps_provision_ap_state(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-ap-manager - based on the path /provision-aps/provision-ap/state. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: State container for assigning hostnames to APs.
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_extmethods', '__mac','__hostname','__country_code',)
_yang_name = 'state'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__mac = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=False)
self.__hostname = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=False)
self.__country_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[A-Z]{2}'}), is_leaf=True, yang_name="country-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'provision-aps', u'provision-ap', u'state']
def _get_mac(self):
"""
Getter method for mac, mapped from YANG variable /provision_aps/provision_ap/state/mac (oc-yang:mac-address)
YANG Description: MAC address of the AP primary Ethernet interface. If AP
has multiple Ethernet interfaces, this would be the MAC printed
on the unit label and referenced within the management system.
Vendors MUST reject attempts to configure this leaf.
"""
return self.__mac
def _set_mac(self, v, load=False):
"""
Setter method for mac, mapped from YANG variable /provision_aps/provision_ap/state/mac (oc-yang:mac-address)
If this variable is read-only (config: false) in the
source YANG file, then _set_mac is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_mac() directly.
YANG Description: MAC address of the AP primary Ethernet interface. If AP
has multiple Ethernet interfaces, this would be the MAC printed
on the unit label and referenced within the management system.
Vendors MUST reject attempts to configure this leaf.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """mac must be of a type compatible with oc-yang:mac-address""",
'defined-type': "oc-yang:mac-address",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=False)""",
})
self.__mac = t
if hasattr(self, '_set'):
self._set()
def _unset_mac(self):
self.__mac = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=False)
def _get_hostname(self):
"""
Getter method for hostname, mapped from YANG variable /provision_aps/provision_ap/state/hostname (oc-inet:domain-name)
YANG Description: Hostname of the Access Point.
"""
return self.__hostname
def _set_hostname(self, v, load=False):
"""
Setter method for hostname, mapped from YANG variable /provision_aps/provision_ap/state/hostname (oc-inet:domain-name)
If this variable is read-only (config: false) in the
source YANG file, then _set_hostname is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_hostname() directly.
YANG Description: Hostname of the Access Point.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """hostname must be of a type compatible with oc-inet:domain-name""",
'defined-type': "oc-inet:domain-name",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=False)""",
})
self.__hostname = t
if hasattr(self, '_set'):
self._set()
def _unset_hostname(self):
self.__hostname = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=False)
def _get_country_code(self):
"""
Getter method for country_code, mapped from YANG variable /provision_aps/provision_ap/state/country_code (string)
YANG Description: Country code where the AP operates in ISO 3166-1 alpha-2
format.
"""
return self.__country_code
def _set_country_code(self, v, load=False):
"""
Setter method for country_code, mapped from YANG variable /provision_aps/provision_ap/state/country_code (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_country_code is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_country_code() directly.
YANG Description: Country code where the AP operates in ISO 3166-1 alpha-2
format.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[A-Z]{2}'}), is_leaf=True, yang_name="country-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """country_code must be of a type compatible with string""",
'defined-type': "string",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[A-Z]{2}'}), is_leaf=True, yang_name="country-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)""",
})
self.__country_code = t
if hasattr(self, '_set'):
self._set()
def _unset_country_code(self):
self.__country_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[A-Z]{2}'}), is_leaf=True, yang_name="country-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
mac = __builtin__.property(_get_mac)
hostname = __builtin__.property(_get_hostname)
country_code = __builtin__.property(_get_country_code)
_pyangbind_elements = {'mac': mac, 'hostname': hostname, 'country_code': country_code, }
class yc_provision_ap_openconfig_ap_manager__provision_aps_provision_ap(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-ap-manager - based on the path /provision-aps/provision-ap. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: List of MAC addresses that will have hostnames assigned.
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_extmethods', '__mac','__config','__state',)
_yang_name = 'provision-ap'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__mac = YANGDynClass(base=unicode, is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='leafref', is_config=True)
self.__config = YANGDynClass(base=yc_config_openconfig_ap_manager__provision_aps_provision_ap_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='container', is_config=True)
self.__state = YANGDynClass(base=yc_state_openconfig_ap_manager__provision_aps_provision_ap_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='container', is_config=True)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'provision-aps', u'provision-ap']
def _get_mac(self):
"""
Getter method for mac, mapped from YANG variable /provision_aps/provision_ap/mac (leafref)
YANG Description: Reference to the MAC address list key. This leaf is a reference
only and not to be configured.
"""
return self.__mac
def _set_mac(self, v, load=False):
"""
Setter method for mac, mapped from YANG variable /provision_aps/provision_ap/mac (leafref)
If this variable is read-only (config: false) in the
source YANG file, then _set_mac is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_mac() directly.
YANG Description: Reference to the MAC address list key. This leaf is a reference
only and not to be configured.
"""
parent = getattr(self, "_parent", None)
if parent is not None and load is False:
raise AttributeError("Cannot set keys directly when" +
" within an instantiated list")
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='leafref', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """mac must be of a type compatible with leafref""",
'defined-type': "leafref",
'generated-type': """YANGDynClass(base=unicode, is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='leafref', is_config=True)""",
})
self.__mac = t
if hasattr(self, '_set'):
self._set()
def _unset_mac(self):
self.__mac = YANGDynClass(base=unicode, is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='leafref', is_config=True)
def _get_config(self):
"""
Getter method for config, mapped from YANG variable /provision_aps/provision_ap/config (container)
YANG Description: Config container for assigning hostnames to APs.
"""
return self.__config
def _set_config(self, v, load=False):
"""
Setter method for config, mapped from YANG variable /provision_aps/provision_ap/config (container)
If this variable is read-only (config: false) in the
source YANG file, then _set_config is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_config() directly.
YANG Description: Config container for assigning hostnames to APs.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=yc_config_openconfig_ap_manager__provision_aps_provision_ap_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='container', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """config must be of a type compatible with container""",
'defined-type': "container",
'generated-type': """YANGDynClass(base=yc_config_openconfig_ap_manager__provision_aps_provision_ap_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='container', is_config=True)""",
})
self.__config = t
if hasattr(self, '_set'):
self._set()
def _unset_config(self):
self.__config = YANGDynClass(base=yc_config_openconfig_ap_manager__provision_aps_provision_ap_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='container', is_config=True)
def _get_state(self):
"""
Getter method for state, mapped from YANG variable /provision_aps/provision_ap/state (container)
YANG Description: State container for assigning hostnames to APs.
"""
return self.__state
def _set_state(self, v, load=False):
"""
Setter method for state, mapped from YANG variable /provision_aps/provision_ap/state (container)
If this variable is read-only (config: false) in the
source YANG file, then _set_state is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_state() directly.
YANG Description: State container for assigning hostnames to APs.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=yc_state_openconfig_ap_manager__provision_aps_provision_ap_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='container', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """state must be of a type compatible with container""",
'defined-type': "container",
'generated-type': """YANGDynClass(base=yc_state_openconfig_ap_manager__provision_aps_provision_ap_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='container', is_config=True)""",
})
self.__state = t
if hasattr(self, '_set'):
self._set()
def _unset_state(self):
self.__state = YANGDynClass(base=yc_state_openconfig_ap_manager__provision_aps_provision_ap_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='container', is_config=True)
mac = __builtin__.property(_get_mac, _set_mac)
config = __builtin__.property(_get_config, _set_config)
state = __builtin__.property(_get_state, _set_state)
_pyangbind_elements = {'mac': mac, 'config': config, 'state': state, }
class yc_provision_aps_openconfig_ap_manager__provision_aps(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-ap-manager - based on the path /provision-aps. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: Top most container for assigning hostnames to APs.
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_extmethods', '__provision_ap',)
_yang_name = 'provision-aps'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__provision_ap = YANGDynClass(base=YANGListType("mac",yc_provision_ap_openconfig_ap_manager__provision_aps_provision_ap, yang_name="provision-ap", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac', extensions=None), is_container='list', yang_name="provision-ap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='list', is_config=True)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'provision-aps']
def _get_provision_ap(self):
"""
Getter method for provision_ap, mapped from YANG variable /provision_aps/provision_ap (list)
YANG Description: List of MAC addresses that will have hostnames assigned.
"""
return self.__provision_ap
def _set_provision_ap(self, v, load=False):
"""
Setter method for provision_ap, mapped from YANG variable /provision_aps/provision_ap (list)
If this variable is read-only (config: false) in the
source YANG file, then _set_provision_ap is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_provision_ap() directly.
YANG Description: List of MAC addresses that will have hostnames assigned.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGListType("mac",yc_provision_ap_openconfig_ap_manager__provision_aps_provision_ap, yang_name="provision-ap", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac', extensions=None), is_container='list', yang_name="provision-ap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='list', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """provision_ap must be of a type compatible with list""",
'defined-type': "list",
'generated-type': """YANGDynClass(base=YANGListType("mac",yc_provision_ap_openconfig_ap_manager__provision_aps_provision_ap, yang_name="provision-ap", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac', extensions=None), is_container='list', yang_name="provision-ap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='list', is_config=True)""",
})
self.__provision_ap = t
if hasattr(self, '_set'):
self._set()
def _unset_provision_ap(self):
self.__provision_ap = YANGDynClass(base=YANGListType("mac",yc_provision_ap_openconfig_ap_manager__provision_aps_provision_ap, yang_name="provision-ap", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac', extensions=None), is_container='list', yang_name="provision-ap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='list', is_config=True)
provision_ap = __builtin__.property(_get_provision_ap, _set_provision_ap)
_pyangbind_elements = {'provision_ap': provision_ap, }
class yc_state_openconfig_ap_manager__joined_aps_joined_ap_state(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-ap-manager - based on the path /joined-aps/joined-ap/state. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: State container for Joined APs.
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_extmethods', '__mac','__hostname','__opstate','__uptime','__enabled','__serial','__model','__ipv4','__ipv6','__power_source',)
_yang_name = 'state'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__uptime = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='uint32', is_config=False)
self.__hostname = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=False)
self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='boolean', is_config=False)
self.__opstate = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-wifi:UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi:DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi:UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}},), is_leaf=True, yang_name="opstate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='identityref', is_config=False)
self.__mac = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=False)
self.__ipv4 = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$'}), is_leaf=True, yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:ipv4-address', is_config=False)
self.__ipv6 = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$'}), is_leaf=True, yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:ipv6-address', is_config=False)
self.__power_source = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'PLUG': {}, u'AT': {}, u'AF': {}},), is_leaf=True, yang_name="power-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='enumeration', is_config=False)
self.__serial = YANGDynClass(base=unicode, is_leaf=True, yang_name="serial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
self.__model = YANGDynClass(base=unicode, is_leaf=True, yang_name="model", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'joined-aps', u'joined-ap', u'state']
def _get_mac(self):
"""
Getter method for mac, mapped from YANG variable /joined_aps/joined_ap/state/mac (oc-yang:mac-address)
YANG Description: MAC address of the AP primary Ethernet interface. If AP
has multiple Ethernet interfaces, this would be the MAC printed
on the unit label and referenced within the management system.
Vendors MUST reject attempts to configure this leaf.
"""
return self.__mac
def _set_mac(self, v, load=False):
"""
Setter method for mac, mapped from YANG variable /joined_aps/joined_ap/state/mac (oc-yang:mac-address)
If this variable is read-only (config: false) in the
source YANG file, then _set_mac is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_mac() directly.
YANG Description: MAC address of the AP primary Ethernet interface. If AP
has multiple Ethernet interfaces, this would be the MAC printed
on the unit label and referenced within the management system.
Vendors MUST reject attempts to configure this leaf.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """mac must be of a type compatible with oc-yang:mac-address""",
'defined-type': "oc-yang:mac-address",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=False)""",
})
self.__mac = t
if hasattr(self, '_set'):
self._set()
def _unset_mac(self):
self.__mac = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$'}), is_leaf=True, yang_name="mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-yang:mac-address', is_config=False)
def _get_hostname(self):
"""
Getter method for hostname, mapped from YANG variable /joined_aps/joined_ap/state/hostname (oc-inet:domain-name)
YANG Description: Hostname of the Access Point.
"""
return self.__hostname
def _set_hostname(self, v, load=False):
"""
Setter method for hostname, mapped from YANG variable /joined_aps/joined_ap/state/hostname (oc-inet:domain-name)
If this variable is read-only (config: false) in the
source YANG file, then _set_hostname is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_hostname() directly.
YANG Description: Hostname of the Access Point.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """hostname must be of a type compatible with oc-inet:domain-name""",
'defined-type': "oc-inet:domain-name",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=False)""",
})
self.__hostname = t
if hasattr(self, '_set'):
self._set()
def _unset_hostname(self):
self.__hostname = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.', 'length': [u'1..253']}), is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:domain-name', is_config=False)
def _get_opstate(self):
"""
Getter method for opstate, mapped from YANG variable /joined_aps/joined_ap/state/opstate (identityref)
YANG Description: The current operational state of the AP.
"""
return self.__opstate
def _set_opstate(self, v, load=False):
"""
Setter method for opstate, mapped from YANG variable /joined_aps/joined_ap/state/opstate (identityref)
If this variable is read-only (config: false) in the
source YANG file, then _set_opstate is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_opstate() directly.
YANG Description: The current operational state of the AP.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-wifi:UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi:DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi:UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}},), is_leaf=True, yang_name="opstate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='identityref', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """opstate must be of a type compatible with identityref""",
'defined-type': "openconfig-ap-manager:identityref",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-wifi:UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi:DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi:UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}},), is_leaf=True, yang_name="opstate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='identityref', is_config=False)""",
})
self.__opstate = t
if hasattr(self, '_set'):
self._set()
def _unset_opstate(self):
self.__opstate = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-wifi:UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi:DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi:UPGRADING': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'DOWN': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}, u'oc-wifi-types:UP': {'@namespace': u'http://openconfig.net/yang/wifi/types', '@module': u'openconfig-wifi-types'}},), is_leaf=True, yang_name="opstate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='identityref', is_config=False)
def _get_uptime(self):
"""
Getter method for uptime, mapped from YANG variable /joined_aps/joined_ap/state/uptime (uint32)
YANG Description: Seconds this AP has been in the op-state of 'UP'.
"""
return self.__uptime
def _set_uptime(self, v, load=False):
"""
Setter method for uptime, mapped from YANG variable /joined_aps/joined_ap/state/uptime (uint32)
If this variable is read-only (config: false) in the
source YANG file, then _set_uptime is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_uptime() directly.
YANG Description: Seconds this AP has been in the op-state of 'UP'.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='uint32', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """uptime must be of a type compatible with uint32""",
'defined-type': "uint32",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='uint32', is_config=False)""",
})
self.__uptime = t
if hasattr(self, '_set'):
self._set()
def _unset_uptime(self):
self.__uptime = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='uint32', is_config=False)
def _get_enabled(self):
"""
Getter method for enabled, mapped from YANG variable /joined_aps/joined_ap/state/enabled (boolean)
YANG Description: Wheather the AP is enabled or disabled.
"""
return self.__enabled
def _set_enabled(self, v, load=False):
"""
Setter method for enabled, mapped from YANG variable /joined_aps/joined_ap/state/enabled (boolean)
If this variable is read-only (config: false) in the
source YANG file, then _set_enabled is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_enabled() directly.
YANG Description: Wheather the AP is enabled or disabled.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='boolean', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """enabled must be of a type compatible with boolean""",
'defined-type': "boolean",
'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='boolean', is_config=False)""",
})
self.__enabled = t
if hasattr(self, '_set'):
self._set()
def _unset_enabled(self):
self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='boolean', is_config=False)
def _get_serial(self):
"""
Getter method for serial, mapped from YANG variable /joined_aps/joined_ap/state/serial (string)
YANG Description: Serial number of the Access Point.
"""
return self.__serial
def _set_serial(self, v, load=False):
"""
Setter method for serial, mapped from YANG variable /joined_aps/joined_ap/state/serial (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_serial is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_serial() directly.
YANG Description: Serial number of the Access Point.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="serial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """serial must be of a type compatible with string""",
'defined-type': "string",
'generated-type': """YANGDynClass(base=unicode, is_leaf=True, yang_name="serial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)""",
})
self.__serial = t
if hasattr(self, '_set'):
self._set()
def _unset_serial(self):
self.__serial = YANGDynClass(base=unicode, is_leaf=True, yang_name="serial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
def _get_model(self):
"""
Getter method for model, mapped from YANG variable /joined_aps/joined_ap/state/model (string)
YANG Description: Model number of the Access Point.
"""
return self.__model
def _set_model(self, v, load=False):
"""
Setter method for model, mapped from YANG variable /joined_aps/joined_ap/state/model (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_model is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_model() directly.
YANG Description: Model number of the Access Point.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="model", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """model must be of a type compatible with string""",
'defined-type': "string",
'generated-type': """YANGDynClass(base=unicode, is_leaf=True, yang_name="model", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)""",
})
self.__model = t
if hasattr(self, '_set'):
self._set()
def _unset_model(self):
self.__model = YANGDynClass(base=unicode, is_leaf=True, yang_name="model", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='string', is_config=False)
def _get_ipv4(self):
"""
Getter method for ipv4, mapped from YANG variable /joined_aps/joined_ap/state/ipv4 (oc-inet:ipv4-address)
YANG Description: The IPv4 address of the Access Point.
"""
return self.__ipv4
def _set_ipv4(self, v, load=False):
"""
Setter method for ipv4, mapped from YANG variable /joined_aps/joined_ap/state/ipv4 (oc-inet:ipv4-address)
If this variable is read-only (config: false) in the
source YANG file, then _set_ipv4 is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_ipv4() directly.
YANG Description: The IPv4 address of the Access Point.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$'}), is_leaf=True, yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:ipv4-address', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """ipv4 must be of a type compatible with oc-inet:ipv4-address""",
'defined-type': "oc-inet:ipv4-address",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$'}), is_leaf=True, yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ap-manager', defining_module='openconfig-ap-manager', yang_type='oc-inet:ipv4-address', is_config=False)""",
})
self.__ipv4 = t
if hasattr(self, '_set'):
self._set()
def _unset_ipv4(self):